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 double getCourse() { return this.course; }
{ "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 double getAccuracy() { return this.accuracy; }
{ "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 String getImei() { return this.imei; }
{ "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
Prints file filename on the specified printer
String queue(SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract void print(String fileName);", "public void handlePrintFile (File printFile) {\n // not supported\n }", "public TextFilePrinter getPrinter();", "@Override\n\tpublic void printToFile() {\n\t\t\n\t}", "private void printFile(Products print, String ufilename) {\n\t\tFile file = new File(\"output\"+File.separator+ufilename+fileId+\".xml\"); \n\t\tSystem.out.println(\"Exporting : \"+ file);\n\t\tJAXBContext jaxbContext;\n\t\ttry {\n\t\t\tjaxbContext = JAXBContext.newInstance(Products.class); \n\t\t\tMarshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\t\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);\n\t\t\tjaxbMarshaller.setProperty(\"com.sun.xml.internal.bind.xmlHeaders\", \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n\t\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE);\n\t\t\tjaxbMarshaller.marshal(print, file); // prints the file\n\t\t\t// \t\t jaxbMarshaller.marshal(products, System.out);\n\t\t} catch (JAXBException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void printFileName(String filename) {\n System.out.println(\"\\n\" + filename + \":\");\n }", "public void actionPerformed(ActionEvent e) {\n \t\tPrinterJob job = PrinterJob.getPrinterJob();\n \t\tjob.setPrintable(this);\n \t\tboolean ok = job.printDialog();\n \t\tif (ok) {\n \t\t\ttry {\n \t\t\t\tjob.print();\n \t\t\t} catch (PrinterException ex) {\n \t\t\t\t/* The job did not successfully complete */\n \t\t\t}\n \t\t}\n \n \t}", "void printFile(String path) {\n try {\n String[] readFileOutPut = readFile(path);\n for (int i = 0; i < readFileOutPut.length;i++) System.out.println(readFileOutPut[i]);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void printFile() {\n\t\t\n\t\tfor(String[] line_i: linesArray) {\n\t\t\tSystem.out.println( Arrays.toString(line_i) );\n\t\t}\n\t}", "void print(String fileName)\n\t{\n\t\t//Get the reference of the head of the Linked list\n\t\tNode ref = head;\n\t\t\n\t\t//Print the elements and also write them into a file if the head is initialized\n\t\tif(ref != null)\n\t\t{\n\t\t\ttry \n\t\t\t{\n\t\t\t\t//Create a file output.txt\n\t\t\t\tPrintWriter writer = new PrintWriter(fileName);\n\t\t\t\t\n\t\t\t\t//Traverse till the end of the Linked List \n\t\t\t\twhile(ref != null)\n\t\t\t\t{\n\t\t\t\t\tref = ref.next;\n\t\t\t\t\tif(ref != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Print the elements and also write them into a file\n\t\t\t\t\t\tSystem.out.print(ref.value + \" \");\n\t\t\t\t\t\twriter.print(ref.value + \" \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Close the file\n\t\t\t\twriter.close();\n\t\t\t} \n\t\t\tcatch (FileNotFoundException e) \n\t\t\t{\n\t\t\t\t//Printing the Stack Trace if an exception has occurred\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}", "public static void main(String args[]) {\n System.out.println(\"test program for template printing\");\n String kk = \"src/Printer.java\";\n if (true || args.length > 0) {\n File file = new File(kk);\n System.out.println(\"printing file: \" + file.getName());\n if (file.exists()) {\n // this will be the standard future use of this class: fire and\n // forget\n new Printer(file);\n } else {\n System.out.println(\"file \" + file.getAbsolutePath()\n + \" doesn't exist!\");\n }\n } else {\n System.out.println(\"usage: <filename>\");\n }\n\n }", "private void bookPrinter(String name, String book) throws IOException\n {\n try\n {\n PrintWriter p = new PrintWriter (new BufferedWriter (new FileWriter (\"LibraryCards\\\\\"+name+\".txt\", true)));\n p.println(book.trim());\n p.println(DoDate.display()); //Prints the date to the Library Card\n\n p.close();\n }\n catch (Exception e)\n {\n System.out.println(\"Sorry. There was an error in registering your book.\");\n }\n }", "public static void fileWriterPrinter(String path, String fileName, Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(path + fileName);\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t // System Out Print Line:\n\t\t\t fileWriterPrinter(printLine);\n\t\t\t}", "public static void Print(String fileName)\r\n {\n File file = new File(System.getProperty(\"user.dir\")+\"\\\\\"+fileName+\".txt\"); \r\n \r\n try \r\n {\r\n Scanner sc = new Scanner(file);\r\n \r\n while (sc.hasNextLine()) \r\n {\r\n System.out.println(sc.nextLine());\r\n }\r\n }\r\n catch (FileNotFoundException ex) \r\n {\r\n Logger.getLogger(TxtReader.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n \r\n }", "private void actionPrint() {\n // get PrinterJob\n PrinterJob job = PrinterJob.getPrinterJob();\n MyPrintable printable = new MyPrintable(job.defaultPage(), layoutPanel);\n\n // setup Printable, Pageable\n job.setPrintable(printable);\n job.setPageable(printable);\n\n // display print dialog and print\n if (job.printDialog()) {\n try {\n job.print();\n } catch (PrinterException e) {\n e.printStackTrace();\n }\n }\n }", "public void PrinterStatus(){\n PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);\n System.out.println(\"Printer Services found:\");\n printService(services);\n\n // Look up the default print service\n PrintService service = PrintServiceLookup.lookupDefaultPrintService();\n if (service!=null) {\n System.out.println(\"Default Printer Service found:\");\n System.out.println(\"t\" + service);\n }\n\n\t\n // find printer service by name\n AttributeSet aset_name = new HashAttributeSet();\n aset_name.add(new PrinterName(\"Microsoft XPS Document Writer\", null));\n services = PrintServiceLookup.lookupPrintServices(null, aset_name);\n\n System.out.println(\"Printer Service Microsoft XPS Document Writer:\");\n printService(services);\n \n // find printer service by ip\n PrintServiceAttributeSet aset_URI = new HashPrintServiceAttributeSet();\n try {\n aset_URI.add(new PrinterURI(new URI(\"this ipp is wrong --ipp://hostName/printerName\")));\n } catch (URISyntaxException e) {\n System.out.println(\"URI exception caught: \"+e);\n }\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n \n /*\n //another way to print to a specific uri\n URI printerURI = null;\n try {\n printerURI = new URI(\"ipp://SERVER:631/printers/PRINTER_NAME\");\n } catch (URISyntaxException ex) {\n Logger.getLogger(PrinterStatus.class.getName()).log(Level.SEVERE, null, ex);\n }\n IppPrintService svc = new IppPrintService(printerURI);\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n // following is the way to print sth in a format of flavor\n InputStream stream = new BufferedInputStream(new FileInputStream(\"image.epl\"));\n DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;\n Doc myDoc = new SimpleDoc(stream, flavor, null);\n DocPrintJob job = svc.createPrintJob();\n job.print(myDoc, null);\n */\n \n /*\n // find services that support a particular input format (e.g. JPEG)\n services = PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.JPEG, null);\n System.out.println(\"Printer Services with JPEG support:\");\n printService(services);\n\n //find services that support a set of print job capabilities (e.g. color)\n aset = new HashAttributeSet();\n aset.add(ColorSupported.SUPPORTED);\n services = PrintServiceLookup.lookupPrintServices(null, aset);\n\n System.out.println(\"Printer Services with color support:\");\n printService(services);\n */ \n }", "public static void fileWriterPrinter(String fileName, Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(Common.testOutputFileDir + fileName);\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t // System Out Print Line:\n\t\t\t fileWriterPrinter(printLine);\n\t\t\t}", "public Printer(File file) {\n this.file = file;\n log = LogManager.getLogManager().getLogger(Printer.class.getName());\n // initialization of the template path\n base = System.getProperty(\"user.dir\") + File.separator + \"config\"\n + File.separator + \"template\" + File.separator;\n\n // </snip>\n\n // System.out.println(\"template printing\");\n\n start();\n }", "public static void fileWriterPrinter() throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(Common.testOutputFileDir + \"print.log\");\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println();\n\t\t\t pw.close();\n\t\t\t // System Out Print Line:\n\t\t\t // if (printLine instanceof String) {}\n\t\t\t // if (printLine instanceof Integer) {}\n\t\t\t // if (printLine instanceof Long) {}\n\t\t\t // if (printLine instanceof Boolean) {}\n\t\t\t // if (printLine instanceof Double) {}\n\t\t\t System.out.print(\"\\n\");\t\t \n\t\t\t}", "private void doPrint() {\n PrintManager printManager = (PrintManager) this\n .getSystemService(Context.PRINT_SERVICE);\n\n // Set job name, which will be displayed in the print queue\n String jobName = this.getString(R.string.app_name) + \" Document\";\n\n // Start a print job, passing in a PrintDocumentAdapter implementation\n // to handle the generation of a print document\n printManager.print(jobName, new MyPrintDocumentAdapter(this),\n null); //\n }", "void format(Printer printer);", "public void print(String toPrint) {\n for (Printer print : printers) {\n// System.out.println(\"Start \" + print.busyEndTime);\n if (print.isAvailable()) {\n System.out.println(\"Printer \" + print.id + \" is available to print: \" + toPrint);\n }\n print.busyEndTime = LocalTime.now().plusSeconds(5);\n// System.out.println(\"End \" + print.busyEndTime);\n }\n // Its not needed to actually print with a printer in this exercise\n// System.out.println(\"Printer \" + id + \" is printing.\");\n// busyEndTime = LocalTime.now().plusSeconds(5);\n }", "public void printToFile(Path filename) {\n\t\t\n\t\tlock.lockRead();\n\t\ttry{\n//\t\t\t create a new file if it is not existed; \n//\t\t\t otherwise delete previous one and create a new one.\n\t\t\tif(!Files.exists(filename)){\n\t\t\t\ttry {\n\t\t\t\t\tFiles.createFile(filename);\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\telse{\n\t\t\t\ttry {\n\t\t\t\t\tFiles.delete(filename);\n\t\t\t\t\tFiles.createFile(filename);\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\tfor(String hotelId : hotelMap.keySet()){\n\t\t\t\tString output = this.toString(hotelId);\n\t\t\t\t\t\t\t\n\t\t\t\t// start of the hotel.\n\t\t\t\tString emptyLine = \"\\n\";\n\t\t\t\tString ast = \"********************\";\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tFiles.write(filename, emptyLine.getBytes(), StandardOpenOption.APPEND);\n\t\t\t\t\tFiles.write(filename, ast.getBytes(), StandardOpenOption.APPEND);\n\t\t\t\t\tFiles.write(filename, emptyLine.getBytes(), StandardOpenOption.APPEND);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tFiles.write(filename, output.getBytes(), StandardOpenOption.APPEND);\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\tfinally{\n\t\t\tlock.unlockRead();\n\t\t}\n\t\t\t\n\t}", "@Override\n\tpublic String print(CliPrinter printer) {\n\t\treturn printer.printTProductCards(this);\n\t}", "public static void main(String[] args){\n Printer printer = new Printer();\n printer.print();\n }", "public void doPrint()\n {\n PrinterJob printJob = PrinterJob.getPrinterJob();\n \n printJob.setPrintable((Printable) mapComponent);\n if (printJob.printDialog()) {\n try {\n printJob.print();\n } catch (Exception e) {\n ErrorHandler.displayError(\"An error occured during printing:\\n\" + e, ErrorHandler.ERR_PRINT_FAIL);\n }\n }\n }", "public void print ()\n\t{\n\t\tSystem.out.println(\"Polyhedron File Name: \" + FileName);\n\t\tSystem.out.println(\"Object active: \" + Boolean.toString(isActive()));\n\t\tprintCoordinates();\n\t}", "public void doPrint() {\n printBehavior.printReceipt();\n\n }", "public void printOut(PrintOutType type) {\n\n\t\tboolean output = false;\n\t\tString fileToPrint = \"\";\n\n\t\tswitch (type) {\n\t\tcase OVERVIEW:\n\t\t\toutput = SaveToFile.printOut(new ArrayList<ItemBox>(items), type, false);\n\t\t\tfileToPrint = \"Overview.txt\";\n\t\t\tbreak;\n\t\tcase SHOPPING:\n\t\t\tArrayList<ItemBox> temp = new ArrayList<>();\n\n\t\t\t// adds every Item which has an amount of 0 to the shopping list\n\t\t\tfor (ItemBox item : items) {\n\t\t\t\tif (item.getAmount() == 0) {\n\t\t\t\t\ttemp.add(item);\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput = SaveToFile.printOut(temp, type, false);\n\t\t\tfileToPrint = \"Shopping.txt\";\n\t\t\tbreak;\n\t\t}\n\n\t\tif (output) {\n\t\t\tlog.debug(type.name() + \" Successfully Saved PrintFile\");\n\t\t\tFile file = new File(System.getProperty(\"user.home\") + \"/Desktop/\" + fileToPrint);\n\n\t\t\tif (file != null) {\n\t\t\t\tboolean printOut = Printing.printFile(file);\n\n\t\t\t\tif (printOut) {\n\t\t\t\t\tlog.debug(\"Successfully printed File\");\n\t\t\t\t\tAlert alert = Alerter.getAlert(AlertType.INFORMATION, \"Print\", null, \"Successfully printed.\");\n\t\t\t\t\talert.showAndWait();\n\t\t\t\t} else {\n\t\t\t\t\tlog.debug(\"File was saved but could not be printed\");\n\t\t\t\t\tAlert alert = Alerter.getAlert(AlertType.INFORMATION, \"Print Failed\", null,\n\t\t\t\t\t\t\t\"File saved but could not be printed.\");\n\t\t\t\t\talert.showAndWait();\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tAlert alert = Alerter.getAlert(AlertType.INFORMATION, \"Error\", null,\n\t\t\t\t\t\"File could not be saved and printed.\");\n\t\t\talert.showAndWait();\n\t\t\tlog.debug(type.name() + \"PrintFile could NOT be saved and printed\");\n\t\t}\n\t}", "public void print() {\n\t\tSystem.out.println(\"ONOMA IDIOKTITH: \" + fname);\n\t\tSystem.out.println(\"EPWNYMO IDIOKTITH: \" + lname);\n\t\tSystem.out.println(\"DIEUTHINSH FARMAKEIOU: \" + address);\n\t\tSystem.out.println(\"THLEFWNO FARMAKEIOU: \" + telephone);\n\t\tSystem.out.println();\n\t}", "public static void main (String[] args){\n Printer printer = new Printer();\n printer.print();\n }", "public void print() {\n\t\tPrinter.print(doPrint());\n\t}", "public void print();", "public void print();", "public void print();", "public void print();", "public void printListOfFile(List<File> listToPrint) {\n\t\tthis.showNamedMessage(\"List of files:\");\n\t\tfor (int i = 0; i < listToPrint.size(); i++) {\n\t\t\tthis.showNamedMessage(\"[\" + i + \"]: \" + listToPrint.get(i));\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e){\n if (e.getSource() instanceof JButton) {\r\n PrinterJob printJob = PrinterJob.getPrinterJob();\r\n PageFormat pf = new PageFormat();\r\n pf.setOrientation(PageFormat.LANDSCAPE);\r\n printJob.setPrintable(_instance, pf);\r\n //if (printJob.printDialog()) {\r\n try {\r\n printJob.print();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n //}\r\n }\r\n }", "public void printDataToFile(){\n\ttry {\n\t File file = new File(\"media/gameOutput.txt\");\n \n\t // if file doesnt exists, then create it\n\t if (!file.exists()) {\n\t\tfile.createNewFile();\n\t }\n \n\t FileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t BufferedWriter bw = new BufferedWriter(fw);\n\t bw.write(printString);\n\t bw.close();\n\t} catch (IOException e) {\n\t e.printStackTrace();\n\t}\n }", "void printFleet(ConsolePrinter printer);", "private static void print(String p) {\n\t\tSystem.out.println(PREFIX + p);\n\t}", "public void startPrinting()\n {\n printerSimulator.startPrintingProcess();\n }", "public void writePlayerFile(String fileName)\r\n\t{\r\n\t\tPrintWriter fileWrite;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfileWrite = new PrintWriter(new FileOutputStream(fileName));\r\n\t\t\tfileWrite.println(\"Name \" + name);\r\n\t\t\tfileWrite.println(\"HP \" + hp);\r\n\t\t\tfileWrite.println(\"Strength \" + strength);\r\n\t\t\tfileWrite.println(\"Speed \" + speed);\r\n\t\t\tfileWrite.println(\"Weapon \" + weapon);\r\n\t\t\tfileWrite.close();\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "private static void _printResource (final String filename)\n {\n try\n {\n // find the file resource\n final InputStream is = Main.class.getResourceAsStream (filename);\n if (is == null)\n throw new java.io.FileNotFoundException (filename);\n final BufferedReader br = new BufferedReader (new InputStreamReader (is));\n boolean doOutput = true;\n String line;\n while ((line = br.readLine ()) != null)\n {\n if (line.startsWith (\"@@@ \"))\n {\n // special control line\n if (line.equals (\"@@@ START DEBUG ONLY\"))\n doOutput = CSTX.DEBUG;\n else\n if (line.equals (\"@@@ END DEBUG ONLY\"))\n doOutput = true;\n // else: ignore\n continue;\n }\n if (doOutput)\n System.err.println (line);\n }\n System.err.println (\"\");\n }\n catch (final IOException ex)\n {\n log.error (\"Exception\", ex);\n }\n }", "public static void printPostscript( Printable printable, boolean eps,\n PrintRequestAttributeSet pageSet,\n Rectangle bounds, String fileName )\n throws SplatException\n {\n if ( eps ) {\n try {\n BufferedOutputStream ostrm =\n new BufferedOutputStream( new FileOutputStream(fileName) );\n EpsGraphics2D g2 =\n new EpsGraphics2D( fileName, ostrm,\n bounds.x, bounds.y,\n bounds.x + bounds.width,\n bounds.y + bounds.height );\n printable.print( g2, null, 0 );\n g2.close();\n }\n catch (Exception e) {\n throw new SplatException( e );\n }\n }\n else {\n PrintService service =\n PrintUtilities.getPostscriptPrintService( fileName );\n if ( service != null ) {\n try {\n PrinterJob pj = PrinterJob.getPrinterJob();\n pj.setPrintService( service );\n pj.setPrintable( printable );\n if ( pj.printDialog( pageSet ) ) {\n pj.print( pageSet );\n StreamPrintService sps = (StreamPrintService) service;\n sps.dispose();\n sps.getOutputStream().close();\n }\n }\n catch ( PrinterException e ) {\n throw new SplatException( e );\n }\n catch ( IOException e ) {\n throw new SplatException( e );\n }\n }\n else {\n // Report there are no printers available.\n throw new SplatException( \"Sorry no printers are available\" );\n }\n }\n }", "public void exePRINT()\n\t{\n\t\tif(!vldDATA())\n\t\t\treturn;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tstrFILNM = cl_dat.M_strREPSTR_pbst+\"mr_rpexd.html\";\n\t\t\telse\n\t\t\t\tstrFILNM = cl_dat.M_strREPSTR_pbst+\"mr_rpexd.doc\";\n\n\t\t\tgetDATA();\n\t\t\t\n\t\t/*\tif(intRECCT == 0)\n\t\t\t{\t\n\t\t\t\tsetMSG(\"No Data found..\",'E');\n\t\t\t\treturn;\n\t\t\t}*/\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst))\n\t\t\t{\t\t\t\t\t\n\t\t\t\tif (M_rdbTEXT.isSelected())\n\t\t\t\t doPRINT(strFILNM);\n\t\t\t\telse \n\t\t\t\t{ \n\t\t\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\t\t\tProcess p = null;\t\t\t\t\t\n\t\t\t\t\tp = r.exec(\"c:\\\\windows\\\\iexplore.exe \"+strFILNM); \n\t\t\t\t\tsetMSG(\"For Printing Select File Menu, then Print ..\",'N');\n\t\t\t\t} \n\t\t\t}\n\t\t\telse if(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPSCN_pbst))\n\t\t\t{\n\t\t\t Runtime r = Runtime.getRuntime();\n\t\t\t\tProcess p = null;\n\t\t\t\t\t\n\t\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\t p = r.exec(\"c:\\\\windows\\\\iexplore.exe \"+strFILNM); \n\t\t\t\telse\n\t\t\t\t p = r.exec(\"c:\\\\windows\\\\wordpad.exe \"+strFILNM);\n\t\t\t}\n\t\t\telse if(cl_dat.M_cmbDESTN_pbst.getSelectedItem().toString().trim().equals(cl_dat.M_OPEML_pbst))\n\t\t\t{\t\t\t\n\t\t\t\tcl_eml ocl_eml = new cl_eml();\t\t\t\t \n\t\t\t for(int i=0;i<M_cmbDESTN.getItemCount();i++)\n\t\t\t {\n\t\t\t\t ocl_eml.sendfile(M_cmbDESTN.getItemAt(i).toString().trim(),strFILNM,\"Export Certificate\",\" \");\n\t\t\t\t setMSG(\"File Sent to \" + M_cmbDESTN.getItemAt(i).toString().trim() + \" Successfuly \",'N');\t\t\t\t \n\t\t\t\t}\t\t\t\t \t \t\n\t\t\t}\n\t\t}\n\t\tcatch(Exception L_EX)\n\t\t{\n\t\t\tsetMSG(L_EX,\"exePRINT\");\n\t\t}\t\t\n\t}", "@Override\n\tpublic void print() {\n\t\t\n\t}", "public void printFileOnconsole(File file, int tabs,int lenghtOfDirectory) throws DirectoryException{\r\n\t\tSystem.out.println(\"file ->\" + file);\r\n\t\tString fileName = file.getName();\r\n\t\tString[] split = fileName.split(HelperContstants.DELIMETER);\r\n\t\tfor (int i = 0; i < tabs; i++) {\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.println(\"- Document: \" + file.getName() + \" - Extension: .\" + split[split.length - 1] + \" - URL: \"\r\n\t\t\t\t+ file.getAbsolutePath().substring(lenghtOfDirectory));\r\n\t}", "@VisibleForTesting\n void print();", "public void printer() throws Exception{\n File outputFile = new File(\"output.txt\");\n FileOutputStream is = new FileOutputStream(outputFile);\n OutputStreamWriter osw = new OutputStreamWriter(is);\n Writer w = new BufferedWriter(osw);\n w.write(this.result());\n w.close();\n }", "public void printFile(String fileName)\n {\n try\n {\n //takes the output string and writes it in a new file\n //called output.txt\n FileOutputStream out = new FileOutputStream(\n new File(fileName), true);\n out.write(logImage.getBytes());\n out.flush();\n out.close(); \n }\n //catches all exceptions from writing into the .txt\n catch(Exception e)\n {\n System.out.println(\"There was an error while writing into file\");\n }\n }", "private void handleActionIppPrint(String filePath, String jobName, String connectionTypeString, String printerIp, int printerPort, String printerUri) {\n this.jobName = jobName;\n this.filePath = filePath;\n this.printerAddress = printerIp;\n this.printerPort = printerPort;\n this.printerUri = printerUri;\n if (connectionTypeString.equals(\"https\")) {\n this.connectionType = HTTPS;\n } else {\n this.connectionType = HTTP;\n }\n\n Log.i(LOG_TAG, \"doTheTask\");\n try {\n printJobData = loadFile();\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"Can't load this file. What sorcery is this?\");\n }\n\n if (printJobData == null) {\n Log.e(LOG_TAG, \"printJobData == null\");\n return;\n }\n if (connectionType == HTTPS)\n setTrustedCertificates();\n\n HttpURLConnection connection = prepareConnection();\n if (connection == null) {\n Log.e(LOG_TAG, \"Couldn't create connection\");\n } else {\n setConnectionData(connection);\n int response = sendJob(connection);\n Log.i(LOG_TAG, \"Response code: \" + response);\n }\n return;\n }", "public static void startActionPrintIpp(Context context, String filePath, String jobName, String connectionType, String printerIp, int printerPort, String printerUri) {\n Intent intent = new Intent(context, PrintingService.class);\n intent.setAction(IPP_PRINT);\n intent.putExtra(FILE_PATH, filePath);\n intent.putExtra(JOB_NAME, jobName);\n intent.putExtra(CONNECTION_TYPE, connectionType);\n intent.putExtra(PRINTER_ADDRES, printerIp);\n intent.putExtra(PRINTER_PORT, printerPort);\n intent.putExtra(PRINTER_URI, printerUri);\n context.startService(intent);\n }", "public void printAction() {\n this.folderList.get(currentFolder).printIt();\n }", "void print(String fileName)\n\t{\n\t\t//Print the elements and also write them into a file if the array is initialized\n\t\tif(inputArray != null)\n\t\t{\n\t\t\ttry \n\t\t\t{\n\t\t\t\t//Create a file output.txt\n\t\t\t\tPrintWriter writer = new PrintWriter(fileName);\n\t\t\t\tfor(int i=0; i < inputArray.length; i++)\n\t\t\t\t{\n\t\t\t\t\t//Print the elements and also write them into a file\n\t\t\t\t\tSystem.out.print(inputArray[i] + \" \");\n\t\t\t\t\twriter.print(inputArray[i] + \" \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Close the file\n\t\t\t\twriter.close();\n\t\t\t} \n\t\t\tcatch (FileNotFoundException e) \n\t\t\t{\n\t\t\t\t//Printing the Stack Trace if an exception has occurred\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}", "public Object getPrinter(PageFormat pf);", "public static void main (String[] args)\n {\n PrinterJob job = PrinterJob.getPrinterJob();\n\n // It is first called to tell it what object will print each page.\n job.setPrintable(new PrintObject());\n\n // Then it is called to display the standard print options dialog.\n if (job.printDialog())\n {\n // If the user has pressed OK (printDialog returns true), then go\n // ahead with the printing. This is started by the simple call to\n // the job print() method. When it runs, it calls the page print\n // object for page index 0. Then page index 1, 2, and so on\n // until NO_SUCH_PAGE is returned.\n try { job.print(); }\n catch (PrinterException e) { System.out.println(e); }\n }\n }", "@Override\n\tpublic void print() {\n\n\t}", "public void printReport(AhpModel model, double criticalCr, String fileName) {\n this.criticalCr = criticalCr;\n\n //create reportContent object by transforming the model data with the ReportContentBuilder \n ReportContentBuilder reportContentBuilder = new ReportContentBuilder();\n ReportContent reportContent = reportContentBuilder\n .getReportContentFromAhpModel(model);\n \n //create template and export it \n createTemplate(reportContent, fileName);\n\n //launch the exported file (with an installed PDF reader)\n Program.launch(fileName);\n\n }", "private static void startDiagram(String nameOfDiagram, PrintWriter printFile) {\n\t\tprintFile.print(\"digraph \" + nameOfDiagram + \"{\\nrankdir=BT\\n\");\n\t}", "@Override\r\n\tpublic void print() {\n\t}", "public static void closePrintWriter(File file, PrintWriter printWriter)\n {\n if (file == Configuration.STD_OUT)\n {\n printWriter.flush();\n }\n else\n {\n printWriter.close();\n }\n }", "public void printCard(String name, String number, String age, String grade, \n\t\t\tString country, String bio, String filepath) {\n\t\tPDFCreator p = new PDFCreator(name,number,age,grade,country,bio,filepath);\n\t}", "@Override\n\tpublic void print() {\n\t\tdecoratedPrinter.print();\n\t}", "public void printData() {\n\t\ttry {\n\t\t\tFiles.lines(new File(PAYROLL_FILE_NAME).toPath())\n\t\t\t.forEach(System.out::println); \n\t\t}catch(IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void print()\n {\n System.out.println();\n System.out.println(\"Ticket to \" + destination +\n \" Price : \" + price + \" pence \" + \n \" Issued \" + issueDateTime);\n System.out.println();\n }", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "void printBattle(ConsolePrinter printer);", "public void print(String line);", "@Override\n\t\tpublic void print() {\n\n\t\t}", "protected void printIP_Port(){\n\t\tFile iP_PortFile = new File(System.getProperty(\"user.dir\")+\"/IP_and_Port.txt\");\n\n\t\t\ttry{\n\t\t\t\tif(!iP_PortFile.exists()){\n\t\t\t\t\tiP_PortFile.createNewFile();\n\t\t\t\t}\n\t\t\t\tFileWriter fstreamsuper = new FileWriter(iP_PortFile);\n\t\t\t\tBufferedWriter outIP = new BufferedWriter(fstreamsuper);\n\n\n\t\t\t\toutIP.write(getIP());\n\t\t\t\toutIP.newLine();\n\t\t\t\toutIP.write(port);\n\n\t\t\t\toutIP.close();\n\t\t\t}catch(IOException e){\n\t\t\t\tSystem.out.println(\"File error creating IP_port file\");\n\t\t\t}\n\n\t}", "public void print() {\n DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;\n \n //Aca obtenemos el servicio de impresion por default\n //Si no quieres ver el dialogo de seleccionar impresora usa esto\n //PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n \n \n //Con esto mostramos el dialogo para seleccionar impresora\n //Si quieres ver el dialogo de seleccionar impresora usalo\n //Solo mostrara las impresoras que soporte arreglo de bits\n PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();\n PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);\n PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n PrintService service = ServiceUI.printDialog(null, 700, 200, printService, defaultService, flavor, pras);\n \n //Creamos un arreglo de tipo byte\n byte[] bytes;\n\n //Aca convertimos el string(cuerpo del ticket) a bytes tal como\n //lo maneja la impresora(mas bien ticketera :p)\n bytes = this.contenidoFactura.getBytes();\n //Creamos un documento a imprimir, a el se le appendeara\n //el arreglo de bytes\n Doc doc = new SimpleDoc(bytes,flavor,null);\n \n //Creamos un trabajo de impresión\n DocPrintJob job = service.createPrintJob();\n\n //Imprimimos dentro de un try de a huevo\n try {\n //El metodo print imprime\n job.print(doc, null);\n \n } catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n DocPrintJob cutjob = service.createPrintJob();\n DocPrintJob spacejob = service.createPrintJob();\n //dejando espacios al final\n byte[] espacio = (\"\\n \\n \\n \\n\").getBytes();\n try{\n spacejob.print(new SimpleDoc(espacio,flavor,null),null);\n }\n catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n //cortando el papel\n try{\n byte[] cutP = new byte[] { 0x1d, 'V', 1 };\n cutjob.print(new SimpleDoc(cutP,flavor,null),null); \n }catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n \n }", "public void doPrint() {\n\n PrintingUtils.userPrintText(fDocument.getText(),\n fTextPanel.getDefaultValues(),\n this,\n this.getTitle());\n }", "public static void printOut(Talkable p) {\n System.out.println(p.getName() + \" says=\" + p.talk());\n outFile.fileWrite(p.getName() + \"|\" + p.talk());\n }", "public final void print() throws RecognitionException {\n\t\tToken STRING1=null;\n\n\t\ttry {\n\t\t\t// C:\\\\Master in CS\\\\sem1\\\\APL\\\\Lab\\\\APL-Lab\\\\lab4\\\\grammerLab4.g:10:7: ( 'PRINT' STRING )\n\t\t\t// C:\\\\Master in CS\\\\sem1\\\\APL\\\\Lab\\\\APL-Lab\\\\lab4\\\\grammerLab4.g:10:9: 'PRINT' STRING\n\t\t\t{\n\t\t\tmatch(input,16,FOLLOW_16_in_print44); \n\t\t\tSTRING1=(Token)match(input,STRING,FOLLOW_STRING_in_print46); \n\t\t\tSystem.out.print((STRING1!=null?STRING1.getText():null));\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public static void fileWriterPrinter(String printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(Common.testOutputFileDir + \"print.log\");\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t // System Out Print Line:\n\t\t\t // if (printLine instanceof String) {}\n\t\t\t // if (printLine instanceof Integer) {}\n\t\t\t // if (printLine instanceof Long) {}\n\t\t\t // if (printLine instanceof Boolean) {}\n\t\t\t // if (printLine instanceof Double) {}\n\t\t\t System.out.print(printLine + \"\\n\");\t\t \n\t\t\t}", "private static void printToString(Printable p) {\n\t\tp.print();\n\t}", "public void actionPerformed(ActionEvent e) {\r\n final PrintPreview pp = new PrintPreview();\r\n final JEditorPane ep = new JEditorPane();\r\n final JFrame f = new JFrame(\"Print Preview\");\r\n ep.setEditable(false);\r\n ep.setText(getManager().getTabFolder().getSelection().getText());\r\n\r\n Font.decode(PreferenceStore.getString(Preference.FONT));\r\n f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\r\n f.setSize(800, 600);\r\n f.add(new JScrollPane(ep));\r\n f.setVisible(true);\r\n pp.showPreview(ep);\r\n f.dispose();\r\n \r\n }", "public static void printLocalFileFromPath(String filePath) {\n\t\ttry {\n\n\t\t\tFile file = new File(filePath);\n\t\t\tprintFile(file);\n\n\t\t} catch (Throwable t) {\n\t\t\tt.printStackTrace();\n\t\t}\n\t}", "void print();", "void print();", "void print();", "void print();", "void print();", "public void recordOrder(){\n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){//throws exception\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Coffee);//prints in file contents of Coffee\n output.close();//closes file\n }", "public String print();", "public void goToPrinterSection(){\n click(By.name(printerTab));\n }", "public static void print(Printer<? extends ICartridge> printer) {\n\t\tint fillPercentage = printer.getCartridge().getFillPercentage(); // Error\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// without\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// generics\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// (i.e.,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Printer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// printer)\n\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// method\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// getFillPercentage()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// undefined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// type\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Object\n\t\tSystem.out.println(\"Fill percentage is : \" + fillPercentage);\n\t}", "public void print () {\n }", "void PrintOnScreen(String toPrnt);", "private void myPrint(String x) {\n if (printOn) {\n System.out.println(x);\n }\n }", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "private void printPDF(PrintDocument printDocument) throws PrinterException, IOException {\n logger.debug(\"printPDF::\" + printDocument);\n\n String filename = DocumentService.getFileFromUrl(printDocument.getUrl()).getPath();\n\n long timeStart = System.currentTimeMillis();\n\n DocPrintJob docPrintJob = getDocPrintJob(printDocument.getType());\n\n PrinterJob job = PrinterJob.getPrinterJob();\n job.setPrintService(docPrintJob.getPrintService());\n\n PageFormat pageFormat = getPageFormat(job);\n\n PDDocument document = null;\n try {\n document = PDDocument.load(new File(filename));\n\n Book book = new Book();\n for (int i = 0; i < document.getNumberOfPages(); i += 1) {\n // Rotate Page Automatically\n\n PageFormat eachPageFormat = (PageFormat) pageFormat.clone();\n\n if (settingService.getSetting().getAutoRotation()) {\n if (document.getPage(i).getCropBox().getWidth() > document.getPage(i).getCropBox().getHeight()) {\n logger.debug(\"Auto rotation result: LANDSCAPE\");\n eachPageFormat.setOrientation(PageFormat.LANDSCAPE);\n } else {\n logger.debug(\"Auto rotation result: PORTRAIT\");\n eachPageFormat.setOrientation(PageFormat.PORTRAIT);\n }\n }\n\n AnnotatedPrintable printable = new AnnotatedPrintable(new PDFPrintable(document, Scaling.SHRINK_TO_FIT, false, settingService.getSetting().getPrinterDPI()));\n\n for (AnnotatedPrintable.AnnotatedPrintableAnnotation printDocumentExtra : printDocument.getExtras()) {\n printable.addAnnotation(printDocumentExtra);\n }\n book.append(printable, eachPageFormat);\n }\n\n job.setPageable(book);\n job.setJobName(\"WebApp Hardware Bridge PDF\");\n job.setCopies(printDocument.getQty());\n job.print();\n\n long timeFinish = System.currentTimeMillis();\n logger.info(\"Document \" + filename + \" printed in \" + (timeFinish - timeStart) + \"ms\");\n } finally {\n if (document != null) {\n try {\n document.close();\n } catch (Exception e) {\n }\n }\n }\n }", "public static void println(String toPrint)\n {\n System.out.println(toPrint);\n }", "@Override\n public void run() {\n printfManager.openPrinter(alreadyBlueList.get(args));\n }", "@Override\r\n\tpublic void setPrinter(IPrinter printer) {\n\r\n\t}", "public void print() {\n btprint(c);\n }", "public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "public static void fileWriterPrinter(Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(Common.testOutputFileDir + \"print.log\");\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t // System Out Print Line:\n\t\t\t // if (printLine instanceof String) {}\n\t\t\t // if (printLine instanceof Integer) {}\n\t\t\t // if (printLine instanceof Long) {}\n\t\t\t // if (printLine instanceof Boolean) {}\n\t\t\t // if (printLine instanceof Double) {}\n\t\t\t System.out.print(printLine + \"\\n\");\t\t \n\t\t\t}", "public void printArrayOfFile(File[] arrayToPrint) {\n\t\tthis.showNamedMessage(\"List of files:\");\n\t\tfor (int i = 0; i < arrayToPrint.length; i++) {\n\t\t\tthis.showNamedMessage(\"[\" + i + \"]: \" + arrayToPrint[i]);\n\t\t}\n\t}" ]
[ "0.72967017", "0.7263155", "0.67796093", "0.6748892", "0.6559939", "0.643107", "0.6337168", "0.6332935", "0.6265053", "0.6255915", "0.62507284", "0.61642814", "0.61582726", "0.61327034", "0.6130371", "0.6063444", "0.6056333", "0.60505605", "0.60309505", "0.6029211", "0.59081036", "0.59034795", "0.58616793", "0.58396083", "0.5830591", "0.58233184", "0.57937396", "0.5791168", "0.5790839", "0.5773025", "0.5756777", "0.5738407", "0.5736813", "0.5736813", "0.5736813", "0.5736813", "0.57031274", "0.5699481", "0.56991667", "0.56929415", "0.5684826", "0.56846404", "0.5666138", "0.565697", "0.56511486", "0.56495297", "0.5647753", "0.564227", "0.56314665", "0.56268317", "0.56249535", "0.5624531", "0.5607755", "0.5597638", "0.5595251", "0.55903745", "0.55823165", "0.5581145", "0.5560005", "0.55577856", "0.555498", "0.5544254", "0.554366", "0.5527861", "0.5498598", "0.54923683", "0.54872453", "0.5478134", "0.5473419", "0.54613185", "0.5457263", "0.5456492", "0.5445025", "0.5434917", "0.5433665", "0.542983", "0.5426773", "0.54262733", "0.54249614", "0.54242873", "0.54242873", "0.54242873", "0.54242873", "0.54242873", "0.5422105", "0.5417399", "0.53966755", "0.538284", "0.53818154", "0.5377915", "0.5368873", "0.5364559", "0.53527635", "0.5350414", "0.5347695", "0.5346381", "0.5343488", "0.53431743", "0.53379714", "0.53281903", "0.53254336" ]
0.0
-1
Lists the print queue on the user's display in lines of the form
void topQueue(int job, SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void display() {\n System.out.println();\t \n System.out.println(\"Contents of the queue are: \" + queue);\n }", "public void printQueue();", "private void print() {\n\t\t// reorganize a wraparound queue and print\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(bq[(head + i) % bq.length] + \" \");\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t}", "public void printProcessQueue()\n\t{\n\t\tProcesses.print();\n\t}", "@Override\r\n\tpublic void Display() {\n\t\t System.out.print(\"\\nQueue = \");\r\n\t if (len == 0)\r\n\t {\r\n\t System.out.print(\"Empty\\n\");\r\n\t return ;\r\n\t }\r\n\t for (int i = front; i <= rear; i++)\r\n\t System.out.print(queue[i]+\" \");\r\n\t System.out.println(); \r\n\t\t\r\n\t}", "public void display() {\n\t\tSystem.out.println(\"Queue display\");\n\t\tint maxi = (front < rear) ? rear : (rear + MAX_QUEUE_SIZE);\n\t\tfor (int i = front + 1; i <= maxi; i++) {\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}", "void printqueue()\n\t{\n\t\tint i;\n\t\tif(!isEmpty())\n\t\t{\n\t\t\tfor(i=front;i<=rear;i++)\n\t\t\t\tSystem.out.print(queue[i]+\" \");\n\t\t\tSystem.out.println();\n\n\t\t}\n\t}", "public void print(){\n System.out.print(\"Current Queue: \");\n for (int i = 1; l <= myHeap.getLength(); i++){\n \tSystem.out.printf(\"%s\", myHeap.getArray()[i]);\n \tif (i < myHeap.getLength()){\n \t\tSystem.out.print(\",\");\n \t}\n }\n\n System.out.println();\n }", "public void printQueue() {\n \t\n \tif(this.front == null) {\t\n \t\tSystem.out.println(\"Queue Empty!!\");\n \t\treturn;\n \t}\n \t\n \twhile(this.front != null) {\n \t\tSystem.out.print(\"(\"+this.front.data+ \") \");\n \t\tthis.front = this.front.next;\n \t}\n }", "public void display(){\n for(int i = 0;i < n_items;++i){\n System.out.print(queue_array[(i + front) % max_size] + \" \");\n }\n System.out.println();\n }", "public void printList() {\n\t\t//sort alphabetically\n\t\tCollections.sort(listStr); \n\t\t//cast the array list to a linked list\n\t\tLinkedList<Object> linkedString = new LinkedList<Object>(listStr);\n \t//while there is something in the LinkedList, run following code\n \twhile (linkedString.size() > 0) {\n \t\t//print out the current first in \"queue\" word\n \t\tSystem.out.print(linkedString.get(0) + \" \");\n \t\t//remove the first item in the linked list\n \t \t\tlinkedString.removeFirst();\n \t}\n \t//print out a new blank line for better readability\n \tSystem.out.println(\"\\n\");\n\t}", "protected void printQueue()\r\n\t{\r\n\t\tint south = 1;\r\n\t\tint west = 2;\r\n\t\tint midwest = 3;\r\n\t\t\r\n\t\tgetPriorityHeader(south);\r\n\t\tSystem.out.println(State.getHeader());\r\n\t\tdisplaySouth();\r\n\t\t\r\n\t\tgetPriorityHeader(west);\r\n\t\tSystem.out.println(State.getHeader());\r\n\t\tdisplayWest();\r\n\t\t\r\n\t\tgetPriorityHeader(midwest);\r\n\t\tSystem.out.println(State.getHeader());\r\n\t\tdisplayMidwest();\r\n\t}", "public void printQueue() {\n\t\tcurrent = front;\n\n\t\tif (isEmpty()) {\n\t\t\tSystem.out.println(\"The queue is empty.\");\n\t\t}\n\t\twhile (current.next != null) {\n\t\t\tSystem.out.println(current.data);\n\t\t\tcurrent = current.next;\n\t\t}\n\t}", "public void printQueue() {\r\n\t\tNode current = head; //Instantiated node which will cycle through\r\n\t\tfor(int i = 0; i < size; i++) { //While the current instantiated node isn't null (meaning thats it's in the list), increment through the list and print the data\r\n\t\t\tSystem.out.print(current.data + \"[\" +current.index+ \"] \");\r\n\t\t\tcurrent = current.next;\r\n\t\t}\r\n\t\tif(head == null) System.out.println(\"THE QUEUE IS EMPTY!\");\r\n\t\tSystem.out.println(\"\\n\");\r\n\t}", "public static void printList(){\n ui.showToUser(ui.DIVIDER, \"Here are the tasks in your list:\");\n for (int i=0; i<Tasks.size(); ++i){\n Task task = Tasks.get(i);\n Integer taskNumber = i+1;\n ui.showToUser(taskNumber + \".\" + task.toString());\n }\n ui.showToUser(ui.DIVIDER);\n }", "public void display()\n\t{\n\t\tif(isEmpty())\n\t\t{\n\t\t\tSystem.out.println(\"Queue is empty\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Queue is : \");\n\t\t\n\t\tint i=front;\n\t\tif(front<=rear)\n\t\t{\n//\t\t\tprints all elements from front to rear\n\t\t\twhile(i<=rear)\n\t\t\t\tSystem.out.println(queueArray[i++] + \" \");\n\t\t}\n\t\telse\n\t\t{\n//\t\t\tdisplay all elements from front to last index of array\n\t\t\twhile(i<=queueArray.length-1)\n\t\t\t\tSystem.out.println(queueArray[i++] + \" \");\n\t\t\ti=0;\n//\t\t\tthen display all the elements from index 0 to rear\n\t\t\twhile(i<=rear)\n\t\t\t\tSystem.out.println(queueArray[i++] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void print() {\r\n\t\tSystem.out.print(\"|\");\r\n\t\t//loop executes until all elements of the list are printed\r\n\t\tfor (int i=0;i<capacity;i++) {\r\n\t\t\tSystem.out.print(list[i]+\" |\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void print() {\n for (int i=0; i<lines.size(); i++)\n {\n System.out.println(lines.get(i));\n }\n }", "public void print() {\n\t\tString sqlList = \"select * from commodity;\";\n\t\tcommodityBuffer = new StringBuffer();\n\t\ttry {\n\t\t\tconnection = SQLConnect.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(sqlList);\n\n\t\t\t// put the commodity messages into a stringbuffer\n\t\t\twhile ( resultSet.next() ) {\n\t\t\t\tcommodityBuffer.append(resultSet.getString(\"number\")+\" - \"+resultSet.getString(\"name\")+\"\\n\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// show the commodity messages on window\n\t\tcommodityArea = new JTextArea(commodityBuffer.toString());\n\t}", "public void print()\n {\n System.out.println();\n System.out.println(\"Ticket to \" + destination +\n \" Price : \" + price + \" pence \" + \n \" Issued \" + issueDateTime);\n System.out.println();\n }", "public void print(String toPrint) {\n for (Printer print : printers) {\n// System.out.println(\"Start \" + print.busyEndTime);\n if (print.isAvailable()) {\n System.out.println(\"Printer \" + print.id + \" is available to print: \" + toPrint);\n }\n print.busyEndTime = LocalTime.now().plusSeconds(5);\n// System.out.println(\"End \" + print.busyEndTime);\n }\n // Its not needed to actually print with a printer in this exercise\n// System.out.println(\"Printer \" + id + \" is printing.\");\n// busyEndTime = LocalTime.now().plusSeconds(5);\n }", "public void print() {\n for (Entry entry : listentries) {\n System.out.println(\"These are the tasks currently on your lists:\");\n System.out.println(\"Name of Task:\" + entry.getName());\n System.out.println(\"Status:\" + entry.getStatus());\n System.out.println(\"Due Date:\" + entry.getDueDate());\n System.out.println(\"Days Left To do Tasks:\" + entry.getDaysLeft());\n }\n }", "private void actionPrint() {\n // get PrinterJob\n PrinterJob job = PrinterJob.getPrinterJob();\n MyPrintable printable = new MyPrintable(job.defaultPage(), layoutPanel);\n\n // setup Printable, Pageable\n job.setPrintable(printable);\n job.setPageable(printable);\n\n // display print dialog and print\n if (job.printDialog()) {\n try {\n job.print();\n } catch (PrinterException e) {\n e.printStackTrace();\n }\n }\n }", "public static void print() {\r\n\t\tSystem.out.println(\"1: Push\");\r\n\t\tSystem.out.println(\"2: Pop\");\r\n\t\tSystem.out.println(\"3: Peek\");\r\n\t\tSystem.out.println(\"4: Get size\");\r\n\t\tSystem.out.println(\"5: Check if empty\");\r\n\t\tSystem.out.println(\"6: Exit\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t}", "public void Display() {\n\t\tSystem.out.println(Integer.toHexString(PID) + \"\\t\" + Integer.toString(CreationTime) + \"\\t\"+ Integer.toHexString(CommandCounter) + \"\\t\" + ProcessStatus.toString() \n\t\t+ \"\\t\" + Integer.toString(MemoryVolume) + \"\\t\" + Integer.toHexString(Priority) + \"\\t\" + ((MemorySegments != null)? MemorySegments.toString() : \"null\"));\n\t}", "Collection<QueuedPrintJob> getQueue();", "public void print() {\n int n = getSeq().size();\n int m = n / printLength;\n for (int i = 0; i < m; i++) {\n printLine(i * printLength, printLength);\n }\n printLine(n - n % printLength, n % printLength);\n System.out.println();\n }", "public static void printContentsOfQ(PrintWriter writer, Queue Q){\r\n for(int i = 0; i<Q.length(); i++){\r\n writer.print(Q.peek(i)+ \" \");\r\n }\r\n }", "void print() {\n for (Process process : workload) {\n System.out.println(process);\n }\n }", "public void showRRQueue()\n {\n boolean goodTogo = true;\n SimProcess p;\n while(goodTogo)\n {\n //Retreive the element from the queue and display it with its arrival time and process number\n try\n {\n p = rrQueue.remove();\n System.out.println(\"Arrival Time: \" + p.getArrivalTime() + \" , Process#: \" + p.getProcessNumber());\n }\n catch(NoSuchElementException e)\n {\n goodTogo = false;\n }\n }\n }", "public void actionPerformed(ActionEvent e) {\n \t\tPrinterJob job = PrinterJob.getPrinterJob();\n \t\tjob.setPrintable(this);\n \t\tboolean ok = job.printDialog();\n \t\tif (ok) {\n \t\t\ttry {\n \t\t\t\tjob.print();\n \t\t\t} catch (PrinterException ex) {\n \t\t\t\t/* The job did not successfully complete */\n \t\t\t}\n \t\t}\n \n \t}", "void updateDisplay()\r\n {\r\n\tCustomerNode temp = q.front();\r\n\tint i = 0;\r\n\r\n\tdisplayArea.setText(\"\");\r\n\t\r\n\tif (q.isEmpty())\r\n\t{\r\n displayArea.setText(\"Nobody waiting...\\n\");\r\n\t}\r\n\telse\r\n\t{\r\n do\r\n {\r\n displayArea.append(\"\" + ++i + \": \" + temp.getName()\r\n + \" \" + temp.getPhone() + \"\\n\");\r\n //temp = q.getNext(temp);\r\n temp = temp.getNext();\r\n }\r\n while (temp != null);\r\n\t}\r\n }", "public void printDeque() {\n for (int index = 0; index < size; index++) {\n System.out.print(get(index) + \" \");\n }\n System.out.println(\"\\n\");\n\n }", "public static void printMenu(){\n System.out.print(\"1. List all writing groups\\n\" +\n \"2. List all the data for one writing group\\n\"+\n \"3. List all publishers\\n\"+\n \"4. List all the data for one publisher\\n\"+\n \"5. List all books\\n\"+\n \"6. List all the data for one book\\n\"+\n \"7. Insert new book\\n\"+\n \"8. Insert new publisher\\n\"+\n \"9. Remove a book\\n\"+\n \"10. Quit\\n\\n\");\n }", "void printPlaylistMenu(){\n\t\tSystem.out.println(\"\\n\\nPlaylist Menu:\");\n\t\tSystem.out.println(\"1. Delete Song: delete <song id>\");\n\t\tSystem.out.println(\"2. Insert Song: insert <song id>\");\n\t\tSystem.out.println(\"3. Search and Insert Song: insert_search title/artist <string of words to be searched>\");\n\t\tSystem.out.println(\"4. Print Playlist: print\");\n\t\tSystem.out.println(\"5. Sort songs: sort artist/title\");\n\t\tSystem.out.println(\"6. Search Song: search artist/title <string of words to be searched>\");\n\t\tSystem.out.println(\"7. Main Menu: main\");\n\t\tSystem.out.print(\"Enter a Command : \");\n\t}", "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 void printList() {\n userListCtrl.showAll();\n }", "public void print()\n {\n for (int i=0; i<list.length; i++)\n System.out.println(i + \":\\t\" + list[i]);\n }", "public static void print()\n {\n ProductGUI.Display(\"\\n\");\n for(Product element: productList)\n {\n ProductGUI.Display(\"\\n\");\n System.out.println(element);\n ProductGUI.Display(element.toString());\n }\n }", "public void printQuestions()\r\n\t{\r\n\t\tfor(int i = 0; i < questions.size(); i++)\r\n\t\t{\r\n\t\t\tString q = questions.get(i).toString();\r\n\t\t\tSystem.out.println( (i+1) + \". \" + q);\r\n\t\t}\r\n\t}", "@Override\n public void run() {\n printfManager.openPrinter(alreadyBlueList.get(args));\n }", "public void print()\n {\n chatarea.append(\"Sender:(\"+port.getText()+\")\"+System.lineSeparator()+msgarea.getText()+System.lineSeparator());\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 void display() {\n\t\tSystem.out.println(\"[\" + recDisplay(head) + \"]\");\n\t}", "public void Print(ActionEvent actionEvent) {\n //System.out.println(call.title);\n TitleDisplay.setText(\"\");\n for (int i = 0; i < call.getToDoListTitle().size(); i++) {\n text = \"Item #\" + (i + 1);\n TitleDisplay.appendText(text);\n TitleDisplay.appendText(\"\\n\");\n TitleDisplay.appendText(\"Name: \");\n TitleDisplay.appendText(call.getToDoListTitle().get(i));\n TitleDisplay.appendText(\"\\nDescription: \");\n TitleDisplay.appendText(call.getToDoListDescription().get(i));\n TitleDisplay.appendText(\"\\nDue Date: \");\n TitleDisplay.appendText(call.getToDoListDueDate().get(i));\n TitleDisplay.appendText(\"\\n\\n\");\n }\n }", "public void print() {\n System.out.println(\"Scheme print:\");\n System.out.println(\" Blocks:\");\n for (Block block : this.blocks) {\n // System.out.println(\" \" + block.getName() + \" (\" + block.getID() + \")\");\n for (Integer id : block.getConnections()) {\n System.out.println(\" \" + id);\n }\n //System.out.println(\" \" + block.outputs.getFirst().getDstID());\n }\n /*System.out.println(\" Connections:\");\n for (Con connection : this.connections) {\n System.out.println(\" [\" + connection.src + \"]---[\" + connection.dst + \"]\");\n }*/\n if(this.queue_set){\n System.out.println(\" Queue: \" + this.queue);\n }\n else{\n System.out.println(\" Queue not loaded\");\n }\n }", "private List<String> print() throws EQException\n\t{\n\t\t// Retrieve the layout\n\t\tLayout layout = screenSetPrint.getLayout();\n\n\t\t// Setup the array list\n\t\tlines.clear();\n\n\t\t// LINE 1: function title\n\t\tif (printHeader)\n\t\t{\n\t\t\tprinterFormatter.printFieldTitle(screenSetPrint.getLayout().rtvLabel(fhd.getEquationUser()));\n\t\t\taddLine();\n\t\t\taddLine();\n\t\t}\n\n\t\t// LINE 2: before and after image column header\n\t\tif (functionDataBef != null)\n\t\t{\n\t\t\tprinterFormatter.printColumnHeader(true, true);\n\t\t}\n\t\telse if (functionDataBef == null && beforeImage)\n\t\t{\n\t\t\tprinterFormatter.printColumnHeader(false, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprinterFormatter.printColumnHeader(true, false);\n\t\t}\n\t\taddLine();\n\n\t\t// LINE 3 and onwards\n\n\t\t// get all the output fieldSets\n\t\tList<InputFieldSet> fieldSets = screenSetPrint.getFunction().getInputFieldSets();\n\t\tfor (int i = 0; i < fieldSets.size(); i++)\n\t\t{\n\t\t\t// Retrieve the field set\n\t\t\tInputFieldSet fieldSet = fieldSets.get(i);\n\n\t\t\t// Print the record name\n\t\t\tif (printHeader)\n\t\t\t{\n\t\t\t\taddLine();\n\t\t\t\tprinterFormatter.printRecordName(fieldSet.getId(), fieldSet.rtvLabel(fhd.getEquationUser()));\n\t\t\t\taddLine();\n\t\t\t}\n\n\t\t\t// Retrieve the layout for this screen set\n\t\t\tDisplayAttributesSet displayAttributeSet = layout.getDisplayAttributesSet(fieldSet.getId());\n\t\t\tprint(fieldSet, displayAttributeSet, displayAttributeSet.getDisplayItems());\n\t\t}\n\n\t\treturn (getLines());\n\t}", "public void display() {\n \t\tSystem.out.printf(\"|%6s \", String.valueOf(idNumber));\n\t\tSystem.out.printf(\"|%13s |\", name);\n\t\tSystem.out.printf(\"%10s |\", quantity);\n\t\tSystem.out.printf(\"%8.2f |\", price);\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.println();\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tint i = 0;\r\n\t\t\t\twhile (i < 50) {\r\n\t\t\t\t\tString job = Thread.currentThread().getName() + \"---\" + new Random(99999L).toString();\r\n\t\t\t\t\tprinter.addJob(job);\r\n\t\t\t\t\tSystem.out.println(\"Added \" + job + \" to Printer Queue\");\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(15);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "public void revPrintList(){\n\t\tCollections.reverse(listStr); //reverse ArrayList\n\t\t//cast the array list to a linked list\n\t\tLinkedList<Object> linkedString = new LinkedList<Object>(listStr);\n\t\t//while there is something in the LinkedList, run following code\n\t\twhile (linkedString.size() > 0) {\n\t\t\t//print out the current first in \"queue\" word\n\t\t\tSystem.out.print(linkedString.get(0) + \" \");\n\t\t\t//remove the first item in the linked list\n\t\t\tlinkedString.removeFirst();\n\t\t}\n\t\t//print out a new blank line for better readability\n\t\tSystem.out.println(\"\\n\");\n\t}", "private void printTestList()\n {\n print(\"\");\n print(SECTION_DIVIDER);\n print(\"Press <1> to Display Main Video Output Port\");\n print(\"Press <2> to Display All Video Output Configurations\");\n print(\"Press <3> to Change Main Video Configuration with Listener\");\n print(\"Press <INFO> Display Test Options\");\n }", "private void printWatchList(int index)\r\n {\r\n\r\n if (0 > index || index >= tabPane.getTabCount())\r\n {\r\n debug(\"printWatchList(\" + index + \") - Invalid Index - resetting to 0: \");\r\n index = 0;\r\n return;\r\n }\r\n // Stop all AWT threads from doing work\r\n shutdownWatchListTimers();\r\n // Try our Print Job\r\n try\r\n {\r\n // Set Up Our Title\r\n GregorianCalendar now = new GregorianCalendar();\r\n String tabName = getString(\"WatchListTableModule.edit.watch_list_basic_name\") + index;\r\n String titleText =\r\n \"Stock Quotes on \"\r\n + ParseData.format(now.getTime(), \"MMM-dd-yyyy\")\r\n + \" WatchList => \"\r\n + appProps.getProperty(tabName, tabName);\r\n printTitleLabel = new JLabel(titleText);\r\n\r\n // Setup our layout to Landscape\r\n PageFormat pageFormat = new PageFormat();\r\n pageFormat.setOrientation(PageFormat.LANDSCAPE);\r\n // Get a Handle on the PrnterJob\r\n PrinterJob prnJob = PrinterJob.getPrinterJob();\r\n // Notify the Printer Job we have a Printable Object - in Landscape Mode\r\n if (true)\r\n {\r\n prnJob.setPrintable(this);\r\n }\r\n else\r\n {\r\n prnJob.setPrintable(this, pageFormat);\r\n }\r\n\r\n if (!prnJob.printDialog())\r\n {\r\n return;\r\n }\r\n\r\n // Print the Object\r\n printTableIndex = index;\r\n maxNumPage = 1;\r\n prnJob.print();\r\n }\r\n catch (PrinterException exc)\r\n {\r\n debug(\"printWatchList(\" + index + \") - Printer Exception caught: \" + exc);\r\n }\r\n finally\r\n {\r\n // Request Focus on our tab pane\r\n tabPane.requestFocus();\r\n // Set our selected index to the first tab\r\n tabPane.setSelectedIndex(index);\r\n printTableIndex = -1;\r\n printTitleLabel = null;\r\n\r\n }\r\n }", "private void printQueens() {\n StringBuffer buffer = new StringBuffer();\n\n for (int i = 0; i < Main.N; ++i) {\n for (int j = 0; j < Main.N; ++j) {\n if (j == positions[i]) {\n buffer.append(\"Q\");\n } else {\n buffer.append(\"-\");\n }\n }\n\n buffer.append(\"\\n\");\n }\n\n System.out.println(buffer);\n \n }", "void printout() {\n\t\tprintstatus = idle;\n\t\tanyprinted = false;\n\t\tfor (printoldline = printnewline = 1;;) {\n\t\t\tif (printoldline > oldinfo.maxLine) {\n\t\t\t\tnewconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (printnewline > newinfo.maxLine) {\n\t\t\t\toldconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (newinfo.other[printnewline] < 0) {\n\t\t\t\tif (oldinfo.other[printoldline] < 0)\n\t\t\t\t\tshowchange();\n\t\t\t\telse\n\t\t\t\t\tshowinsert();\n\t\t\t} else if (oldinfo.other[printoldline] < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse if (oldinfo.other[printoldline] == printnewline)\n\t\t\t\tshowsame();\n\t\t\telse\n\t\t\t\tshowmove();\n\t\t}\n\t\tif (anyprinted == true)\n\t\t\tprintln(\">>>> End of differences.\");\n\t\telse\n\t\t\tprintln(\">>>> Files are identical.\");\n\t}", "public void printTest(){\n\r\n p.resetAll();\r\n p.initialize();\r\n p.feedBack((byte)2);\r\n// p.color(1);\r\n p.alignCenter();\r\n p.setText(\"The Dum Dum Name\");\r\n p.newLine();\r\n p.setText(\"Restaurant Dining\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.setText(\"Bling Bling\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n\r\n p.alignLeft();\r\n p.setText(\"POD No \\t\\t: 2001 \\t\\t Table \\t: E511\");\r\n p.newLine(); \r\n\r\n p.setText(\"Res Date \\t: \" + \"01/01/1801 22:59\");\r\n\r\n p.newLine();\r\n p.setText(\"Session \\t: Evening Session\");\r\n p.newLine();\r\n p.setText(\"Staff \\t\\t: Bum Dale\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.alignCenter();\r\n p.setText(\" - Some Items - \");\r\n p.newLine();\r\n p.alignLeft();\r\n p.addLineSeperator();\r\n\r\n p.newLine();\r\n\r\n p.setText(\"No \\tItem\\t\\tUnit\\tQty\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n \r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n \r\n p.addLineSeperator();\r\n p.feed((byte)3);\r\n p.finit();\r\n\r\n p.feedPrinter(p.finalCommandSet().getBytes());\r\n \r\n }", "public void showThreadOptionsMenu() {\n System.out.println(\"a - Post to thread\\nb - Main Menu\\nc - Quote\");\n }", "private void printUpdateOrderMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Opdater Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opdater Medarbejder\");\n System.out.println(\"(2) Opdater Kunde\");\n System.out.println(\"(3) Opdater Produkt\");\n System.out.println(\"(4) Tilføj Produkt\");\n System.out.println(\"(5) Bekræft\");\n System.out.print(\"Valg: \");\n }", "public void print() {\n int j = 1, k = 0;\n System.out.println(\"Heap contents:\");\n for (E item : heap) {\n System.out.print(item+\" \");\n k++;\n if (k >= j) {\n j = j << 1;\n k = 0;\n System.out.println(\"\");\n }\n }\n System.out.println(\"\");\n }", "public void display() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(a[i] + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public synchronized void PrintDisplayList()\t{\n\t\tSystem.out.print(\"\\n\\tCar Model:\"+getModel()+\"\\n\\tBase Price is:\"\n +getBasePrice());\n\t\tfor(OptionSet Temp: opset)\n System.out.print(Temp.DisplayOptionSet());\n }", "void print() {\n for (int i = 0; i < 8; i--) {\n System.out.print(\" \");\n for (int j = 0; j < 8; j++) {\n System.out.print(_pieces[i][j].textName());\n }\n System.out.print(\"\\n\");\n }\n }", "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 }", "void updatePQ() {\n for (int i = 0; i < 1010; i++) {\n PQ_show[i].setVisible(false);\n queueVis[i] = false;\n }\n for (int i = 0; i < pq.size(); i++) {\n PQ_show[i].setText(String.format(\"%d --> %.1f\", pq.arr[i].node, pq.arr[i].dist));\n PQ_show[i].setVisible(true);\n queueVis[i] = true;\n }\n }", "public String doPrint() {\n\t\t// Get the event title.\n\t\tString event = \"\";\n\t\tswitch (eventType) {\n\t\t\tcase \"IND\": event = \"Individual\";\n\t\t\t\t\t\tbreak;\n\t\t\tcase \"GRP\": event = \"Group\";\n\t\t\t\t\t\tbreak;\n\t\t\tcase \"PARIND\": event = \"Parallel Individual\";\n\t\t\t\t\t\t break;\n\t\t\tcase \"PARGRP\": event = \"Parallel Group\";\n\t\t\t\t\t\t break;\n\t\t default:\tevent = \"\";\n\t\t \t\t\tbreak;\n\t\t}\n\t\t\n\t\tString out = \"RUN BIB TIME\t \" + event +\"\\n\";\n\t\t\n\t\t// Print completed runs.\n\t\tfor ( Run run : completedRuns ) {\n\t\t\tout += run.print() + \"\\n\";\n\t\t}\n\t\t\n\t\t// Print inProgress runs.\n\t\tfor ( Run run : finishQueue ) {\n\t\t\tout += run.print() + \"\\n\";\n\t\t}\n\t\t\n\t\t// Print waiting runs.\n\t\tfor ( Run run : startQueue ) {\n\t\t\tout += run.print() + \"\\n\";\n\t\t}\n\t\t\n\t\treturn out;\n\t}", "public void display(StringBuffer stream) {\n\t\tint iSet, iMove;\n\n\t\tstream.append(\"Player \" + (iPlayer + 1) + \"\\n\\n\");\n\n\t\tfor (iSet = 0; iSet < movesLists.length; iSet++) {\n\n\t\t\tstream.append(\"\\tInformation Set \" + (iSet + 1) + \"\\n\\n\");\n\t\t\tfor (iMove = 0; iMove < movesLists[iSet].size(); iMove++) {\n\t\t\t\tstream.append(\"\\t\\t\"\n\t\t\t\t\t\t+ movesLists[iSet].get(iMove)\n\t\t\t\t\t\t+ \"\\t->\\t\"\n\t\t\t\t\t\t+ roundValue(((Double) probsLists[iSet].get(iMove))\n\t\t\t\t\t\t\t\t.doubleValue()) + \"\\n\");\n\t\t\t}\n\t\t\tstream.append(\"\\n\");\n\t\t}\n\t}", "@Override\n public void printDeque() {\n int index = moveForward(nextFirst, 1);\n for (int count = 1; count <= size; count++) {\n System.out.print(items[index] + \" \");\n index = moveForward(index, 1);\n }\n }", "public void doPrint()\n {\n PrinterJob printJob = PrinterJob.getPrinterJob();\n \n printJob.setPrintable((Printable) mapComponent);\n if (printJob.printDialog()) {\n try {\n printJob.print();\n } catch (Exception e) {\n ErrorHandler.displayError(\"An error occured during printing:\\n\" + e, ErrorHandler.ERR_PRINT_FAIL);\n }\n }\n }", "@Override\n public void print() {\n System.out.print(\"Heap = \");\n for (int i = 0; i < heapSize; i++)\n System.out.print(heap[i] + \" \");\n System.out.println(\"\\n\");\n }", "public static void main(String[] args) \n { \n f = new JFrame(\"Conversion Application\"); \n f.setDefaultCloseOperation(f.EXIT_ON_CLOSE);\n Frontend s = new Frontend(); \n f.setLayout(new GridBagLayout());\n String s1[] = {\"Football Co.\", \"Maple Co.\"}; \n c1 = new JComboBox<String>(s1); \n b1 = new JButton(\"Get File\");\n b2 = new JButton(\"Get Delimiter #s and move to queue\");\n b2.setEnabled(false);\n b3 = new JButton(\"Choose Location for file\");\n b3.setEnabled(false);\n tf1= new JTextField();\n tf1.setEditable(false);\n b4 = new JButton(\"Print File\");\n b4.setEnabled(false);\n c1.addItemListener(s);\n b1.addActionListener(new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n \t if (c1.getSelectedItem() == \"Football Co.\") {\n \t\treader.setUrl(\"https://raw.githubusercontent.com/MeyerDevelopment/FinalProject/master/FootballCo15_GL2008.csv\");\n \t\ttry {\n\t\t\t\t\treader.main(args);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.addSuppressed(e1);\n\t\t\t\t}\n \t }else {\n \t\treader.setUrl(\"https://raw.githubusercontent.com/MeyerDevelopment/FinalProject/master/MapleCo01GL_2008.csv\");\n \t\ttry {\n\t\t\t\t\treader.main(args);\n\t\t\t\t\tb1.setEnabled(false);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n \t }\n }\n });\n b2.addActionListener(new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n \tListToQueue.insertToPQ(); \n }\n });\n b3.addActionListener(new ActionListener() {\n \tpublic void actionPerformed(ActionEvent e) {\n\t \tJFileChooser fileChooser = new JFileChooser();\n\t \tfileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n\t \tfileChooser.setAcceptAllFileFilterUsed(false);\n\t \t \n\t int rVal = fileChooser.showOpenDialog(null);\n\t if (rVal == JFileChooser.APPROVE_OPTION) {\n\t tf1.setText(fileChooser.getSelectedFile().toString());\n \t ListToQueue.filePath = tf1.getText();\n \t Frontend.b3.setEnabled(false);\n \t Frontend.b4.setEnabled(true);\n\t }\n }\n });\n b4.addActionListener(new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n \ttry {\n\t\t\t\tListToQueue.writeToFile();\n\t\t\t} catch (IOException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t} \n }\n });\n l = new JLabel(\"Select File to convert:\"); \n l1 = new JLabel(\"Football Co. selected\"); \n l.setForeground(Color.red); \n l1.setForeground(Color.blue); \n JPanel p = new JPanel(); \n p.setLayout(new BoxLayout(p,BoxLayout.Y_AXIS));\n p.add(l); \n p.add(c1); \n p.add(l1); \n p.add(b1);\n p.add(b2);\n p.add(b3);\n p.add(tf1);\n p.add(b4);\n f.add(p); \n f.setSize(700, 600);\n f.setLocationRelativeTo(null);\n f.setVisible(true);\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 printList()\n\t{\n\t\trwlock.lockRead();\n\t\tsuper.printList();\n\t\trwlock.unlockRead();\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n allRecords = new javax.swing.JTextArea();\n back = new javax.swing.JButton();\n PrintRcordsBtn = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n allRecords.setColumns(20);\n allRecords.setRows(5);\n jScrollPane1.setViewportView(allRecords);\n\n back.setText(\"Back\");\n back.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backActionPerformed(evt);\n }\n });\n\n PrintRcordsBtn.setText(\"Print Records\");\n PrintRcordsBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n PrintRcordsBtnActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addComponent(back)\n .addGap(60, 60, 60)\n .addComponent(PrintRcordsBtn)\n .addContainerGap(38, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(back)\n .addComponent(PrintRcordsBtn))\n .addGap(0, 11, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "public void print() {\n\t\tif (cs213.isEmpty()) {\n\t\t\tSystem.out.println(\"List is empty!\");\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tcs213.print();\n\t\t}\n\t\treturn;\n\t\t}", "public void showAllSchedules(ArrayList<Scheduler> schedulesToPrint) {\n for (int i = 0; i < schedulesToPrint.size(); i++) {\n System.out.println(\" ____ \" + (i + 1) + \":\");\n printSchedule(schedulesToPrint.get(i));\n System.out.println(\" ____ \");\n }\n }", "public void display()\n\t{\n\t\tSystem.out.println(\"Bike No.\\t\"+\n\t\t\t\t\"Phone no.\\t\"+\n\t\t\t\t\"Name\\t\"+\n\t\t\t\t\"No. of days\\t\"+\n\t\t\t\t\"Charge\");\n\t\tSystem.out.println(bno+\n\t\t\t\t\"\\t\"+phno+\n\t\t\t\t\"\\t\"+name+\n\t\t\t\t\"\\t\"+days+\n\t\t\t\t\"\\t\"+charge);\n\t}", "private void printCreateOrderMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Opret Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Tilføj Medarbejder\");\n System.out.println(\"(2) Tilføj Kunde\");\n System.out.println(\"(3) Tilføj Produkt\");\n System.out.println(\"(4) Bekræft\");\n System.out.print(\"Valg: \");\n }", "public static void printTable() {\n System.out.println(\"\\nMenu:\");\n System.out.println(\"(LR) - List All Recipients\");\n System.out.println(\"(LO) - List All Donors\");\n System.out.println(\"(AO) - Add New Donor\");\n System.out.println(\"(AR) - Add New Recipient\");\n System.out.println(\"(RO) - Remove Donor\");\n System.out.println(\"(RR) - Remove Recipient\");\n System.out.println(\"(SR) - Sort Recipients\");\n System.out.println(\"(SO) - Sort Donors\");\n System.out.println(\"(Q) - Quit\");\n }", "void showProcessList(TimelyResultProcessor resultProcessor);", "private void printHistory(patient toPrint){\r\n if (toPrint == null)\r\n JOptionPane.showMessageDialog\r\n (null, \"No Patient to print\");\r\n else{\r\n String history = \"\";\r\n for (String s: toPrint.getApptPaymentHistory()){\r\n history += s + \"\\n\";\r\n }\r\n billing_patientHistoryTextArea.setText(history);\r\n }\r\n }", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "public static void main(String[] args) {\n PostOfficeQueueSimulator myPostOffice = new PostOfficeQueueSimulator();\n\n // Create new person objects and give them a name\n Person p1 = new Person(\"Tommy\");\n Person p2 = new Person(\"Slavoj\");\n Person p3 = new Person(\"Gertrude\");\n Person p4 = new Person(\"Shaquille\");\n\n // Add the new person objects to the list\n myPostOffice.add(p1);\n myPostOffice.add(p2);\n myPostOffice.add(p3);\n myPostOffice.add(p4);\n\n // Call these methods on the myPostOffice list\n myPostOffice.queueLength();\n myPostOffice.printQueue();\n myPostOffice.whoseAtFront();\n myPostOffice.serve();\n myPostOffice.printQueue();\n myPostOffice.whoseAtFront();\n myPostOffice.whoseAt(Integer.parseInt(JOptionPane.showInputDialog(\"Enter the queue position number to find a name: \")));\n\n }", "private void printInfo() {\n System.out.println(\"\\nThis program reads the file lab4.dat and \" +\n \"inserts the elements into a linked list in non descending \"\n + \"order.\\n\" + \"The contents of the linked list are then \" +\n \"displayed to the user in column form.\\n\");\n }", "public void printTask() {\r\n\t\tSystem.out.println(\"ID: \" + this.id + \" | Description: \" + this.description + \" | Processor: \" + this.processor);\r\n\t\tSystem.out.println(\"Status: \" + this.status + \" | Fälligkeitsdatum: \" + this.formatedDueDate);\r\n\t\tSystem.out.println(\"----------\");\r\n\t}", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "@Override\n public void printDeque() {\n int position = plusOne(nextFirst);\n for (int i = 0; i < size; i += 1) {\n System.out.print(array[position]);\n System.out.print(' ');\n position = plusOne(position);\n }\n System.out.print('\\n');\n }", "void display() {\n System.out.println(\"============================================================================================\");\n System.out.println(\"Name of the book:: \" + Bname);\n System.out.println(\"Price of the book:: Rs \" + price);\n System.out.println(\"============================================================================================\");\n }", "public void print() {\r\n \tfor (int i = 0; i < arbres.size(); i++) {\r\n \t\tSystem.out.println(\"Ordre de \" + arbres.get(i).ordre + \":\");\r\n \t\tarbres.get(i).print(\"\");\r\n \t\tSystem.out.println();\r\n \t}\r\n }", "private void printDeque() {\n\t\tint i=front;\r\n\t\tif(rear==-1 && front==-1) {\r\n\t\t\tSystem.out.println(\"Dequeue is empty\");\r\n\t\t}else {\r\n\t\t\twhile(i!=rear) {\r\n\t\t\t\tSystem.out.print(arr[i]+\" \");\r\n\t\t\t\ti=(i+1)%arr.length;\r\n\t\t\t}\r\n\t\t\tSystem.out.print(arr[rear]);\r\n\t\t}\r\n\t\t\r\n\t}", "private void menuPrintActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuPrintActionPerformed\n MessageFormat header = new MessageFormat(\" Reminder List Data \");\n MessageFormat footer = new MessageFormat(\" MoneyMinder Inc. '2019' \");\n try {\n remindersTable.print(JTable.PrintMode.FIT_WIDTH, header, footer);\n } catch (PrinterException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void actionPerformed(ActionEvent e){\n if (e.getSource() instanceof JButton) {\r\n PrinterJob printJob = PrinterJob.getPrinterJob();\r\n PageFormat pf = new PageFormat();\r\n pf.setOrientation(PageFormat.LANDSCAPE);\r\n printJob.setPrintable(_instance, pf);\r\n //if (printJob.printDialog()) {\r\n try {\r\n printJob.print();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n //}\r\n }\r\n }", "private void doPrint() {\n PrintManager printManager = (PrintManager) this\n .getSystemService(Context.PRINT_SERVICE);\n\n // Set job name, which will be displayed in the print queue\n String jobName = this.getString(R.string.app_name) + \" Document\";\n\n // Start a print job, passing in a PrintDocumentAdapter implementation\n // to handle the generation of a print document\n printManager.print(jobName, new MyPrintDocumentAdapter(this),\n null); //\n }", "private void printOut(String[] printerMakerResult)\n {\n //shows user the printerMaker result\n\n for(int i=0;i<printerMakerResult.length;i++)\n {\n outVideo.println(printerMakerResult[i]);\n outVideo.flush();\n }\n }", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "public void printAll()\n {\n r.showAll();\n }", "public void print_dev() {\n\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName\r\n\t\t\t\t\t\t\t\t+\t\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)\r\n\t\t\t\t\t\t\t\t+\t\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Function Limit Count\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Eat : \"+TMGCSYS.tmgcLimitEat+\", Sleep : \"+TMGCSYS.tmgcLimitSleep\r\n\t\t\t\t\t\t\t\t+\t\", Walk : \"+TMGCSYS.tmgcLimitWalk+\", Study : \"+TMGCSYS.tmgcLimitStudy+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Ability\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" STR : \"+TMGCSYS.tmgcSTR+\", INT : \"+TMGCSYS.tmgcINT\r\n\t\t\t\t\t\t\t\t+\t\", DEB : \"+TMGCSYS.tmgcDEB+\", HET : \"+TMGCSYS.tmgcHET+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Job : \"+TMGCSYS.tmgc2ndJob\r\n\t\t\t\t\t\t\t\t);\r\n\t}", "public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}", "public void printMenu()\n\t{\n\t\tSystem.out.println(ChatMenu.MENU_HEAD);\n\t\tSystem.out.println(ChatMenu.TYPE_MESSAGE + ChatMaintainer.CS().getPartner());\n\t\tSystem.out.println(ChatMenu.QUIT);\n\t\tSystem.out.println(ChatMenu.MENU_TAIL);\n\t\tSystem.out.println(ChatMenu.INPUT_PROMPT);\n\t}", "public void print()\n {\n System.out.println(name + \"\\n\");\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n System.out.println((iterator+1) +\". \" + bookList.get(iterator).getTitle()+\" by \" +bookList.get(iterator).getAuthor()); \n }\n }", "ProcessRunner print();", "public void print() {\n stdout(name + \", \" + description);\n stdout(\"-----------------------------------\");\n for (MenuComponent menuComponent : components) {\n menuComponent.print();\n }\n stdout(\"\\n\");\n }" ]
[ "0.7664119", "0.7304243", "0.7283147", "0.7213885", "0.69627464", "0.6935859", "0.6917396", "0.6901107", "0.676931", "0.6768247", "0.6746182", "0.6722076", "0.65688574", "0.6567605", "0.6481884", "0.6459196", "0.6352797", "0.6324792", "0.6286733", "0.6234038", "0.6203158", "0.6195667", "0.61665374", "0.6155121", "0.6144438", "0.6130579", "0.61024976", "0.6057604", "0.60551035", "0.60451245", "0.6040065", "0.60000706", "0.59954256", "0.5975965", "0.5950617", "0.59439707", "0.59265506", "0.59241766", "0.59185076", "0.5912286", "0.5895962", "0.5893899", "0.5875045", "0.5854812", "0.5852266", "0.5845193", "0.5832633", "0.58272773", "0.58022255", "0.57951623", "0.57881933", "0.5785094", "0.5782354", "0.57810444", "0.5779745", "0.5770669", "0.575609", "0.57423455", "0.57323796", "0.5723103", "0.57174194", "0.5714121", "0.5710283", "0.57091475", "0.5708514", "0.56968695", "0.5696466", "0.56938916", "0.5690918", "0.5687396", "0.5685424", "0.56820476", "0.5678374", "0.5675227", "0.5673264", "0.5669071", "0.5659267", "0.5655993", "0.5655651", "0.5651659", "0.56494296", "0.56479913", "0.56446123", "0.5641631", "0.5639134", "0.5637165", "0.5635392", "0.5627683", "0.5617612", "0.5613978", "0.560962", "0.5602086", "0.56018454", "0.5597232", "0.5593963", "0.55919194", "0.5582075", "0.55722046", "0.5564903", "0.5564162", "0.5563552" ]
0.0
-1
Moves job to the top of the queue
void start(SignedObject accessToken) throws RemoteException, AuthenticationException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void topQueue(int job, SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;", "public void requeue() {\n\t\tenqueue(queue.removeFirst());\n\t}", "public void moveJob(String from, String to, JobInProgress job) {\n synchronized (queues) {\n removeJob(from, job);\n addJob(to, job);\n }\n }", "private void shift(){\n if (queue.length < 1){\n throw new Error(\"Table self destruction!\");\n }\n if (size <= 0){\n return;\n }\n\n if (queue[0] == null){\n E best = null;\n int bestAT = -1;\n for (int x = 0 ; x < queue.length; x++){\n E cur = (E)queue[x];\n if (cur == null){\n continue;\n }\n if (best == null || cur.compareTo(best) > 0){\n best = cur;\n bestAT = x;\n }\n }\n // Not put best at front;\n queue[bestAT] = null;\n queue[0] = best;\n }\n\n }", "private void putToTop()\r\n {\r\n OrderManager manager = myOrderManagerRegistry.getOrderManager(ourKey);\r\n manager.activateParticipant(ourKey);\r\n manager.moveToTop(ourKey);\r\n }", "@Test\n @SuppressWarnings({\"unchecked\"})\n public void moveUp() {\n exQ.moveUp(JobIdFactory.newId());\n Mockito.verify(queue, Mockito.times(0)).swap( Mockito.any(PrioritizableRunnable.class),Mockito.any(PrioritizableRunnable.class));\n //the first shouldent be moved\n exQ.moveUp(this.ids.get(0));\n Mockito.verify(queue, Mockito.times(0)).swap( Mockito.any(PrioritizableRunnable.class),Mockito.any(PrioritizableRunnable.class));\n //otherwise move it up\n exQ.moveUp(this.ids.get(1));\n Mockito.verify(queue, Mockito.times(1)).swap(this.runnables.get(1),this.runnables.get(0));\n }", "private void enterToRunwayQueue() {\n\t\tqueue.insert(this);\n\t}", "public Runnable popTop() {\n int[] stamp = new int[1];\n int oldTop = top.get(stamp), newTop = oldTop + 1;\n int oldStamp = stamp[0], newStamp = oldStamp + 1;\n if (bottom <= oldTop) // empty\n return null;\n Runnable r = tasks[oldTop];\n if (top.compareAndSet(oldTop, newTop, oldStamp, newStamp))\n return r;\n return null;\n }", "public int top() {\n int size=queue.size();\n for (int i = 0; i < size-1; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n int top=queue.poll();\n queue.add(top);\n return top;\n }", "@Override\n public void pipeStepQueueJob(final Job job) {\n synchronized(jobs_queue) {\n pipeStepLog(\"Queuing JOB #\" + job.getId());\n jobs_queue.add(job);\n jobs_queue.notifyAll();\n }\n }", "public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}", "public synchronized void enqueue(Object o) {\r\n insertAtBack(o);\r\n }", "@Override\r\n public CustomProcess removeBest() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException(\"queue is empty, cannot remove from empty queue\");\r\n }\r\n CustomProcess best = data[0]; // process to be removed\r\n data[0] = data[size - 1];\r\n data[size - 1] = null;\r\n minHeapPercolateDown(0); // Percolate down on first index\r\n size--;\r\n return best;\r\n }", "@Test\n @SuppressWarnings({\"unchecked\"})\n public void moveDown() {\n exQ.moveUp(JobIdFactory.newId());\n //the first shouldent be moved\n exQ.moveDown(this.ids.get(3));\n Mockito.verify(queue, Mockito.times(0)).swap( Mockito.any(PrioritizableRunnable.class),Mockito.any(PrioritizableRunnable.class));\n //otherwise move it up\n exQ.moveDown(this.ids.get(2));\n Mockito.verify(queue, Mockito.times(1)).swap(this.runnables.get(2),this.runnables.get(3));\n }", "public void move(){\n\t\tint y, z;\n\t\t\n\t\tif(queueArrayGetValue(1) == null && (queueArrayGetValue(2) == null || queueArrayGetValue(3) == null)){\n\t\t\tif(queueArrayGetValue(2) == null && queueArrayGetValue(3) != null){\n\t\t\t\tqueueArraySetKeyValue(1, queueArrayGetKey(3), queueArrayGetValue(3));\n\t\t\t\tqueueArraySetKeyValue(3, null, null);\n\t\t\t}else if(queueArrayGetValue(2) != null && queueArrayGetValue(3) == null){\n\t\t\t\tqueueArraySetKeyValue(1, queueArrayGetKey(2), queueArrayGetValue(2));\n\t\t\t\tqueueArraySetKeyValue(2, null, null);\n\t\t\t}\n\t\t}else{\n\t\t\touterloop:\n\t\t\tfor(int i = 1; i < queueArrayLength(); i++){\n\t\t\t\tif(queueArrayGetValue(i) == null){\n\t\t\t\t\ty = i * 2;\n\t\t\t\t\tz = i * 2 + 1;\n\t\t\t\t\tif(y >= queueArrayLength()){\n\t\t\t\t\t\tbreak outerloop;\n\t\t\t\t\t}else if(z >= queueArrayLength()){\n\t\t\t\t\t\tqueueArraySetKeyValue(i, queueArrayGetKey(y), queueArrayGetValue(y));\n\t\t\t\t\t\tqueueArraySetKeyValue(y, null, null);\n\t\t\t\t\t\tbreak outerloop;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(lessThan(y,z)){\n\t\t\t\t\t\t\tqueueArraySetKeyValue(i, queueArrayGetKey(y), queueArrayGetValue(y));\n\t\t\t\t\t\t\tqueueArraySetKeyValue(y, null, null);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tqueueArraySetKeyValue(i, queueArrayGetKey(z), queueArrayGetValue(z));\n\t\t\t\t\t\t\tqueueArraySetKeyValue(z, null, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void queueShrunk();", "@Override\n protected void insertJobInQueueUponArrival (final J job, final double time)\n {\n addRealJobLocal (job);\n }", "public void pop() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n q.poll();\n }", "public void puke(){\r\n top = null;\r\n size = 0;\r\n \r\n }", "public void pop() {\n move();\n reverseQueue.poll();\n }", "public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}", "public void pop() {\n queue.remove(0);\n }", "public E popTop() {\n // FILL IN\n }", "public synchronized void promote(Tile tile) {\r\n if(tileQueue.contains(tile)) {\r\n try {\r\n tileQueue.remove(tile);\r\n tile.setPriority(Tile.Priority.High);\r\n tileQueue.put(tile);\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }", "public void resortWaitQueue(String name) {\n Queue<JobInProgress> queue = queues.get(name);\n if (null != queue) {\n queue.resortQueue();\n }\n }", "protected Job getPreemptingJob(Job runJob, long tick) {\n long earliestPreemptingJobReleaseTime = Long.MAX_VALUE;\n Job earliestPreemptingJob = null;\n long runJobFinishTime = tick + runJob.remainingExecTime;\n for (Job job: nextJobOfATask.values()) {\n if (job == runJob)\n continue;\n\n if (job.releaseTime < runJobFinishTime) {\n if (job.task.getPriority() > runJob.task.getPriority()) {\n if (job.releaseTime < earliestPreemptingJobReleaseTime) {\n earliestPreemptingJobReleaseTime = job.releaseTime;\n earliestPreemptingJob = job;\n }\n }\n }\n }\n return earliestPreemptingJob;\n }", "private void workOnQueue() {\n }", "Object dequeue();", "Object dequeue();", "public void pop() {\n queue.remove();\n }", "@Override\n public E poll() {\n E tmp = (E)queue[0];\n System.arraycopy(queue, 1, queue, 0, size - 1);\n size--;\n return tmp;\n }", "public synchronized void enqueue(T thing) {\r\n\t\twhile (queue.size()==maxSize){\r\n\t\t\ttry{\r\n\t\t\t\tthis.wait();\r\n\t\t\t} catch(InterruptedException e){\r\n\t\t\t\tSystem.out.println(\"Interruption during enqueue\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tqueue.addLast(thing);\r\n\t\tthis.notifyAll();\r\n\t}", "private GameAction pull() {\n if (this.queue.size() > 0) {\n return this.queue.remove(0);\n } else {\n return null;\n }\n }", "public int top() {\n int size = queue.size();\n for (int i = 0; i < size - 1; i++) {\n Integer poll = queue.poll();\n queue.offer(poll);\n }\n Integer poll = queue.poll();\n queue.offer(poll);\n return poll;\n }", "public void dequeue() {\r\n saf.remove(0);\r\n }", "public void pop() {\n \n q1.poll();\n }", "private int move(int position) {\n\t\tremoveQueue(queues[position]);\n\t\tint angriness = queues[position].queue.poll();\n\t\tallQueues.add(queues[position]);\n\t\tif (queues[position].queue.size() > 0) {\n\t\t\tallHeads.add(queues[position]);\n\t\t}\n\t\treturn insert(angriness);\n\t}", "public void pop() {\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\twhile (!queue.isEmpty())\n\t\t\tlist.add(queue.poll());\n\t\tfor (int i = 0; i < list.size() - 1; i++)\n\t\t\tqueue.add(list.get(i));\n\t}", "public void enqueue (T item) {\n leftStack.push(item);\n }", "void dequeue() \n { \n // If queue is empty, return NULL. \n if (this.front == null) \n return; \n \n // Store previous front and move front one node ahead \n LinkedListQueue temp = this.front; \n this.front = this.front.next; \n \n // If front becomes NULL, then change rear also as NULL \n if (this.front == null) \n this.rear = null; \n }", "public void enqueue(Comparable item);", "public void pop()\n {\n this.top = this.top.getNext();\n }", "public int queue_top() {\n\t\tif (isEmpty()) error(\"Queue is Empty!\");\n\t\treturn data[(front + 1) % MAX_QUEUE_SIZE];\n\t}", "public void setTop() {\n reset(State.TOP);\n }", "@Override\r\n public CustomProcess peekBest() {\r\n if (data[0] == null || isEmpty()) {\r\n throw new NoSuchElementException(\"queue is empty\");\r\n }\r\n return data[0];\r\n }", "public void enqueue (Item item){\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.next = null;\n if(isEmpty()) {first = last;}\n else oldLast.next = last;\n N++;\n }", "public int top() {\n // Write your code here\n int ret = 0;\n if (!queue1.isEmpty()) {\n while (queue1.size() > 1) {\n queue2.offer(queue1.poll());\n }\n ret = queue1.peek();\n queue2.offer(queue1.poll());\n } else if (!queue2.isEmpty()) {\n while (queue2.size() > 1) {\n queue1.offer(queue2.poll());\n }\n ret = queue2.peek();\n queue1.offer(queue2.poll());\n }\n return ret;\n }", "@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 int useQueue(){\t\r\n\t\t//save the top of the queue\r\n\t\tint top = queue[0];\r\n\t\t//move the queue up 1 space\r\n\t\tfor (int x = 0; x < queue.length - 1; x++){\r\n\t\t\tqueue[x] = queue[x+1];\r\n\t\t}\r\n\t\t//generate a new value at the bottom of the queue\r\n\t\tqueue[queue.length-1] = random.nextInt(10);\r\n\t\treturn top;\r\n\t}", "public int viewTop(){\r\n\t\treturn queue[0];\r\n\t}", "public void sortBasedPendingJobs();", "public void queue(Object newItem){\n if(isFull()){\n System.out.println(\"queue is full\");\n return;\n }\n ArrayQueue[++rear] = newItem;\n if(front == -1)\n front = 0;\n \n }", "@Override\r\n\tpublic void run() {\n\t\tvfBest();\r\n\t\tif(currQSize > maxQSize){\r\n\t\t\tDTS(Prey.currentTrajectory.peek().qCounter,vFBestNode.qCounter);\r\n\t\t\tSystem.out.println(\"Queue Cut\");\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void quack() {\n\t\t\r\n\t}", "E dequeue();", "E dequeue();", "E dequeue();", "public static void tick() {\n\t\tString[] queue_order = { CANNON_QUEUE, DECK_QUEUE };\n\n\t\tfor (String queue : queue_order) {\n\t\t\tString job = redis_client.rpop(queue);\n\t\t\tif (job != null) { // check not empty\n\t\t\t\tString[] job_split = job.split(\"#\");\n\t\t\t\tint time = Integer.parseInt(job_split[2]);\n\t\t\t\ttime--;\n\t\t\t\tif (time <= 0) { // if time reaches 0 , the job is complete\n\t\t\t\t\tDefenseController.job_complete(Integer.parseInt(job_split[0]), DefenseStatus.valueOf(job_split[1]));\n\t\t\t\t} else { // job still goes -> return to the queue\n\t\t\t\t\tredis_client.rpush(queue, job_split[0] + \"#\" + job_split[1] + \"#\" + time);\n\t\t\t\t}\n\t\t\t\tbreak; // only work in one queue per tick\n\t\t\t}\n\t\t}\n\t}", "public int top() {\r\n int size = this.queueMain.size();\r\n if(size == 1) return this.queueMain.element();\r\n // 转移n-1\r\n while(size != 1){\r\n this.queueHelp.offer(this.queueMain.poll());\r\n size--;\r\n }\r\n // 然后取出第n个元素\r\n int res = this.queueHelp.element();\r\n // 转移到辅助队列\r\n this.queueHelp.offer(this.queueMain.poll());\r\n // 再调换\r\n Queue<Integer> temp = this.queueMain;\r\n this.queueMain = this.queueHelp;\r\n this.queueHelp = temp;\r\n\r\n return res;\r\n }", "public void dequeue() {\n if (!isEmpty()) { //se estiver vazia retorna -1\n\n No temp = inicio;\n // move o topo para o prox nó\n inicio = inicio.next;\n if (inicio == null) {\n fim = null;\n }\n size--;\n }\n\n }", "public void skipToQueueItem(long id) {\n try {\n mSessionBinder.skipToQueueItem(mContext.getPackageName(), mCbStub, id);\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling skipToItem(\" + id + \").\", e);\n }\n }", "final Runnable popTask() {\n int s = sp;\n while (s != base) {\n if (tryActivate()) {\n Runnable[] q = queue;\n int mask = q.length - 1;\n int i = (s - 1) & mask;\n Runnable t = q[i];\n if (t == null || !casSlotNull(q, i, t))\n break;\n storeSp(s - 1);\n return t;\n }\n }\n return null;\n }", "public int top() {\n move();\n return reverseQueue.peek();\n }", "public Serializable asyncPop() {//can move on to another task before it finishes.\n Serializable temp = null;\n boolean finished = false;\n while(!finished){\n if(taskQueue.isEmpty()){\n try {\n Thread.sleep(1000);//1 second\n } catch (InterruptedException ex) {\n Logger.getLogger(BasicMsgQ.class.getName()).log(Level.SEVERE, null, ex);\n }\n }else{\n temp = taskQueue.removeFirst();\n finished = true;\n } \n }\n return temp;\n }", "T dequeue();", "T dequeue();", "public void enqueue(Item item) throws NoSuchElementException {\r\n // Usar el metodo upHeap para corregir la condicion de\r\n // Min Heap\r\n\r\n\r\n if (size == 0){\r\n heap[1] = item;\r\n size = 1;\r\n return;\r\n }\r\n int cur = size + 1;\r\n int par = cur/2;\r\n\r\n heap[cur] = item;\r\n size++;\r\n\r\n if (heap[cur].compareTo(heap[par]) > 0){\r\n upHeap(cur);\r\n }\r\n\r\n\r\n }", "public void enqueue(Item item) \n {\n stack1.push(item);\n }", "public int dequeue() {\n\t\tif (isEmpty()) throw new IllegalStateException(\"\\nQueue is empty!\\n\");\n\t\tint removedItem = bq[head];\n\t\tif (head == bq.length - 1) head = 0; // wraparound\n\t\telse head++;\n\t\tsize--;\n\t\treturn removedItem;\t\n\t}", "private synchronized void refreshQueuePriority() {\n BlockingQueue<Message> newQueue;\n if(highPriorityMode) {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, HighPriorityModeComparator.COMPARATOR);\n } else {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, NoPriorityModeComparator.COMPARATOR);\n }\n this.queue.drainTo(newQueue);\n this.queue = newQueue;\n latch.countDown();\n }", "public void enqueue(E e) {\n\t\tlist.addLast(e);\n\t}", "public synchronized void firstSort(){\n Process temp;\n for(int j = 0; j<queue.length;j++){\n temp = null;\n for(int i = 0; i<pros.proSize(); i++){\n if(i==0){\n temp = new Process((pros.getPro(i)));\n }else if(temp.getArrivalTime() == pros.getPro(i).getArrivalTime()){\n if(temp.getId() > pros.getPro(i).getId()){\n temp = pros.getPro(i);\n }\n }else if (temp.getArrivalTime() > pros.getPro(i).getArrivalTime()){\n temp = pros.getPro(i);\n }\n }\n queue[j] = temp;\n pros.remove(temp.getId());\n }\n for(int i = 0; i< queue.length; i++){\n pros.addPro(queue[i]);\n }\n }", "public int getQueuePosition();", "public E dequeue();", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public void swap(){\n\t\ttempQueue = new LinkedBlockingQueue<Run>();\n\t\t\n\t\tint count = 1;\n\t\t// Loop through queue and add to the tempQueue.\n\t\twhile( !finishQueue.isEmpty() ) {\n\t\t\tRun current = finishQueue.poll();\n\t\t\tif( count == 2 ){\n\t\t\t\tsecondRunner = current;\t// Save second runner for swapping.\n\t\t\t} else {\n\t\t\t\ttempQueue.add(current);\n\t\t\t}\n\t\t\t++count;\n\t\t}\t\n\t\t\n\t\tfinishQueue.add(secondRunner);\n\t\twhile(!tempQueue.isEmpty()){\n\t\t\tRun current = tempQueue.poll();\n\t\t\tfinishQueue.add(current);\n\t\t}\n\t}", "public T dequeue();", "public void pop() {\n // Write your code here\n if (!queue1.isEmpty()) {\n while (queue1.size() > 1) {\n queue2.offer(queue1.poll());\n }\n queue1.poll();\n } else if (!queue2.isEmpty()) {\n while (queue2.size() > 1) {\n queue1.offer(queue2.poll());\n }\n queue2.poll();\n }\n }", "protected void moveToDestination(){\n\t\tqueue.clear();\n\t\twhile (destination[0] < 0){\n\t\t\tqueue.add(\"MOVE S\");\n\t\t\tdestination[0] += 1;\n\t\t}\n\t\twhile (destination[0] > 0){\n\t\t\tqueue.add(\"MOVE N\");\n\t\t\tdestination[0] -= 1;\n\t\t}\n\t\twhile (destination[1] < 0){\n\t\t\tqueue.add(\"MOVE E\");\n\t\t\tdestination[1] += 1;\n\t\t}\n\t\twhile (destination[1] > 0){\n\t\t\tqueue.add(\"MOVE W\");\n\t\t\tdestination[1] -= 1;\n\t\t}\n\t\tdestination = null;\n\t}", "public int top() {\n if(queueA.isEmpty() && queueB.isEmpty()){\n return -1;\n }\n int res;\n if(!queueA.isEmpty()){\n while(queueA.size()!=1){\n queueB.add(queueA.poll());\n }\n res = queueA.poll();\n queueB.add(res);\n }else{\n while(queueB.size()!=1){\n queueA.add(queueB.poll());\n }\n res = queueB.poll();\n queueA.add(res);\n }\n return res;\n }", "Runnable popBottom() {\n // is the queue empty?\n if (bottom == 0) // empty\n return null;\n bottom--;\n Runnable r = tasks[bottom];\n int[] stamp = new int[1];\n int oldTop = top.get(stamp), newTop = oldTop + 1;\n int oldStamp = stamp[0], newStamp = oldStamp + 1;\n // no conflict with thieves\n if (bottom > oldTop)\n return r;\n // possible conflict: try to pop it ourselves\n if (bottom == oldTop)\n if (top.compareAndSet(oldTop, newTop, oldStamp, newStamp))\n return r;\n // queue is empty, reset bottom and top to 0\n bottom = 0;\n top.set(0, newStamp);\n return null;\n }", "void enqueue(E item);", "public void pop() {\n one.poll();\n \n }", "void pop() {\n // -\n top = top.getNextNode();\n }", "public int dequeueFront();", "public String top() {\n return queue.size() == 0 ? null : queue.get(0);\n }", "public void enqueue(E item) {\n Node<E> oldlast = last;\n last = new Node<E>();\n last.item = item;\n last.next = null;\n if (isEmpty()) first = last;\n else oldlast.next = last;\n n++;\n }", "public void dequeue() {\n\t\tObject ret_val = todequeue();\n\t\tif(ret_val == null)\n\t\t\tSystem.out.println(\"The queue is empty\");\n\t\telse\n\t\t\tSystem.out.println(\"Removed: \" + ret_val);\n\t}", "public Item dequeue() throws NoSuchElementException {\r\n // Usar el metodo downHeap para corregir la condicion\r\n // de Min Heap\r\n\r\n\r\n Item ret = heap[1];\r\n\r\n heap[1] = heap[size];\r\n downHeap(1);\r\n\r\n heap[size] = null;\r\n size--;\r\n\r\n return ret;\r\n }", "private void re_queue() {\n\n Queue<String> queue = new LinkedList<>();\n queue.offer(\"我\");\n queue.offer(\"爱\");\n queue.offer(\"刷\");\n queue.offer(\"题\");\n queue.offer(\"呵呵\");\n\n System.out.println(\"*********queue*********\");\n System.out.println(queue);\n System.out.println(\"*********queue*********\");\n System.out.println(\"查看队首元素,不改变队列结构:\" + queue.peek());\n System.out.println(queue.size());\n System.out.println(\"*********queue*********\");\n System.out.println(\"取出队首元素,改变队列结构:\" + queue.poll());\n System.out.println(queue.size());\n System.out.println(\"*********queue*********\");\n while (queue.size() > 0) {\n System.out.println(queue.poll());\n System.out.println(queue);\n }\n }", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public void newQueue(){\r\n\t\tgenerateQueue();\r\n\t\trefreshLeft = true;\r\n\t}", "protected Job getNextJobInReadyQueue(long tick) {\n Job targetJob = null;\n int highestActivePriority = 0;\n\n for (Job job : nextJobOfATask.values()) {\n if (job.releaseTime > tick)\n continue;\n if (job.task.getPriority() > highestActivePriority) {\n highestActivePriority = job.task.getPriority();\n targetJob = job;\n }\n }\n return targetJob;\n }", "public void nextTask()\n {\n Task next = null;\n \n if (!pq.isEmpty()) next = pq.remove();\n \n if (next == null)\n {\n System.out.println(\"There are no tasks in the list.\");\n }\n else\n {\n //System.out.println(pq.peek());\n System.out.println(next.getDescription());\n }\n }", "private void addToMoveQueue() {\n\t\tSimulation.INSTANCE.getMoveQueue().offer(new Move(prevNode, currentNode));\n\t}", "void enqueue(T t);", "@Test\n public void peekTest() {\n assertThat(\"work1\", is(this.queue.peek()));\n }", "public static Object peek() {\t \n if(queue.isEmpty()) { \n System.out.println(\"The queue is empty so we can't see the front item of the queue.\"); \n return -1;\n }\t \n else {\n System.out.println(\"The following element is the top element of the queue:\" + queue.getFirst()); \t \n }\n return queue.getFirst();\n }", "private void processOut() {\n while (!queue.isEmpty()) {\n var bb = queue.peek();\n if (bb.remaining() <= bbout.remaining()) {\n queue.remove();\n bbout.put(bb);\n } else {\n break;\n }\n }\n }" ]
[ "0.67479634", "0.6522244", "0.64959234", "0.6485267", "0.63780534", "0.6209653", "0.6141968", "0.60765046", "0.5989635", "0.5974804", "0.59671175", "0.59427893", "0.5922686", "0.58615637", "0.5839452", "0.58095706", "0.5796054", "0.5793218", "0.5781505", "0.57772785", "0.5743919", "0.57293755", "0.57222515", "0.56853056", "0.5684379", "0.56457156", "0.56122255", "0.56085163", "0.56085163", "0.55994505", "0.5582342", "0.55817866", "0.5573935", "0.5566884", "0.5533124", "0.5531384", "0.55229837", "0.55099523", "0.5508966", "0.5497823", "0.54740787", "0.5467384", "0.5467137", "0.54669863", "0.5465332", "0.5461147", "0.54359007", "0.54339325", "0.54316986", "0.543156", "0.5426069", "0.5424139", "0.5421463", "0.54191977", "0.5419037", "0.5419037", "0.5419037", "0.54112643", "0.54098445", "0.54086214", "0.5400691", "0.5400092", "0.53889227", "0.5379254", "0.5373432", "0.5373432", "0.53693575", "0.5369272", "0.53664964", "0.53609306", "0.5349185", "0.5346608", "0.53466046", "0.5344723", "0.53444844", "0.53444844", "0.5339448", "0.5336116", "0.53341573", "0.5328541", "0.53285325", "0.53226024", "0.5316641", "0.53160554", "0.53123343", "0.5301133", "0.5298145", "0.52946776", "0.5290806", "0.5284134", "0.52826786", "0.5282048", "0.5282048", "0.52814376", "0.5273939", "0.5265492", "0.5262467", "0.5261421", "0.5257481", "0.5254473", "0.5253821" ]
0.0
-1
Starts the print server
void stop(SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void start() {\n System.out.println(\"server started\");\n mTerminalNetwork.listen(mTerminalConfig.port);\n }", "public static void main(String[] args) throws Exception {\n Registry registry = LocateRegistry.createRegistry(8080);\n registry.rebind(\"print\", new PrintServant());\n }", "public void startPrinting()\n {\n printerSimulator.startPrintingProcess();\n }", "public void start() {\n System.err.println(\"Server will listen on \" + server.getAddress());\n server.start();\n }", "public void startServer() {\n server.start();\n }", "private void startServer() {\n\t\ttry {\n//\t\t\tserver = new Server();\n//\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}", "private void start(String[] args){\n\t\tServerSocket listenSocket;\n\n\t\ttry {\n\t\t\tlistenSocket = new ServerSocket(Integer.parseInt(args[0])); //port\n\t\t\tSystem.out.println(\"Server ready...\");\n\t\t\twhile (true) {\n\t\t\t\tSocket clientSocket = listenSocket.accept();\n\t\t\t\tSystem.out.println(\"Connexion from:\" + clientSocket.getInetAddress());\n\t\t\t\tClientThread ct = new ClientThread(this,clientSocket);\n\t\t\t\tct.start();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error in EchoServer:\" + e);\n\t\t}\n\t}", "public void run(){\n\t\tstartServer();\n\t}", "public void run(){\r\n\t\tSystem.out.println(\"Launching Server\");\r\n\t\tServer srv = new Server(log);\r\n\t\tnew CollectorServer(srv).start();\r\n\t\ttry {\r\n\t\t\tnew ServerUDPThread(srv).start();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"Error in ServerUDP Broadcast\");\r\n\t\t}\r\n\t}", "public void startServer() {\n URLClassLoader loader = createClasspath(opts);\n X_Process.runInClassloader(loader, appServer\n .map(DevAppServer::doStartServer, getAppName() + \"Server\", getPort())\n .ignoreOut1().unsafe());\n }", "protected void serverStarted()\r\n {\r\n System.out.println\r\n (\"Server listening for connections on port \" + getPort());\r\n }", "protected void serverStarted()\n {\n System.out.println(\"Server listening for connections on port \" + getPort());\n }", "public void run() {\n running = true;\n System.out.println(\"Server started on port: \" + port);\n manageClients();\n receive();\n startConsole();\n }", "public void startServer()\n\t{\n\t\twhile(true)\n\t\t{\n\t\t\tSystem.out.println(\"Listen\");\n\t\t\tif(listenInitialValuesRequest)\n\t\t\t{\n\t\t\t\tlistenInitialValuesRequest();\n\t\t\t}\n\t\t}\n\t}", "protected void serverStarted()\n {\n // System.out.println\n // (\"Server listening for connections on port \" + getPort());\n }", "public static void main (String[] args){\r\n\t\tnew Server().startRunning();\r\n\t}", "public static void main(String[] args) {\n\t\tEndpoint.publish(\"http://127.0.0.1:1111/cs\", new Calculator());\r\n\t\tSystem.out.println(\"Server has started\");\r\n\r\n\t}", "public static void main(String[] args) {\n \n //Instanciate Manager\n PrintManager printmanager;\n \n //Initialize all the things\n printmanager = new PrintManager(Integer.parseInt(args[0]),\n Integer.parseInt(args[1]),Integer.parseInt(args[2]));\n \n //GO FOR IT MAN!\n printmanager.start();\n \n \n \n \n }", "public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }", "public void run()\n\t{\n\t\trunning = true;\n\t\tSystem.out.println(\"Server started on port \" + port);\n\t}", "private static void startServer() {\n new Thread() {\n public void run() {\n Server server = new Server();\n server.startUDP();\n }\n }.start();\n }", "private static void startServer(){\n try{\n MMServer server=new MMServer(50000);\n }catch (IOException ioe){\n System.exit(0);\n }\n \n }", "public void startRunning() {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tserver = new ServerSocket(6789, 100); //6789 is the port number for docking(Where to connect). 100 is backlog no, i.e how many people can wait to access it.\n\t\t\t\twhile (true) {\n\t\t\t\t\t//This will run forever.\n\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\t\t\twaitForConnection();\n\t\t\t\t\t\tsetupStreams();\n\t\t\t\t\t\twhileChatting();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tcatch(EOFException eofException) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tshowMessage(\"\\n The server has ended the connection!\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinally {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcloseAll();\n\t\t\t\t\t\t//Housekeeping.\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcatch(IOException ioException ) {\n\t\t\t\t\n\t\t\t\tioException.printStackTrace();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "public static void main(String[] args) {\n try {\n Thread t = new GreetingServer(4445);\n System.out.println(\"started\");\n t.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void startServer() {\n clientListener.startListener();\n }", "public void start(){\n runServerGUI();\n // new server thread object created\n ServerThread m_Server = new ServerThread(this);\n m_Server.start();\n }", "public static void main(String[] args) \n {\n int port = DEFAULT_PORT; //Port to listen on\n\n\n ServerGui serverGui = new ServerGui();\n serverGui.setVisible(true);\n serverGui.setSize(450, 300);\n \n \n //----------------------------------\n // EchoServer sv = new EchoServer(port);\n \n }", "public void run() {\n\t\trun(null, CommunicationDefaults.CONSOLE_PORT);\n\t}", "public void start() {\n\t\t\n\t\ttry {\n\t\t\tmainSocket = new DatagramSocket(PORT_NUMBER);\n\t\t}\n\t\tcatch(SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t//Lambda expression to shorten the run method\n\t\tThread serverThread = new Thread( () -> {\n\t\t\tlisten();\n\t\t});\n\t\t\n\t\tserverThread.start();\n\t}", "public void start() {\n _serverRegisterProcessor = new ServerRegisterProcessor();\n _serverRegisterProcessor.start();\n }", "public static void main(String[] args) {\r\n int port = 5000;\r\n Server server = new Server(port);\r\n\r\n //Start the server thread:\r\n server.start();\r\n }", "public void startServer() {\n\r\n try {\r\n echoServer = new ServerSocket(port);\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n // Whenever a connection is received, start a new thread to process the connection\r\n // and wait for the next connection.\r\n while (true) {\r\n try {\r\n clientSocket = echoServer.accept();\r\n numConnections++;\r\n ServerConnection oneconnection = new ServerConnection(clientSocket, numConnections, this);\r\n new Thread(oneconnection).start();\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }\r\n\r\n }", "public void startServer() {\n System.out.println(\"Inicie\");\n httpServer = new HttpServer();\n httpServer.registerProessor(\"/App\", this);\n try {\n httpServer.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args){\n ChatRoomServer server = new ChatRoomServer(portNumber);\n server.startServer();\n }", "public static void main(String[] args) {\n loadServer();\n\n }", "public void startRunning(){\r\n\t\ttry{\r\n\t\t\twhile( true ){\r\n\t\t\t\tserver = new ServerSocket(PORT);\r\n\t\t\t\ttry{\r\n\t\t\t\t\twaitForClient(1);\r\n\t\t\t\t\twaitForClient(2);\r\n\t\t\t\t\tnew ServerThread(connectionClient1, connectionClient2, this).start();\r\n\t\t\t\t}\r\n\t\t\t\tcatch( EOFException e ){\r\n\t\t\t\t\tshowMessage(\"\\nServer ended the connection\");\r\n\t\t\t\t}\r\n\t\t\t\tfinally {\r\n\t\t\t\t\tserver.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch( IOException e ){\r\n\t\t}\r\n\t}", "public void run() {\n ServerSocketChannelFactory acceptorFactory = new OioServerSocketChannelFactory();\n ServerBootstrap server = new ServerBootstrap(acceptorFactory);\n\n // The pipelines string together handlers, we set a factory to create\n // pipelines( handlers ) to handle events.\n // For Netty is using the reactor pattern to react to data coming in\n // from the open connections.\n server.setPipelineFactory(new EchoServerPipelineFactory());\n\n server.bind(new InetSocketAddress(port));\n }", "public static void main(String[] args) {\r\n\t\t// create a server object and start it\r\n\t\tServer server = new Server(1500);\r\n\t\tserver.start();\r\n\t}", "public static void main(String[] args) {\n Server server = new Server(1234);\n server.listen();\n \n // YOUR CODE HERE\n // It is not required (or recommended) to implement the server in\n // this runner class.\n }", "public static void main(String[] args) {\n new ServerControl().start();\n new UserMonitor().start();\n boolean listening = true;\n //listen for connection attempt and handle it accordingly\n try (ServerSocket socket = new ServerSocket(4044)) {\n while (listening) {\n new AwaitCommand(Singleton.addToList(socket.accept())).start();\n System.out.println(\"Connection started...\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\r\n ChatServer server = new ChatServer(portNumber);\r\n server.startServer();\r\n }", "@Test\r\n public void startServerAndThreads() throws IOException {\r\n //init\r\n InetAddress iPAddress = InetAddress.getByName(\"localhost\");\r\n int port = 99;\r\n\r\n Server server = new Server(port, iPAddress);\r\n server.start();\r\n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tinitialiseServer(args[0]);\n\t\t\twhile (running == true) {\n\t\t\t\tif (((numLiveThreads.get()) == 0) && (running == false)) {\n\t\t\t\t\tshutdown();\n\t\t\t\t}\n\t\t\t\thandleIncomingConnection();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\toutputServiceErrorMessageToConsole(e.getMessage());\n\t\t} finally {\n\t\t\tshutdown();\n\t\t}\n\t}", "public void startServer() throws IOException {\n log.info(\"Starting server in port {}\", port);\n try {\n serverSocket = new ServerSocket(port);\n this.start();\n log.info(\"Started server. Server listening in port {}\", port);\n } catch (IOException e) {\n log.error(\"Error starting the server socket\", e);\n throw e;\n }\n }", "public static void main(String[] args) {\n\n\t\tint port = 8080;\n\t\t\n\t\tif(args.length == 1)\n\t\t{\n\t\t\ttry {\n\t\t\t\tport = Integer.parseInt(args[0]);\n\t\t\t}\n\t\t\tcatch (NumberFormatException nfe)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"[SERVER REPLY]> Integer Port is not provided. Server will start at default port.\");\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"[SERVER REPLY]> Using Server Port : \" + port);\n\t\t\n\t\tWeb_Server Server = new Web_Server(port);\n\t\t\n\t\tnew Thread(Server).start(); //starts a new thread\n\t}", "public void start() {\n threadPoolExecutor.setCorePoolSize(configurations.threadPoolSize());\n new Thread(this::startServer).start();\n }", "public Server() {\n print_addr();\n follow_updates();\n }", "public static void main(String[] args) {\n\t\t//System.setSecurityManager(new RMISecurityManager());\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Server is starting...\");\n\t\t\n\t\ttry {\n\t\t\tServer server = new Server(sPort);\n\t\t\tserver.start();\n\t\t\tSystem.out.println(\"Press Enter to exit.\") ;\n\t\t\t\n\t\t\tin.nextLine() ;\n\t\t\t\n\t\t\t//Naming.rebind(Utilities.SERVER_NAME, gc);\n\t\t\tSystem.out.println(\"Server is started\");\n\t\t} catch (RemoteException | UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tin.close(); \n\t}", "public static void main(String[] args){\n\n Executors.newSingleThreadExecutor().execute(new Runnable() {\n public void run() {\n System.out.println(\"Starting\");\n new ScheduleExecutor();\n }\n });\n\n new Server(5821, 10).launch();\n\n }", "@Override\n public void start() {\n // only start once, this is not foolproof as the active flag is set only\n // when the watchdog loop is entered\n if ( isActive() ) {\n return;\n }\n\n Log.info( \"Running server with \" + server.getMappings().size() + \" mappings\" );\n try {\n server.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start server on port '\" + server.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start server:\\n\" + ioe );\n System.exit( 1 );\n }\n\n if ( redirectServer != null ) {\n try {\n redirectServer.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start redirection server on port '\" + redirectServer.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start redirection server:\\n\" + ioe );\n }\n }\n\n // Save the name of the thread that is running this class\n final String oldName = Thread.currentThread().getName();\n\n // Rename this thread to the name of this class\n Thread.currentThread().setName( NAME );\n\n // very important to get park(millis) to operate\n current_thread = Thread.currentThread();\n\n // Parse through the configuration and initialize all the components\n initComponents();\n\n // if we have no components defined, install a wedge to keep the server open\n if ( components.size() == 0 ) {\n Wedge wedge = new Wedge();\n wedge.setLoader( this );\n components.put( wedge, getConfig() );\n activate( wedge, getConfig() );\n }\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.components_initialized\" ) );\n\n final StringBuffer b = new StringBuffer( NAME );\n b.append( \" v\" );\n b.append( VERSION.toString() );\n b.append( \" initialized - Loader:\" );\n b.append( Loader.API_NAME );\n b.append( \" v\" );\n b.append( Loader.API_VERSION );\n b.append( \" - Runtime: \" );\n b.append( System.getProperty( \"java.version\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"java.vendor\" ) );\n b.append( \")\" );\n b.append( \" - Platform: \" );\n b.append( System.getProperty( \"os.arch\" ) );\n b.append( \" OS: \" );\n b.append( System.getProperty( \"os.name\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"os.version\" ) );\n b.append( \")\" );\n Log.info( b );\n\n // enter a loop performing watchdog and maintenance functions\n watchdog();\n\n // The watchdog loop has exited, so we are done processing\n terminateComponents();\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.terminated\" ) );\n\n // Rename the thread back to what it was called before we were being run\n Thread.currentThread().setName( oldName );\n\n }", "public static void main(String[] args) {\n\n try (ServerSocket ss = new ServerSocket(PORT)) {\n System.out.println(\"chat.Server is started...\");\n System.out.println(\"Server address: \" + getCurrentIP() + \":\" + PORT);\n\n while (true) {\n Socket socket = ss.accept();\n new Handler(socket).start();\n }\n\n } catch (IOException e) {\n System.out.println(\"chat.Server error.\");\n }\n }", "public static void main(String[] args) {\n\t\tSettingUI serverUI = new SettingUI(\"server\");\n\n\t\t//System.out.print(\"Port(eg.1111): \");\n\t\t// int portNumber = 1111;\n\t\t// int portNumber = console.nextInt();\n\t\t// GameServer gameServer = new GameServer(portNumber);\n\t\t// gameServer.setUpChat();\n\t\t// gameServer.start();\n\t}", "public static void main(final String[] args) throws IOException {\n startServer();\n }", "public void start(int port);", "public void startRunning(){\n\t\ttry{\n\t\t\tserver = new ServerSocket(6789, 100);\n\t\t\t//int Port Number int 100 connections max (backlog / queue link)\n\t\t\twhile(true){\n\t\t\t\ttry{\n\t\t\t\t\twaitForConnection();\n\t\t\t\t\tsetupStreams();\n\t\t\t\t\twhileChatting();\n\t\t\t\t\t//connect and have conversation\n\t\t\t\t}catch(EOFException eofe){\n\t\t\t\t\tshowMessage(\"\\n Punk Ass Bitch.\");\n\t\t\t\t}finally{\n\t\t\t\t\tcloseChat();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(IOException ioe){\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}\n\t}", "public static void main(String[] args) {\n boolean cmdStart = false;\n if (args.length != 0) {\n GuiUtils guiUtils = new GuiUtils();\n String errorResponse = guiUtils.verifyPort(args[0]);\n if (errorResponse != null) {\n System.err.println(\"Could not start the Server: \" + errorResponse);\n System.exit(-1);\n } else {\n int port = Integer.parseInt(args[0]);\n HangmanServer hangmanServer = new HangmanServer();\n hangmanServer.config = new ServerConfiguration(port);\n hangmanServer.run();\n cmdStart = true;\n }\n }\n \n if (!cmdStart) {\n launch(args);\n }\n }", "private void doPrint() {\n PrintManager printManager = (PrintManager) this\n .getSystemService(Context.PRINT_SERVICE);\n\n // Set job name, which will be displayed in the print queue\n String jobName = this.getString(R.string.app_name) + \" Document\";\n\n // Start a print job, passing in a PrintDocumentAdapter implementation\n // to handle the generation of a print document\n printManager.print(jobName, new MyPrintDocumentAdapter(this),\n null); //\n }", "public static void main(String[] args) throws IOException {\t\t\t\n\t\t\n\t\tSystem.out.println(\"Starting server...\");\n\t\tGameServer gameServer = new GameServer(4321);\n\t\tgameServer.serve();\n\n\t}", "public static void main(String[] args) {\n\t\ttry{\n\t\t\tServerSocket socket = new ServerSocket(5004);\n\t\t\tSystem.out.println(\"Server is up and running!!!\");\n\t\t\twhile(true){\n\t\t\t\tSocket serverSocket = socket.accept();\n\t\t\t\t//thread creation\n\t\t\t\tThread t = new Thread(new PeerConnect(serverSocket));\n\t\t\t\tt.start();\n\t\t\t}\t\t\n\t\t}\n\t\tcatch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void startServer() {\n\t\tlogger.trace(\"startServer() is called\");\n\n\t\tKKModellable model = new KKModel(jokeFile);\n\t\tList<KKJoke> kkJokeList = model.getListOfKKJokes();\n\t\tint numOfJokes = kkJokeList.size();\n\t\ttotalJokesLabel.setText(\"Total jokes: \" + String.valueOf(numOfJokes));\n\t\t\n\t\tif (numOfJokes > 0){\n\t\t\tif (socketListeningTask == null){\n\t\t\t\tsocketListeningTask = new BackgroundSocketListener(kkServerPort, serverStatusLabel);\n\t\t\t\tsocketListeningTask.execute();\n\t\t\t\tConnectionCounter.resetConnectionCounter();\n\t\t\t\tserverStatusLabel.setText(serverStarted);\n\t\t\t\ttotalClientConectionLabel.setText(\"Client connections: 0\");\n\n\t\t\t\tstartServerToolBarButton.setEnabled(false);\n\t\t\t\tstopServerToolBarButton.setEnabled(true);\n\t\t\t\t\n\t\t\t\tconnectionCheckingTask = new BackgroundConnectionCheck(totalClientConectionLabel);\n\t\t\t\tconnectionCheckingTask.execute();\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t//Do not start server because joke list is empty\n\t\t\tserverStatusLabel.setText(jokesNotFound);\n\t\t\tSystem.err.println(\"Empty joke source\");\n\t\t\tlogger.info(\"Empty joke source\");\n\t\t\tUtility.displayErrorMessage(\"Jokes not found or missing the \\\" kk-jokes.txt \\\" file which must be stored in the same path as this server app. \"\n\t\t\t+ \"Each line or joke in the \\\" kk-jokes.txt \\\" file must also be formatted as \\\" clue ### answer \\\" without the quotes.\");\n\t\t}\n\t}", "public void start() {\n System.out.println(\"Machine started.\");\n }", "public static void main (String[] args){\n Printer printer = new Printer();\n printer.print();\n }", "@SuppressWarnings(\"resource\")\n public static void main(String[] args) {\n final Scanner in = new Scanner(System.in);\n\n // Enter the port to listen\n System.out.print(\"Port: \");\n final int port = in.nextInt();\n in.nextLine();\n\n // Start the server\n Server server = new ServerImpl(port);\n server.start();\n }", "public static void main(String[] args) throws IOException, InterruptedException {\n final RouterServer server = new RouterServer();\n server.start(50051);\n server.blockUntilShutdown();\n }", "public void start() {\n System.out.println(\"start\");\n }", "public static void main(String[] args) throws IOException {\n log.info(\"The ticket to ride server is running.\");\n\n try (ServerSocket listener = new ServerSocket(9001)) {\n while (true) {\n Socket socket = listener.accept();\n\n MiniServer h = new MiniServer(socket);\n\n new Thread(h::go).start();\n }\n } catch (BindException be) {\n log.error(\"Cannot start server\", be);\n JOptionPane.showMessageDialog(null, \"Cannot start server\",\n be.getMessage(), JOptionPane.ERROR_MESSAGE);\n System.exit(1);\n }\n }", "protected void start() throws IOException {\r\n\t\tif (smscListener == null) {\r\n\t\t\tSystem.out.print(\"Enter port number> \");\r\n\t\t\tint port = Integer.parseInt(keyboard.readLine());\r\n\t\t\tSystem.out.print(\"Starting listener... \");\r\n\t\t\tsmscListener = new SMSCListenerImpl(port, true);\r\n\t\t\tprocessors = new PDUProcessorGroup();\r\n\t\t\tmessageStore = new ShortMessageStore();\r\n\t\t\tdeliveryInfoSender = new DeliveryInfoSender();\r\n\t\t\tdeliveryInfoSender.start();\r\n\t\t\tusers = new Table(usersFileName);\r\n\t\t\tfactory = new SimulatorPDUProcessorFactory(processors, messageStore, deliveryInfoSender, users);\r\n\t\t\tfactory.setDisplayInfo(displayInfo);\r\n\t\t\tsmscListener.setPDUProcessorFactory(factory);\r\n\t\t\tsmscListener.start();\r\n\t\t\tSystem.out.println(\"started.\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Listener is already running.\");\r\n\t\t}\r\n\t}", "public void runServer() {\n\t\tint i = 0;\n\n\t\tclientList = new ArrayList<>();\n\t\ttry {\n\t\t\tServerSocket listener = new ServerSocket(port);\n\n\t\t\tSocket server;\n\n\t\t\tprintDetails();\n\n\t\t\twhile ((i++ < maxConnections) || (maxConnections == 0)) {\n\n\t\t\t\tserver = listener.accept();\n\t\t\t\tSession session = new Session(server, this.storageLocation );\n\n\t\t\t\tnew Thread(session).start();\n\n\t\t\t\tString name = session.getName();\n\t\t\t\tSystem.out.printf(\"%s STARTED\\r\\n\", name );\n\t\t\t\tclientList.add( session );\n\t\t\t\tdoGC();\n\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"IOException on socket listen: \" + ioe);\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "@Override\n @SuppressWarnings(\"CallToPrintStackTrace\")\n public void simpleInitApp() {\n \n\n try {\n System.out.println(\"Using port \" + port);\n // create the server by opening a port\n server = Network.createServer(port);\n server.start(); // start the server, so it starts using the port\n } catch (IOException ex) {\n ex.printStackTrace();\n destroy();\n this.stop();\n }\n System.out.println(\"Server started\");\n // create a separat thread for sending \"heartbeats\" every now and then\n new Thread(new NetWrite()).start();\n server.addMessageListener(new ServerListener(), ChangeVelocityMessage.class);\n // add a listener that reacts on incoming network packets\n \n }", "@Override\r\n\tpublic void initial() {\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// System.out.println(\"LocalProxy run on \" + port);\r\n\t}", "public static void main(String[] args) {\n startupTime = DateUtil.getCurrentTimeSeconds();\n\n try {\n LoggingConfiguration.checkLoggingConfig();\n\n ServerConfiguration.load(\"server.ini\");\n GameConfiguration.load(\"game.ini\");\n\n log = LoggerFactory.getLogger(Kepler.class);\n ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.ADVANCED);\n\n // TODO: The \"Standard\" ASCII from\n // http://patorjk.com/software/taag/#p=display&f=Standard&t=Kepler\n // On a grey background with white ASCII text\n // ASCII logo on the left side, contributors and other credits/info on the right side\n // TODO: also a way to disable the fancy headers, as in production it would only fill the logs\n log.info(\"Kepler - Habbo Hotel V21 Emulation\");\n\n if (!Storage.connect()) {\n return;\n }\n\n log.info(\"Setting up game\");\n\n WalkwaysManager.getInstance();\n ItemManager.getInstance();\n CatalogueManager.getInstance();\n RoomModelManager.getInstance();\n RoomManager.getInstance();\n PlayerManager.getInstance();\n FuserightsManager.getInstance();\n NavigatorManager.getInstance();\n GameScheduler.getInstance();\n CommandManager.getInstance();\n MessageHandler.getInstance();\n TextsManager.getInstance();\n\n // Get the server variables for the socket to listen on\n serverIP = ServerConfiguration.getString(\"server.bind\");\n serverPort = ServerConfiguration.getInteger(\"server.port\");\n\n // Get an InetAddressValidator\n InetAddressValidator validator = InetAddressValidator.getInstance();\n\n // Validate an IPv4 or IPv6 address\n if (!validator.isValid(serverIP)) {\n log.error(\"%s is not a valid IP\", serverIP);\n return;\n }\n\n // getByName parses IPv6, IPv4 and DNS all in one go\n serverIP = InetAddress.getByName(serverIP).getHostAddress();\n\n // Create the server instance\n // TODO: listen on both IPv4 and IPv6 if serverIP is 0.0.0.0 or localhost\n server = new NettyServer(serverIP, serverPort);\n server.createSocket();\n server.bind();\n\n Runtime.getRuntime().addShutdownHook(new Thread(() -> dispose()));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void start() throws IOException {\n\n\n int port = 9090;\n server = ServerBuilder.forPort(port)\n .addService(new CounterServiceImpl())\n .build()\n .start();\n // logger.info(\"Server started, listening on \" + port);\n\n /* Add hook when stop application*/\n Runtime.getRuntime().addShutdownHook(new Thread() {\n @Override\n public void run() {\n // Use stderr here since the logger may have been reset by its JVM shutdown hook.\n // IRedis.USER_SYNC_COMMAND.\n System.err.println(\"*** shutting down gRPC server since JVM is shutting down\");\n Count.this.stop();\n System.err.println(\"*** server shut down\");\n\n }\n });\n }", "public static void main(String[] args) throws IOException\n {\n ServerSocket listener = new ServerSocket(8080);\n try\n {\n while (true)\n {\n Socket clientSocket = listener.accept();\n new Thread(new JavaServer(clientSocket)).start();\n }\n }\n finally\n {\n listener.close();\n }\n }", "public void startLocalServer() {\n \t boolean exists = (new File(addeMcservl)).exists();\n \t if (exists) {\n \t // Create and start the thread if there isn't already one running\n\t \tif (thread != null) {\n \t \t\tthread = new AddeThread();\n \t \t\tthread.start();\n \t\t System.out.println(addeMcservl + \" was started\");\n \t \t} else {\n \t \t\tSystem.out.println(addeMcservl + \" is already running\");\n \t \t}\n \t } else {\n \t \tSystem.out.println(addeMcservl + \" does not exist\");\n \t }\n \t}", "final public static void main(String[] args)\r\n\t{\n\t\ttry\r\n\t\t{\r\n\t\t\tServerSocket test = new ServerSocket(9999);\r\n\t\t\ttest.close();\r\n\t\t\ttest = null;\r\n\t\t} catch (IOException e)\r\n\t\t{\r\n\t\t\tCommonMethods.displayErrorMessage(Text.MAIN.PORT9999_TAKEN_ERROR);\r\n\t\t\tCommonMethods.terminate();\r\n\t\t}\r\n\t\t//start the program\r\n\t\tStartUp startUp = new StartUp();\r\n\t\tstartUp.addStartUpListener(new StartUpListener(startUp));\r\n\t}", "public void runServer()\n\t{\n\t\taddText(\"Server started at \" + LocalDateTime.now());\n\t\t\n\t\tint cnt = 0;\n\t\twhile(true)\n\t\t{\n\t\t\ttry {\n\t\t\t\t// Accept a request\n\t\t\t\taddText(\"Server is waiting for connection....\");\n\t\t\t\tSocket client = server.accept();\n\t\t\t\tConnectionThread connect = new ConnectionThread(client);\n\t\t\t\t\n\t\t\t\t// Show message\n\t\t\t\taddText(\"Server is connect!\");\n\t\t\t\taddText(\"Player\" + cnt + \"'s IP address is\" + client.getInetAddress());\n\t\t\t\tcnt++;\n\t\t\t\t\n\t\t\t\t// Add to List\n\t\t\t\tconnectionPool.add(connect);\n\t\t\t\t\n\t\t\t\t// If at least two players, Start the game\n\t\t\t\taddText(\"Pool has \" + connectionPool.size() + \" connection\");\n\t\t\t\tif(connectionPool.size() >= 2)\n\t\t\t\t\tclientStart();\n\t\t\t\t\n\t\t\t\t// Start connectionThread\n\t\t\t\tconnect.start();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "void startServer(String name, Config.ServerConfig config);", "public void startServer()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t}\r\n\t\tcatch (IOException e1)\r\n\t\t{\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Waiting for client connection.\");\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tSocket socket = serverSocket.accept();\r\n\t\t\tSystem.out.println(\"Client connects.\");\r\n\r\n\t\t\tObjectInputStream ois = null;\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tois = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));\r\n\t\t\t\tObject o = ois.readObject();\r\n\t\t\t\tif (!(o instanceof Message))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception(\"Received information is not message. Skip.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmessage = (Message) o;\r\n\t\t\t\tSystem.out.println(\"Message received: \" + message);\r\n\t\t\t}\r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tcatch (ClassNotFoundException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\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\tfinally\r\n\t\t\t{\r\n\t\t\t\tCloseUtil.closeAll(ois, socket, serverSocket);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main(String[] args){\n Printer printer = new Printer();\n printer.print();\n }", "public static void main(String[] args) {\n // start server on port 1500 unless a PortNumber is specified\n\n Scanner scanner = new Scanner(System.in);\n int portNumber, serverCapacity;\n\n System.out.print(\"enter max capacity of server: \");\n serverCapacity = scanner.nextInt();\n\n System.out.print(\"enter port number of server: \");\n portNumber = scanner.nextInt();\n\n\n // create a server object and start it\n Server server = new Server(portNumber, serverCapacity);\n server.start();\n }", "public void launch() throws NotBoundException, IOException\n\t{\n\t\t//call method to connect to server\t\t\n\t\tServerManager serverConnect = initialConnect();\t\n\t\n\t\t//get Setup menu from server\n\t\tSetUpMenu newSetup = new SetUpMenu(serverConnect);\n\t\tnewSetup.welcomeMenu();\n\t}", "public static void main(String[] args) {\n\t\tServer.Serv();\n\t}", "public static void main(String[] args) throws IOException {\n int port = 8080;\n\n try {\n if (args.length == 1) {\n port = Integer.parseInt(args[0]);\n }\n ServerSocket serverSocket = new ServerSocket(port);\n ChatServer server = new ChatServer(serverSocket);\n server.startServer();\n } catch (NumberFormatException ne) {\n System.out.println(\"Illegal inputs provided when starting the server!\");\n return;\n }\n }", "public static void main(String[] args) throws Exception {\n\t\t\n\t\tJTextArea output = new JTextArea();\n\t\tJPanel panel = new JPanel(new BorderLayout());\n\t\tJFrame frame = new JFrame(\"server\");\n\t\tPrintStream stream = new PrintStream(new NewOutputStream(output));\n\t\tSystem.setOut(stream);\n\t\tSystem.setErr(stream);\n\n\t\toutput.setEditable(false);\n\t\toutput.setBackground(Color.BLACK);\n\t\toutput.setForeground(Color.WHITE);\n\t\toutput.setFont(Font.createFont(Font.TRUETYPE_FONT, new File(\"res/pixelfont.ttf\")).deriveFont(28f));\n\t\tpanel.add(output);\n\t\tframe.add(panel);\n\t\t\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setSize(800, 600); \n\t\tframe.setVisible(true);\n\t\t\n\t\tSystem.out.println(\"Starting server...\");\n\t\t\n\t\ttry{\n\t\t\t\n\t\tint port = threads.startServer();\n\t\tSystem.out.println(\"Server started on port \" + port + \"!\");\n\t\t\n\t\tthreads.startThread();\n\t\t\n\t\t} catch (BindException error) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t}", "public void start(){\n log.debug(\"Starting Host Router\");\n lobbyThread = pool.submit(new Runnable() {\n public void run() {\n waitForClients();\n }\n });\n }", "public static void main(String[] args) {\r\n\t\tnew ServerFrame().setVisible(true);\r\n\t}", "public static void main(String[] args){\n\t\tif (args.length != 1) {\n\t\t\tSystem.out.println(\"Usage: java EchoServer <EchoServer port>\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tEchoServerMultiThreaded echoServerMultiThreaded = new EchoServerMultiThreaded();\n\t\techoServerMultiThreaded.start(args);\n\t}", "public void startClientServer() {\n try {\n this.server_socket = new ServerSocket( port );\n this.start();\n } catch (IOException e ) {\n System.err.println( \"Failure: Socket couldn't OPEN! -> \" + e );\n } finally {\n System.out.println( \"Success: Server socket is now Listening on port \" + port + \"...\" );\n }\n }", "public static void main(String[] args) throws Exception {\n final BiStreamServer node = new BiStreamServer(Integer.parseInt(args[0]), args[1], args[2]);\n node.startFiles(args[1]);\n //node.print();\n node.startGrpc();\n node.print();\n node.blockUntilShutdown();\n }", "public static void main(String[] args) {\n\n Server server = new Server();\n \n\n }", "public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }", "public static void main(String[] args) {\n\t\tThread t = new Thread(new Server());\n\t\tt.start();\n\t\ttry {\n\t\t\tt.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tprintJO p= new printJO();\n\t\t\n\t\tnew Thread(p.new printj()).start();\n\t\tnew Thread(p.new printO()).start();\n\t}", "@Override\n public void onStart(ITestContext tc) {\n StatusPrinter.printRunStart();\n }", "public static void start() {\n enableIncomingMessages(true);\n }", "public void startListening() {\r\n\t\tlisten.startListening();\r\n\t}", "@Override\n public void run() {\n try {\n registerWithServer();\n initServerSock(mPort);\n listenForConnection();\n\t} catch (IOException e) {\n Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, e);\n setTextToDisplay(\"run(): \" + e.getMessage());\n setConnectedStatus(false);\n\t}\n }", "public static void main(String[] args) {\n\t\tServer server = new Server();\n\t\tnew Thread(server).start();\n\n\t}", "public void start() throws IOException {\n\t\tserverSocket = new ServerSocket(port);\n\t\tserverCallbacks.forEach(c -> c.onServerStarted(this, port));\n\t}", "public static void main(String[] args) {\n \tWelcome console = null;\n\t\ttry {\n\t\t\t//console = new Welcome(conn);\n\t\t\tconsole = new Welcome();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \tconsole.start();\n }", "public static void main(String[] args) throws IOException {\n int puerto=1212,mode=1;\n for (int i = 0; i< args.length;i++ ){\n if(args[i].equals(\"-p\")){\n i++;\n puerto =Integer.parseInt(args[i]);\n }\n if(args[i].equals(\"-i\")){\n i++;\n mode =Integer.parseInt(args[i]);\n }\n }\n Server s = new Server(puerto,mode);\n s.StartThreads();\n }" ]
[ "0.7173449", "0.7051298", "0.70201546", "0.6883264", "0.6642842", "0.650467", "0.6485156", "0.6434597", "0.63584", "0.6330901", "0.6301055", "0.6299174", "0.6240823", "0.6227169", "0.62187475", "0.61942184", "0.6159348", "0.61251044", "0.6124158", "0.611795", "0.6110214", "0.6108042", "0.60839736", "0.6078804", "0.60787666", "0.607506", "0.6073575", "0.60694444", "0.60508007", "0.60144746", "0.5972704", "0.5970149", "0.5966169", "0.5960418", "0.59344643", "0.5927694", "0.59252375", "0.59176534", "0.5904482", "0.58987975", "0.58929163", "0.5889543", "0.58784944", "0.5878013", "0.5877007", "0.5856748", "0.5855617", "0.5853106", "0.5851006", "0.5845971", "0.58441305", "0.5830143", "0.5828543", "0.5812483", "0.5808874", "0.5806858", "0.57909536", "0.5786315", "0.5786266", "0.5772395", "0.5769466", "0.57549757", "0.5751451", "0.57433975", "0.57403636", "0.5731512", "0.5731053", "0.5730242", "0.572834", "0.5710673", "0.5703051", "0.569512", "0.56870776", "0.56839615", "0.5679637", "0.56730735", "0.56721807", "0.56709176", "0.56698996", "0.5665843", "0.5665736", "0.56652033", "0.56624556", "0.56620103", "0.5660329", "0.5652275", "0.56512254", "0.5650671", "0.5650433", "0.56471413", "0.5644473", "0.5643289", "0.5640181", "0.56338644", "0.56337154", "0.56320864", "0.56173", "0.56138897", "0.5613667", "0.5613459", "0.5601399" ]
0.0
-1
Stops the print server
void restart(SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop()\n {\n printerSimulator.stop();\n }", "public void stop() {\n server.stop();\n }", "public void stop() {\n System.err.println(\"Server will stop\");\n server.stop(0);\n }", "public void kill() {\n this.server.stop();\n }", "public void stop() {\n System.err.println(\"Server will stop\");\n server.stop(0);\n }", "public void stopServer() {\n stop();\n }", "public void stop () {\n if (server != null)\n server.shutDown ();\n server = null;\n }", "private void stopServer() {\n\t\ttry {\n//\t\t\tserver.shutdown();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}", "public void stop() {\n if (server != null) {\n server.shutdown();\n }\n }", "public void stopLocalServer() {\n \t\tif (thread != null) {\n \t\t\tthread.stopProcess();\n \t\t\tthread.interrupt();\n \t\t\tthread = null;\n \t\t\tSystem.out.println(addeMcservl + \" was stopped\");\n \t\t} else {\n \t\t\tSystem.out.println(addeMcservl + \" is not running\");\n \t\t}\n \t}", "public void Stop(){\r\n\t\trunning = false;\r\n\t\thelp.print(\"Closing server, waiting for workers to complete\");\r\n\t}", "public void stop() {}", "public void stopServer() {\n\t\tthis.running=false;\t\t\t\t\t\t\t//the loop of the thread fails\n\t\ttry {\n\t\t\tthis.socket.close();\t\t\t\t\t//closes the socket\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(\"TCPServer : Socket non fermé\");\n\t\t}\n\t}", "public void stopServer() {\r\n\t\tserverRunning = false;\r\n\t}", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop() {\n tcpServer.stopServer();\n ThreadExecutor.shutdownClient(this.getClass().getName());\n }", "@Override\n public void stop() {\n Thread t = new Thread(server::stopOrderProcess);\n t.setName(\"Server close task\");\n t.start();\n serverFrame.enableControls(false, false);\n enableControls(false, false);\n }", "public void stop() {\n \n // first interrupt the server engine thread\n if (m_runner != null) {\n m_runner.interrupt();\n }\n\n // close server socket\n if (m_serverSocket != null) {\n try {\n m_serverSocket.close();\n }\n catch(IOException ex){\n }\n m_serverSocket = null;\n } \n \n // release server resources\n if (m_ftpConfig != null) {\n m_ftpConfig.dispose();\n m_ftpConfig = null;\n }\n\n // wait for the runner thread to terminate\n if( (m_runner != null) && m_runner.isAlive() ) {\n try {\n m_runner.join();\n }\n catch(InterruptedException ex) {\n }\n m_runner = null;\n }\n }", "public void stop() {\n System.out.println(\"stop\");\n }", "public void stop() {\n\t\tthis.controller.terminate();\n\t}", "public void stopCommunicationServer() {\n\t\t\tthis.running = false;\n\t\t}", "public void stop() {\n }", "public void stop() {\n }", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "public void stop() {\n\t\tSystem.out.println(\"结束系统1\");\r\n\t}", "public void stop() {\r\n\t\t// Tell the Gui Agent to shutdown the system\r\n\t\tGui.shutdown = true;\r\n\t}", "public void stop() {\n try {\n getXMPPServer().stop();\n }\n catch (Exception e) {\n Log.error(e.getMessage(), e);\n }\n sleep();\n }", "public void stop() {\n\t\ttry {\n\t\t\tif (serverSocket != null)\n\t\t\t\tserverSocket.close();\n\t\t} catch (IOException ioe) {\n\t\t\t// shouldn't happen\n\t\t}\n\t}", "public void shutdown() {\n\t\tserver.stop(0);\n\t}", "public void stop() {\n\t}", "public void stop() {\n while (currentState.get() == ServerConstants.SERVER_STATUS_STARTING) {\r\n try {\r\n Thread.sleep(500);\r\n } catch (InterruptedException e) {\r\n // Ignore.\r\n }\r\n }\r\n\r\n if (currentState.compareAndSet(ServerConstants.SERVER_STATUS_STARTED, ServerConstants.SERVER_STATUS_OFF)) {\r\n try {\r\n bossGroup.shutdownGracefully();\r\n workerGroup.shutdownGracefully();\r\n connectionPool.shutdownAll();\r\n\r\n failedTimes.set(0);\r\n\r\n logger.info(\"Netty server stopped\");\r\n } catch (Exception ex) {\r\n logger.warn(\"Failed to stop netty server (port={}), exception:\", port, ex);\r\n }\r\n }\r\n }", "public void stop() {\n System.out.println(\"STOP!\");\n xp.stop();\n }", "@Override\r\n\tpublic void stop() {\n\t\tSystem.out.println(\"Jeep车停止\");\r\n\r\n\t}", "protected void stop() {\n keepGoing = false;\n try {\n new Socket(\"localhost\", port);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "public void stop() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tif (socket != null) {\n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Socket closed.\");\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\n\t\t}\n\t}", "public void stop() {\n\t\t\n\t}", "public void stop()\n {\n }", "public synchronized void shutdown() {\n server.stop();\n }", "public boolean stop();", "public synchronized void stop() {\r\n\t\t//TODO read why stop is deprecated http://docs.oracle.com/javase/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html\r\n\t\tif (udplistener != null) {\r\n\t\t\tudplistener.datagramSocket.close();\r\n\t\t\tudpthread.stop();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif (tcplistener != null) {\r\n\t\t\t\ttcplistener.serverSocket.close();\r\n\t\t\t\ttcpthread.stop();\r\n\t\t\t}\r\n\t\t} catch (IOException e) {e.printStackTrace();}\t\t\r\n\t}", "public void serverStop() {\n\t\tJOptionPane.showMessageDialog(dlg, \"与服务器失去连接\");\n\t\tserver = null;\n\t\tconnectAction.setEnabled(false);\n\t\t\n\t}", "protected void stop() throws IOException {\r\n\t\tif (smscListener != null) {\r\n\t\t\tSystem.out.println(\"Stopping listener...\");\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tSMSCSession session;\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tsession = proc.getSession();\r\n\t\t\t\t\tSystem.out.print(\"Stopping session \" + i + \": \" + proc.getSystemId() + \" ...\");\r\n\t\t\t\t\tsession.stop();\r\n\t\t\t\t\tSystem.out.println(\" stopped.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsmscListener.stop();\r\n\t\t\tsmscListener = null;\r\n\t\t\tif (deliveryInfoSender != null) {\r\n\t\t\t\tdeliveryInfoSender.stop();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Stopped.\");\r\n\t\t}\r\n\t}", "public void Stop() throws IOException {\n DisposeServer();\n }", "public void stop() {\n\t\t// To be garbage collected if adapter remains active\n\t\tservletOut = null;\n\t}", "protected void stop() {\n keepGoing = false;\n // connect to myself as Client to exit\n try {\n new Socket(\"localhost\", port);\n } catch(Exception e) {\n // exception handling\n }\n }", "public static void stop(){\n printStatic(\"Stopped vehicle\");\n }", "public void stop(){\n\t\t\n\t}", "public void stop() {\n\t\tserver.saveObjectToFile(offlineMessagesFileName, _offlineMessages);\n\t\tserver.saveObjectToFile(onlineClientsFileName, _onlineClients);\n\t\tserver.saveObjectToFile(clientFriendsFileName, _clientFriends);\n\t\t_offlineMessages.clear();\n\t\t_onlineClients.clear();\n\t\t_clientFriends.clear();\n\t\tserver.stop();\n\t}", "public void stop() {\n\t\tthis.close(this.btcomm);\n\t}", "public void stop() {\n\t\texec.stop();\n\t}", "public synchronized void stopProxy() {\n \n isStopped = true;\n \n try {\n \n this.ss.close();\n \n }catch(IOException e) { \n \n throw new RuntimeException(\"Error closing \"+Thread.currentThread().getName(), e); \n }\n }", "public void stop() {\n\t\tif (this.isRunning() && !this.isManagedExternally) {\n\t\t\ttry {\n\t\t\t\tHTTP.release(this.http.get(this.shutdown));\n\t\t\t} catch (IOException exception) {\n\t\t\t\tthis.processRunner.abort();\n\t\t\t}\n\n\t\t\tthis.isManagedExternally = null;\n\t\t}\n\t}", "@Override\n\tpublic void stop()\n\t\t{\n\t\t}", "public void stop() {\n System.setErr(saveErr);\n System.setOut(saveOut);\n running = false;\n try {\n flushThread.join();\n } catch (InterruptedException e) {\n }\n }", "public static void stop() {\n enableIncomingMessages(false);\n }", "public void stop() {\n\t\tstopFlag.set(true);\n\t\tif (serverStarted.get()) {\n\t\t\tnotifyListener(\"About to stop server. \" + toString());\n\t\t\ttry {\n\t\t\t\tserverActivity.get();\n\t\t\t\tserverSocket.close();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tnotifyListener(\"Interrupted whilst waiting for the server start to finish. [message=\" + e.getMessage() + \"]\" + toString());\n\t\t\t} catch (ExecutionException e) {\n\t\t\t\tnotifyListener(\"Server start caused exception. [message=\" + e.getMessage() + \"]\" + toString());\n\t\t\t} catch (IOException e) {\n\t\t\t\tnotifyListener(\"Unable to close cleanly the server socket. [message=\" + e.getMessage() + \"]\" + toString());\n\t\t\t}\n\t\t\tserverStarted.set(false);\n\t\t} else {\n\t\t\tnotifyListener(\"Server already stopped. \" + toString());\n\t\t}\n\t}", "void stop(long timeout);", "@Override\n public void stop() {\n \tSystem.out.println(\"Closing GUI\");\n \tconn.closeConn();\n }", "private void stopServer() {\n\t\tlogger.trace(\"stopServer() is called\");\n\n\t\tif (socketListeningTask != null){\n\t\t\tsocketListeningTask.stopServer();\n\t\t\t\n\t\t\ttry {\n\t\t\t\t//Sleep time is needed to prevent connection counter being reset too soon before socketListeningTask.stopServer() is completed. Sleep time may need to be increased if not enough.\n\t\t\t\tThread.sleep(200);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tSystem.err.println(\"thread sleep method of KKServerGUI is being interrupted.\");\n\t\t\t\tlogger.error(\"thread sleep method of KKServerGUI is being interrupted.\");\n\t\t\t}\n\t\t\t\n\t\t\tConnectionCounter.resetConnectionCounter();\n\t\t\tsocketListeningTask = null;\n\t\t\tserverStatusLabel.setText(serverStopped);\n\t\t\ttotalClientConectionLabel.setText(\"Client connections: 0\");\n\n\t\t\tstartServerToolBarButton.setEnabled(true);\n\t\t\tstopServerToolBarButton.setEnabled(false);\n\n\t\t\tconnectionCheckingTask.stopCheckingConnection();\n\t\t}\n\t}", "public void stop(){\n }", "public static void stopServer() {\n try {\n clientListener.stopListener();\n server.close();\n connectionList.clear();\n } catch (IOException ex) {\n System.err.println(\"Error closing server: \\\"\" + ex.getMessage() + \"\\\"\");\n }\n System.out.println(\"SERVER SHUT DOWN\");\n }", "public synchronized void stop() {\n try {\n if (isRunning) {\n isRunning = false;\n thread.join();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.exit(0);\n }", "public void stopZapServer() {\n if (process == null) return; //ZAP not running\n try {\n LogManager.suitLogger.info(\"Stopping ZAP\");\n api.core.shutdown();\n Thread.sleep(2000);\n process.destroy();\n } catch (final Exception e) {\n LogManager.suitLogger.error(\"Error shutting down ZAP.\", e);\n }\n }", "void halt() {\n this.ws.stop = true;\n this.wr.stop = true;\n }", "public void stopping();", "public void stop() {\r\n\t\t//If the program has an error this will stop the program\r\n\t\ttry {\r\n\t\t\trunning = false;\r\n\t\t\tg.dispose();\r\n\t\t\tthread.join();\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void stop() {\n stop = true;\n }", "public void stop() {\n log.info(\"Stopped\");\n execFactory.shutdown();\n cg.close();\n }", "void stop() {\n }", "public void stop(){\n quit = true;\n }", "public void stopListener(){\n\t\tsynchronized (httpServerMutex){\n\t\t\ttry{\n\t\t\t\tif( webServer != null ){\n\t\t\t\t\twebServer.shutdownServer();\n\t\t\t\t\twebServer = null; // NOPMD by luke on 5/26/07 11:10 AM\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch( InterruptedException e){\n\t\t\t\t//Ignore, InterruptedException don't matter in this context.\n\t\t\t}\n\t\t\tcatch( Exception e){\n\t\t\t\t//Ignore, InterruptedException don't matter in this context.\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.75247675", "0.6946973", "0.6920846", "0.6838059", "0.68364197", "0.67652375", "0.6628818", "0.65608835", "0.6542845", "0.6539217", "0.65249056", "0.6476735", "0.64593804", "0.6451485", "0.6420975", "0.6420975", "0.6420975", "0.6420975", "0.6420975", "0.6420975", "0.6420975", "0.6420975", "0.6420975", "0.6420975", "0.6420975", "0.6420975", "0.6420975", "0.6420975", "0.6420975", "0.63875985", "0.63476074", "0.63471174", "0.63373685", "0.63363916", "0.6314919", "0.63128275", "0.63128275", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.62950957", "0.6284116", "0.62788457", "0.62530166", "0.6251234", "0.6242302", "0.6234066", "0.6228598", "0.6225172", "0.62249756", "0.62087226", "0.62033564", "0.61831987", "0.6147961", "0.6135894", "0.6133643", "0.61246496", "0.6112414", "0.610511", "0.6084324", "0.6071894", "0.60661095", "0.60628796", "0.6061555", "0.60560304", "0.60365963", "0.6036048", "0.6034566", "0.60182536", "0.6011537", "0.60046905", "0.60035497", "0.5992885", "0.59708893", "0.5970805", "0.5955276", "0.595354", "0.5949936", "0.5946568", "0.5938522", "0.593673", "0.593095", "0.59246266", "0.59162074", "0.5900507", "0.5899851", "0.5893578", "0.5885293" ]
0.0
-1
Stops the print server, clears the print queue and starts the print server again
String status(SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop()\n {\n printerSimulator.stop();\n }", "public void kill() {\n this.server.stop();\n }", "public void cancelPendingPrintJobs()\n {\n printerSimulator.cancelPendingPrintJobs();\n }", "public void stop() {\n System.err.println(\"Server will stop\");\n server.stop(0);\n }", "public void stop() {\n System.err.println(\"Server will stop\");\n server.stop(0);\n }", "public void stop() {\n server.stop();\n }", "void startShutdown() {\n closed.set(true);\n regionManager.stopScanners();\n synchronized(toDoQueue) {\n toDoQueue.clear(); // Empty the queue\n delayedToDoQueue.clear(); // Empty shut down queue\n toDoQueue.notifyAll(); // Wake main thread\n }\n serverManager.notifyServers();\n }", "public void stopServer() {\r\n\t\tserverRunning = false;\r\n\t}", "public void stopLocalServer() {\n \t\tif (thread != null) {\n \t\t\tthread.stopProcess();\n \t\t\tthread.interrupt();\n \t\t\tthread = null;\n \t\t\tSystem.out.println(addeMcservl + \" was stopped\");\n \t\t} else {\n \t\t\tSystem.out.println(addeMcservl + \" is not running\");\n \t\t}\n \t}", "public void stopServer() {\n stop();\n }", "public void Stop(){\r\n\t\trunning = false;\r\n\t\thelp.print(\"Closing server, waiting for workers to complete\");\r\n\t}", "public void stop () {\n if (server != null)\n server.shutDown ();\n server = null;\n }", "public void stop() {\n try {\n getXMPPServer().stop();\n }\n catch (Exception e) {\n Log.error(e.getMessage(), e);\n }\n sleep();\n }", "public void stopCommunicationServer() {\n\t\t\tthis.running = false;\n\t\t}", "private void stopServer() {\n\t\ttry {\n//\t\t\tserver.shutdown();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}", "private void stopClient() {\n\n run = false;\n\n if (bufferOut != null) {\n bufferOut.flush();\n bufferOut.close();\n }\n\n messageListener = null;\n bufferIn = null;\n bufferOut = null;\n serverMessage = null;\n }", "public void stop() {\n if (server != null) {\n server.shutdown();\n }\n }", "public static void stopServer() {\n try {\n clientListener.stopListener();\n server.close();\n connectionList.clear();\n } catch (IOException ex) {\n System.err.println(\"Error closing server: \\\"\" + ex.getMessage() + \"\\\"\");\n }\n System.out.println(\"SERVER SHUT DOWN\");\n }", "public void stop() {\n System.setErr(saveErr);\n System.setOut(saveOut);\n running = false;\n try {\n flushThread.join();\n } catch (InterruptedException e) {\n }\n }", "public void shutdown() {\n\t\tserver.stop(0);\n\t}", "private void stopServer() {\n\t\tlogger.trace(\"stopServer() is called\");\n\n\t\tif (socketListeningTask != null){\n\t\t\tsocketListeningTask.stopServer();\n\t\t\t\n\t\t\ttry {\n\t\t\t\t//Sleep time is needed to prevent connection counter being reset too soon before socketListeningTask.stopServer() is completed. Sleep time may need to be increased if not enough.\n\t\t\t\tThread.sleep(200);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tSystem.err.println(\"thread sleep method of KKServerGUI is being interrupted.\");\n\t\t\t\tlogger.error(\"thread sleep method of KKServerGUI is being interrupted.\");\n\t\t\t}\n\t\t\t\n\t\t\tConnectionCounter.resetConnectionCounter();\n\t\t\tsocketListeningTask = null;\n\t\t\tserverStatusLabel.setText(serverStopped);\n\t\t\ttotalClientConectionLabel.setText(\"Client connections: 0\");\n\n\t\t\tstartServerToolBarButton.setEnabled(true);\n\t\t\tstopServerToolBarButton.setEnabled(false);\n\n\t\t\tconnectionCheckingTask.stopCheckingConnection();\n\t\t}\n\t}", "protected void stopAndReleaseGrpcServer() {\n final Server localServer = this.server;\n if (localServer != null) {\n localServer.shutdown();\n this.server = null;\n log.info(\"gRPC server shutdown.\");\n }\n }", "public void stop() {\n while (currentState.get() == ServerConstants.SERVER_STATUS_STARTING) {\r\n try {\r\n Thread.sleep(500);\r\n } catch (InterruptedException e) {\r\n // Ignore.\r\n }\r\n }\r\n\r\n if (currentState.compareAndSet(ServerConstants.SERVER_STATUS_STARTED, ServerConstants.SERVER_STATUS_OFF)) {\r\n try {\r\n bossGroup.shutdownGracefully();\r\n workerGroup.shutdownGracefully();\r\n connectionPool.shutdownAll();\r\n\r\n failedTimes.set(0);\r\n\r\n logger.info(\"Netty server stopped\");\r\n } catch (Exception ex) {\r\n logger.warn(\"Failed to stop netty server (port={}), exception:\", port, ex);\r\n }\r\n }\r\n }", "public synchronized void shutdown() {\n server.stop();\n }", "public void run(){\n\t\t// Stop servlets\n\t\ttry{\n\t\t\tserver.stop();\n\t\t}catch(Exception e){}\n\t}", "@Override\n public void stop() {\n Thread t = new Thread(server::stopOrderProcess);\n t.setName(\"Server close task\");\n t.start();\n serverFrame.enableControls(false, false);\n enableControls(false, false);\n }", "public void stop() {\n \n // first interrupt the server engine thread\n if (m_runner != null) {\n m_runner.interrupt();\n }\n\n // close server socket\n if (m_serverSocket != null) {\n try {\n m_serverSocket.close();\n }\n catch(IOException ex){\n }\n m_serverSocket = null;\n } \n \n // release server resources\n if (m_ftpConfig != null) {\n m_ftpConfig.dispose();\n m_ftpConfig = null;\n }\n\n // wait for the runner thread to terminate\n if( (m_runner != null) && m_runner.isAlive() ) {\n try {\n m_runner.join();\n }\n catch(InterruptedException ex) {\n }\n m_runner = null;\n }\n }", "public void shutDown()\n {\n stunStack.removeSocket(serverAddress);\n messageSequence.removeAllElements();\n localSocket.close();\n }", "public void stop() {\n tcpServer.stopServer();\n ThreadExecutor.shutdownClient(this.getClass().getName());\n }", "public void serverStop() {\n\t\tJOptionPane.showMessageDialog(dlg, \"与服务器失去连接\");\n\t\tserver = null;\n\t\tconnectAction.setEnabled(false);\n\t\t\n\t}", "public void stopServer() {\n\t\tthis.running=false;\t\t\t\t\t\t\t//the loop of the thread fails\n\t\ttry {\n\t\t\tthis.socket.close();\t\t\t\t\t//closes the socket\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(\"TCPServer : Socket non fermé\");\n\t\t}\n\t}", "public static void stopServer()\n {\n keepRunning = false;\n Logger.getLogger(ChatServer.class.getName()).log(Level.INFO, \"Stop server!\");\n }", "public void stop() {\n System.out.println(\"stop\");\n }", "public void stop() {\n\t\tSystem.out.println(\"结束系统1\");\r\n\t}", "public void stop() {\n\t\tserver.saveObjectToFile(offlineMessagesFileName, _offlineMessages);\n\t\tserver.saveObjectToFile(onlineClientsFileName, _onlineClients);\n\t\tserver.saveObjectToFile(clientFriendsFileName, _clientFriends);\n\t\t_offlineMessages.clear();\n\t\t_onlineClients.clear();\n\t\t_clientFriends.clear();\n\t\tserver.stop();\n\t}", "protected void stop() {\n keepGoing = false;\n try {\n new Socket(\"localhost\", port);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "public static void stop() {\n enableIncomingMessages(false);\n }", "void halt() {\n this.ws.stop = true;\n this.wr.stop = true;\n }", "public void stopZapServer() {\n if (process == null) return; //ZAP not running\n try {\n LogManager.suitLogger.info(\"Stopping ZAP\");\n api.core.shutdown();\n Thread.sleep(2000);\n process.destroy();\n } catch (final Exception e) {\n LogManager.suitLogger.error(\"Error shutting down ZAP.\", e);\n }\n }", "public void stop() {\n clockThread = null;\n }", "public void startPrinting()\n {\n printerSimulator.startPrintingProcess();\n }", "private void doStop()\r\n {\r\n requestQueue.add( new ChargerHTTPConn( weakContext,\r\n \"STOP\", \r\n null,\r\n null,\r\n null, \r\n null,\r\n false,\r\n null,\r\n null ) );\r\n }", "public void print(String toPrint) {\n for (Printer print : printers) {\n// System.out.println(\"Start \" + print.busyEndTime);\n if (print.isAvailable()) {\n System.out.println(\"Printer \" + print.id + \" is available to print: \" + toPrint);\n }\n print.busyEndTime = LocalTime.now().plusSeconds(5);\n// System.out.println(\"End \" + print.busyEndTime);\n }\n // Its not needed to actually print with a printer in this exercise\n// System.out.println(\"Printer \" + id + \" is printing.\");\n// busyEndTime = LocalTime.now().plusSeconds(5);\n }", "public void stop() {\n // Stop multicast daemon\n mdaemon.stopRunning();\n mdaemon= null;\n \n stop_announce_timer();\n // Clean Routing information\n if (rprocesses != null)\n rprocesses.clear();\n // Clean Routing table\n if (main_rtab != null)\n main_rtab.clear();\n // Clear Routing table window\n update_routing_window();\n\n local_name= ' ';\n neig= null;\n win= null;\n ds= null;\n tableObj= null;\n }", "public synchronized void shutServer() {\n \tmainDepartureTerminalEntrance.terminated = mainDepartureTerminalEntrance.terminated + 1;\n }", "@Override\n public void run() {\n System.err.println(\"*** shutting down gRPC server since JVM is shutting down\");\n try {\n GrpcServer.this.stop();\n } catch (InterruptedException e) {\n e.printStackTrace(System.err);\n }\n System.err.println(\"*** server shut down\");\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.err.println(\"*** shutting down gRPC server since JVM is shutting down\");\n\t\t\t\tNoteServer.this.stop();\n\t\t\t\tSystem.err.println(\"*** server shut down\");\n\t\t\t}", "@Override\r\n\tpublic void stop() {\n\t\tSystem.out.println(\"Jeep车停止\");\r\n\r\n\t}", "public void stop() {\n System.out.println(\"STOP!\");\n xp.stop();\n }", "public void stopServers() {\n EventHandlerService.INSTANCE.reset();\n UserRegistryService.INSTANCE.reset();\n\n if ( eventDispatcher != null ) {\n eventDispatcher.shutdown();\n }\n if ( userClientDispatcher != null ) {\n userClientDispatcher.shutdown();\n }\n if ( eventDispatcherThread != null ) {\n eventDispatcherThread.interrupt();\n }\n if ( userClientDispatcherThread != null ) {\n userClientDispatcherThread.interrupt();\n }\n }", "public void killServer(){\n\n try {\n server.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // figuring out avg time for all files received\n long temp = 0;\n for (Long time : totalTimes) {\n temp += time;\n }\n long avgTime = temp / fileCount;\n\n // ending messages\n String outMessage = \"\\n\\nThe avg time to receive \"+fileCount+\" files is: \"+avgTime+\"MS\";\n System.out.println(outMessage.toUpperCase());\n System.out.println(\"SERVER IS DONE!\");\n }", "public static void closeServer() {\n\t\trun = false;\n\t}", "public void sendStop(){\n if (isNetworkGame()){\n sender.println(\"stop\");\n sender.flush();\n }\n }", "public void ShutDown()\n {\n bRunning = false;\n \n LaunchLog.Log(COMMS, LOG_NAME, \"Shut down instruction received...\");\n\n for(LaunchServerSession session : Sessions.values())\n {\n LaunchLog.Log(COMMS, LOG_NAME, \"Closing session...\");\n session.Close();\n }\n \n LaunchLog.Log(COMMS, LOG_NAME, \"...All sessions are closed.\");\n }", "public void terminate () {\n for (int i=0; i<threads; i++) {\n servers[i].terminate ();\n }\n }", "public void stop() {}", "public void stop() {\n thread = null;\n }", "protected void serverStopped()\r\n {\r\n System.out.println\r\n (\"Server has stopped listening for connections.\");\r\n }", "protected void serverStopped()\n {\n // System.out.println\n // (\"Server has stopped listening for connections.\");\n }", "public void stop() throws InterruptedException {\n if (server != null) {\n server.shutdown().awaitTermination(Constants.DEFAULT_SERVER_TIMEOUT, TimeUnit.SECONDS);\n }\n }", "public void stop() {\n\t\ttry {\n\t\t\tif (serverSocket != null)\n\t\t\t\tserverSocket.close();\n\t\t} catch (IOException ioe) {\n\t\t\t// shouldn't happen\n\t\t}\n\t}", "@Override\n public void run() {\n System.err.println(\"*** shutting down gRPC server since JVM is shutting down\");\n WindowServer.this.stop();\n System.err.println(\"*** server shut down\");\n }", "public void stop() {\n\t\t// To be garbage collected if adapter remains active\n\t\tservletOut = null;\n\t}", "public void shutDown() {\n StunStack.shutDown();\n stunStack = null;\n stunProvider = null;\n requestSender = null;\n\n this.started = false;\n\n }", "public void Stop() {\r\n\t\t\r\n\t\tthread = null;\r\n\t}", "public void shutdown() {\n _udpServer.stop();\n _registrationTimer.cancel();\n _registrationTimer.purge();\n }", "protected void stop() {\n keepGoing = false;\n // connect to myself as Client to exit\n try {\n new Socket(\"localhost\", port);\n } catch(Exception e) {\n // exception handling\n }\n }", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void kill() {\n\t\tif (combox == null){\n\t\t\treturn;\n\t\t}\n\t\tPOPBuffer popBuffer = combox.getBufferFactory().createBuffer();\n\t\tMessageHeader messageHeader = new MessageHeader(0,\n\t\t\t\tMessageHeader.KILL_ALL, Semantic.SYNCHRONOUS);\n\t\tmessageHeader.setRequestID(requestID.incrementAndGet());\n\t\tpopBuffer.setHeader(messageHeader);\n\n\t\tpopDispatch(popBuffer);\n\t\ttry {\n\t\t\tPOPBuffer responseBuffer = combox.getBufferFactory().createBuffer();\n\t\t\tpopResponse(responseBuffer, messageHeader.getRequestID());\n\t\t} catch (POPException e) {\n\t\t\treturn;\n\t\t}\n\t}", "public void halt() {\n closeSocket(sock1);\n closeSocket(sock2);\n }", "public void stop() {\n\t\texec.stop();\n\t}", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();" ]
[ "0.6339243", "0.6190777", "0.61619043", "0.60955316", "0.6024417", "0.5998965", "0.5943718", "0.59162337", "0.58742", "0.58701223", "0.5809809", "0.5770258", "0.5714973", "0.56946564", "0.5694596", "0.56897265", "0.56868386", "0.5644489", "0.5641269", "0.56332844", "0.5589894", "0.55808496", "0.5549745", "0.55248976", "0.55234784", "0.55170715", "0.54689944", "0.54541385", "0.54361194", "0.54342866", "0.5430565", "0.5428643", "0.5406505", "0.53767955", "0.53635275", "0.5355155", "0.5341756", "0.5337078", "0.53332394", "0.531416", "0.53045815", "0.5296817", "0.528842", "0.5288153", "0.5284958", "0.5284644", "0.52746236", "0.52612865", "0.5258121", "0.5255604", "0.5205238", "0.52015793", "0.51829904", "0.5175336", "0.517314", "0.5169904", "0.51513255", "0.5141593", "0.5135538", "0.5129107", "0.51247597", "0.5124238", "0.51090515", "0.5107188", "0.51050997", "0.51026803", "0.5101511", "0.5097333", "0.5097333", "0.5097333", "0.5097333", "0.5097333", "0.5097333", "0.5097333", "0.5097333", "0.5097333", "0.5097333", "0.5097333", "0.5097333", "0.5097333", "0.5097333", "0.5097333", "0.5094597", "0.50945014", "0.5091928", "0.5088769", "0.5088769", "0.5088769", "0.5088769", "0.5088769", "0.5088769", "0.5088769", "0.5088769", "0.5088769", "0.5088769", "0.5088769", "0.5088769", "0.5088769", "0.5088769", "0.5088769", "0.5088769" ]
0.0
-1
Prints status of printer on the user's display
String readConfig(String parameter, SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void PrinterStatus(){\n PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);\n System.out.println(\"Printer Services found:\");\n printService(services);\n\n // Look up the default print service\n PrintService service = PrintServiceLookup.lookupDefaultPrintService();\n if (service!=null) {\n System.out.println(\"Default Printer Service found:\");\n System.out.println(\"t\" + service);\n }\n\n\t\n // find printer service by name\n AttributeSet aset_name = new HashAttributeSet();\n aset_name.add(new PrinterName(\"Microsoft XPS Document Writer\", null));\n services = PrintServiceLookup.lookupPrintServices(null, aset_name);\n\n System.out.println(\"Printer Service Microsoft XPS Document Writer:\");\n printService(services);\n \n // find printer service by ip\n PrintServiceAttributeSet aset_URI = new HashPrintServiceAttributeSet();\n try {\n aset_URI.add(new PrinterURI(new URI(\"this ipp is wrong --ipp://hostName/printerName\")));\n } catch (URISyntaxException e) {\n System.out.println(\"URI exception caught: \"+e);\n }\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n \n /*\n //another way to print to a specific uri\n URI printerURI = null;\n try {\n printerURI = new URI(\"ipp://SERVER:631/printers/PRINTER_NAME\");\n } catch (URISyntaxException ex) {\n Logger.getLogger(PrinterStatus.class.getName()).log(Level.SEVERE, null, ex);\n }\n IppPrintService svc = new IppPrintService(printerURI);\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n // following is the way to print sth in a format of flavor\n InputStream stream = new BufferedInputStream(new FileInputStream(\"image.epl\"));\n DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;\n Doc myDoc = new SimpleDoc(stream, flavor, null);\n DocPrintJob job = svc.createPrintJob();\n job.print(myDoc, null);\n */\n \n /*\n // find services that support a particular input format (e.g. JPEG)\n services = PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.JPEG, null);\n System.out.println(\"Printer Services with JPEG support:\");\n printService(services);\n\n //find services that support a set of print job capabilities (e.g. color)\n aset = new HashAttributeSet();\n aset.add(ColorSupported.SUPPORTED);\n services = PrintServiceLookup.lookupPrintServices(null, aset);\n\n System.out.println(\"Printer Services with color support:\");\n printService(services);\n */ \n }", "public void printStatus();", "public void printStatus(){\n System.out.println();\n System.out.println(\"Status: \");\n System.out.println(currentRoom.getLongDescription());\n currentRoom.printItems();\n System.out.println(\"You have made \" + moves + \" moves so far.\");\n }", "private void actionPrint() {\n // get PrinterJob\n PrinterJob job = PrinterJob.getPrinterJob();\n MyPrintable printable = new MyPrintable(job.defaultPage(), layoutPanel);\n\n // setup Printable, Pageable\n job.setPrintable(printable);\n job.setPageable(printable);\n\n // display print dialog and print\n if (job.printDialog()) {\n try {\n job.print();\n } catch (PrinterException e) {\n e.printStackTrace();\n }\n }\n }", "public static void status(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n System.out.printf(\"\\nNOMBRE:\\t\\t\\t\"+nombrePersonaje);\n\tSystem.out.printf(\"\\nPuntos De Vida (HP):\\t\"+puntosDeVida);\n\tSystem.out.printf(\"\\nPuntos De mana (MP):\\t\"+puntosDeMana);\n System.out.printf(\"\\nNivel: \\t\\t\\t\"+nivel);\n\tSystem.out.printf(\"\\nExperiencia:\\t\\t\"+experiencia);\n\tSystem.out.printf(\"\\nOro: \\t\\t\"+oro);\n System.out.printf(\"\\nPotion:\\t\\t\\t\"+articulo1);\n System.out.printf(\"\\nHi-Potion:\\t\\t\"+articulo2);\n System.out.printf(\"\\nM-Potion:\\t\\t\"+articulo3);\n System.out.printf(\"\\n\\tEnemigos Vencidos:\\t\");\n\tSystem.out.printf(\"\\nNombre:\\t\\t\\tNo.Derrotas\");\n System.out.printf(\"\\nDark Wolf:\\t\\t\"+enemigoVencido1);\n\tSystem.out.printf(\"\\nDragon:\\t\\t\\t\"+enemigoVencido2);\n System.out.printf(\"\\nMighty Golem:\\t\\t\"+enemigoVencido3);\t\n }", "void PrintOnScreen(String toPrnt);", "public void startPrinting()\n {\n printerSimulator.startPrintingProcess();\n }", "private boolean printing_status() {\n\t\treturn _status_line != null;\n\t}", "public void print() {\n\t\tPrinter.print(doPrint());\n\t}", "public void actionPerformed(ActionEvent e) {\n \t\tPrinterJob job = PrinterJob.getPrinterJob();\n \t\tjob.setPrintable(this);\n \t\tboolean ok = job.printDialog();\n \t\tif (ok) {\n \t\t\ttry {\n \t\t\t\tjob.print();\n \t\t\t} catch (PrinterException ex) {\n \t\t\t\t/* The job did not successfully complete */\n \t\t\t}\n \t\t}\n \n \t}", "public void doPrint() {\n printBehavior.printReceipt();\n\n }", "public void doPrint()\n {\n PrinterJob printJob = PrinterJob.getPrinterJob();\n \n printJob.setPrintable((Printable) mapComponent);\n if (printJob.printDialog()) {\n try {\n printJob.print();\n } catch (Exception e) {\n ErrorHandler.displayError(\"An error occured during printing:\\n\" + e, ErrorHandler.ERR_PRINT_FAIL);\n }\n }\n }", "public void printDetails()\r\n\t{\r\n\t\tSystem.out.println(flightNumber);\r\n\t\tSystem.out.println(departurePoint);\r\n\t\tSystem.out.println(destination);\r\n\t\tSystem.out.println(departureTime);\r\n\t\tSystem.out.println(arrivalTime);\r\n\t\tSystem.out.println(checkedInPassengers);\r\n\t\tif(status == 'S')\r\n\t\t\tSystem.out.println(\"Scheduled\");\r\n\t\t\t\r\n\t\tif(status == 'B')\r\n\t\t\tSystem.out.println(\"Boarding\");\r\n\t\tif(status == 'D')\r\n\t\t\tSystem.out.println(\"Departed\");\r\n\t\tif(status == 'C')\r\n\t\t\tSystem.out.println(\"Canceled\");\r\n\t\t\r\n\t\t\t\t\r\n\t}", "public void print()\n {\n System.out.println();\n System.out.println(\"Ticket to \" + destination +\n \" Price : \" + price + \" pence \" + \n \" Issued \" + issueDateTime);\n System.out.println();\n }", "public void printStatus() {\n\t\tSystem.out.println(\"Current : \"+current+\"\\n\"\n\t\t\t\t+ \"Tour restant : \"+nb_rounds+\"\\n\"\n\t\t\t\t\t\t+ \"Troupe restant : \"+nb_to_train);\n\t}", "void printFleet(ConsolePrinter printer);", "public void print() {\n System.out.println(\"I am \" + status() + (muted ? \" and told to shut up *sadface*\" : \"\") + \" (\" + toString() + \")\");\n }", "void printBattle(ConsolePrinter printer);", "public void print(String toPrint) {\n for (Printer print : printers) {\n// System.out.println(\"Start \" + print.busyEndTime);\n if (print.isAvailable()) {\n System.out.println(\"Printer \" + print.id + \" is available to print: \" + toPrint);\n }\n print.busyEndTime = LocalTime.now().plusSeconds(5);\n// System.out.println(\"End \" + print.busyEndTime);\n }\n // Its not needed to actually print with a printer in this exercise\n// System.out.println(\"Printer \" + id + \" is printing.\");\n// busyEndTime = LocalTime.now().plusSeconds(5);\n }", "public void printToScreen() {\n String type = \"\";\n switch (this.type) {\n case 1:\n type = \"Fashion\";\n break;\n case 2:\n type = \"Electronic\";\n break;\n case 3:\n type = \"Consumable\";\n break;\n case 4:\n type = \"Household appliance\";\n break;\n }\n// System.out.println(\"Type : \" + type);\n System.out.printf(\"%6d%15s%6f%20s\\n\", id, name, price, type);\n }", "public void Display() {\n\t\tSystem.out.println(Integer.toHexString(PID) + \"\\t\" + Integer.toString(CreationTime) + \"\\t\"+ Integer.toHexString(CommandCounter) + \"\\t\" + ProcessStatus.toString() \n\t\t+ \"\\t\" + Integer.toString(MemoryVolume) + \"\\t\" + Integer.toHexString(Priority) + \"\\t\" + ((MemorySegments != null)? MemorySegments.toString() : \"null\"));\n\t}", "public void printScreen() {\n\t\tBrowser.printScreen(this.getClass().getSimpleName());\n\t}", "public void print() {\n\t\tSystem.out.println(\"针式打印机打印了\");\n\t\t\n\t}", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "private void print(PrinterJob job, Node node) \n {\n jobStatus.textProperty().bind(job.jobStatusProperty().asString());\n \n // Print the node\n boolean printed = job.printPage(node);\n \n if (printed) \n {\n job.endJob();\n }\n }", "public void actionPerformed(ActionEvent e){\n if (e.getSource() instanceof JButton) {\r\n PrinterJob printJob = PrinterJob.getPrinterJob();\r\n PageFormat pf = new PageFormat();\r\n pf.setOrientation(PageFormat.LANDSCAPE);\r\n printJob.setPrintable(_instance, pf);\r\n //if (printJob.printDialog()) {\r\n try {\r\n printJob.print();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n //}\r\n }\r\n }", "public boolean isEnabledPrint() {\n return enabledPrint;\n }", "private void printTestingStatus(final boolean status) {\n this.out.println();\n this.print(\n new If<Text>(\n () -> status,\n () -> new GreenText(\"Testing successful.\"),\n () -> new RedText(\"Testing failed.\")\n ).value().text()\n );\n this.out.println();\n }", "public void print();", "public void print();", "public void print();", "public void print();", "public boolean getToPrint() {\r\n return this.toPrint;\r\n }", "@VisibleForTesting\n void print();", "@Override\n\tpublic String print(CliPrinter printer) {\n\t\treturn printer.printTProductCards(this);\n\t}", "public static void print() {\r\n\t\tSystem.out.println(\"1: Push\");\r\n\t\tSystem.out.println(\"2: Pop\");\r\n\t\tSystem.out.println(\"3: Peek\");\r\n\t\tSystem.out.println(\"4: Get size\");\r\n\t\tSystem.out.println(\"5: Check if empty\");\r\n\t\tSystem.out.println(\"6: Exit\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t}", "public void print() {\n DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;\n \n //Aca obtenemos el servicio de impresion por default\n //Si no quieres ver el dialogo de seleccionar impresora usa esto\n //PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n \n \n //Con esto mostramos el dialogo para seleccionar impresora\n //Si quieres ver el dialogo de seleccionar impresora usalo\n //Solo mostrara las impresoras que soporte arreglo de bits\n PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();\n PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);\n PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n PrintService service = ServiceUI.printDialog(null, 700, 200, printService, defaultService, flavor, pras);\n \n //Creamos un arreglo de tipo byte\n byte[] bytes;\n\n //Aca convertimos el string(cuerpo del ticket) a bytes tal como\n //lo maneja la impresora(mas bien ticketera :p)\n bytes = this.contenidoFactura.getBytes();\n //Creamos un documento a imprimir, a el se le appendeara\n //el arreglo de bytes\n Doc doc = new SimpleDoc(bytes,flavor,null);\n \n //Creamos un trabajo de impresión\n DocPrintJob job = service.createPrintJob();\n\n //Imprimimos dentro de un try de a huevo\n try {\n //El metodo print imprime\n job.print(doc, null);\n \n } catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n DocPrintJob cutjob = service.createPrintJob();\n DocPrintJob spacejob = service.createPrintJob();\n //dejando espacios al final\n byte[] espacio = (\"\\n \\n \\n \\n\").getBytes();\n try{\n spacejob.print(new SimpleDoc(espacio,flavor,null),null);\n }\n catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n //cortando el papel\n try{\n byte[] cutP = new byte[] { 0x1d, 'V', 1 };\n cutjob.print(new SimpleDoc(cutP,flavor,null),null); \n }catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n \n }", "private void printOut(String[] printerMakerResult)\n {\n //shows user the printerMaker result\n\n for(int i=0;i<printerMakerResult.length;i++)\n {\n outVideo.println(printerMakerResult[i]);\n outVideo.flush();\n }\n }", "public void print_dev() {\n\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName\r\n\t\t\t\t\t\t\t\t+\t\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)\r\n\t\t\t\t\t\t\t\t+\t\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Function Limit Count\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Eat : \"+TMGCSYS.tmgcLimitEat+\", Sleep : \"+TMGCSYS.tmgcLimitSleep\r\n\t\t\t\t\t\t\t\t+\t\", Walk : \"+TMGCSYS.tmgcLimitWalk+\", Study : \"+TMGCSYS.tmgcLimitStudy+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Ability\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" STR : \"+TMGCSYS.tmgcSTR+\", INT : \"+TMGCSYS.tmgcINT\r\n\t\t\t\t\t\t\t\t+\t\", DEB : \"+TMGCSYS.tmgcDEB+\", HET : \"+TMGCSYS.tmgcHET+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Job : \"+TMGCSYS.tmgc2ndJob\r\n\t\t\t\t\t\t\t\t);\r\n\t}", "private void doPrint() {\n PrintManager printManager = (PrintManager) this\n .getSystemService(Context.PRINT_SERVICE);\n\n // Set job name, which will be displayed in the print queue\n String jobName = this.getString(R.string.app_name) + \" Document\";\n\n // Start a print job, passing in a PrintDocumentAdapter implementation\n // to handle the generation of a print document\n printManager.print(jobName, new MyPrintDocumentAdapter(this),\n null); //\n }", "@Override\n public void run() {\n printfManager.openPrinter(alreadyBlueList.get(args));\n }", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}", "public void printStatus() {\n printBranches();\n printAllStages();\n printModified();\n printUntracked();\n }", "public String showStatus();", "public TextFilePrinter getPrinter();", "void format(Printer printer);", "public void print() {\n\t\tSystem.out.println(\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName+\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)+\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress);\r\n\t}", "private void myPrint(String x) {\n if (printOn) {\n System.out.println(x);\n }\n }", "@Override\n\tpublic void printInfo() {\n\t\tsuper.printInfo();\n\t\tmessage();\n\t\tdoInternet();\n\t\tmailing();\n\t\tcalling();\n\t\twatchingTV();\n\n\t}", "static void printStatus() {\r\n System.out.println(\"\"\"\r\n\r\n +---------------------------------------+\r\n | Welcome to the FIT2099 AutoShowroom! |\r\n +---------------------------------------+\"\"\");\r\n while(isRunning){\r\n try {\r\n consoleMenu();\r\n } catch (InputMismatchException e) {\r\n System.out.println(\"\\nInput Mismatch Exception encountered, sorry for the inconvenience!\");\r\n } catch (RuntimeException e) {\r\n System.out.println(\"\\nRuntime Exception encountered, sorry for the inconvenience!\");\r\n } catch (Exception e) {\r\n System.out.println(\"\\nSome other Exception encountered, sorry for the inconvenience!\");\r\n }\r\n }\r\n System.out.println(\"\\nThank you for visiting the FIT2099 Showroom\");\r\n }", "public void print() {\n System.out.println(\"Nome: \" + nome);\n System.out.println(\"Telefone: \" + telefone);\n }", "@Override\n\tpublic void print() {\n\t\tdecoratedPrinter.print();\n\t}", "interface PrintInterface{\n void display();\n boolean isDisplayed();\n\n}", "void printParking();", "private void dispPrinterWarnings(PrinterStatusInfo status) {\n String warningsMsg = \"\";\n\n if (status == null) {\n return;\n }\n\n if (status.getPaper() == Printer.PAPER_NEAR_END) {\n warningsMsg += getString(R.string.handlingmsg_warn_receipt_near_end);\n }\n\n if (status.getBatteryLevel() == Printer.BATTERY_LEVEL_1) {\n warningsMsg += getString(R.string.handlingmsg_warn_battery_near_end);\n }\n\n// edtWarnings.setText(\"Warning\");\n }", "public void print() {\n btprint(c);\n }", "private String statusExtractorV1(Printer printer) {\n Document document = getStatusDocument(printer.getUrl());\n\n String text = document.text();\n String status;\n String preProcessed = text.substring(text.indexOf(\"Host Name\"));\n if(\"Aficio SP 8200DN\".equals(printer.getModel()))\n status = preProcessed.substring(preProcessed.indexOf(\"Printer\")+8,preProcessed.indexOf(\"Toner\")-1);\n else\n status = preProcessed.substring(preProcessed.indexOf(\"Printer\")+8,preProcessed.indexOf(\"Copier\")-1);\n return status;\n }", "public void print()\n {\n chatarea.append(\"Sender:(\"+port.getText()+\")\"+System.lineSeparator()+msgarea.getText()+System.lineSeparator());\n }", "@Override\n\t\tpublic void print() {\n\n\t\t}", "public String print();", "ProcessRunner print();", "@Override\r\n\tpublic void print() {\n\t}", "private String statusExtractorV2(Printer printer) {\n Document document = getStatusDocument(printer.getUrl());\n\n String text = document.text();\n String preProcessed = text.substring(text.indexOf(\"Host Name\"));\n return preProcessed.substring(preProcessed.indexOf(\"System Status\")+14,preProcessed.indexOf(\"Toner Status \")-1);\n }", "public void setToPrint(Boolean toPrint) {\r\n this.toPrint = toPrint;\r\n }", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void print() {\n\t\t\n\t}", "public void print() {\n System.out.println(\"Command: \" + command);\n }", "public String getPrint_optr(){\r\n\t\treturn this.print_optr ;\r\n\t}", "void print();", "void print();", "void print();", "void print();", "void print();", "public void receiveResultuPD_Order_Print_Status(\n com.xteam.tourismpay.PFTMXStub.UPD_Order_Print_StatusResponse result) {\n }", "public static void Print() {\n\t\tSystem.out.println(\"Ticks: total \" + totalTicks + \", idle \" + idleTicks + \", system \" + systemTicks + \", user \"\n\t\t\t\t+ userTicks);\n\n\t\tSystem.out.println(\"Disk I/O: reads \" + numDiskReads + \", writes \" + numDiskWrites);\n\t\tSystem.out.println(\"Console I/O: reads \" + numConsoleCharsRead + \", writes \" + numConsoleCharsWritten);\n\t\tSystem.out.println(\"Paging: faults \" + numPageFaults);\n\n\t\tSystem.out.println(\"Network I/O: packets received \" + numPacketsRecvd + \", sent \" + numPacketsSent);\n\t}", "@Override\n\tpublic void print() {\n\n\t}", "@Override\n public void onPrinterAvailable(int flag) {\n Logger.i(TAG, \"working till here printer available!\");\n\n if (flag == 2) {\n// btn_PrintBill.setEnabled(false);\n// btn_Reprint.setEnabled(false);\n SetPrinterAvailable(false);\n } else if (flag == 5) {\n// btn_PrintBill.setEnabled(true);\n// btn_Reprint.setEnabled(true);\n// feedPrinter();\n SetPrinterAvailable(true);\n } else if (flag == 0) {\n// btn_PrintBill.setEnabled(true);\n// btn_Reprint.setEnabled(true);\n SetPrinterAvailable(false);\n }\n }", "public void print ()\n\t{\n\t\tSystem.out.println(\"Polyhedron File Name: \" + FileName);\n\t\tSystem.out.println(\"Object active: \" + Boolean.toString(isActive()));\n\t\tprintCoordinates();\n\t}", "public void print() {\n\t\tSystem.out.println(toString());\n\t}", "private static void printDetail() {\n System.out.println(\"Welcome to LockedMe.com\");\n System.out.println(\"Version: 1.0\");\n System.out.println(\"Developer: Sherman Xu\");\n System.out.println(\"sherman.xu@lockers.com\");\n }", "public void doPrint() {\n\n PrintingUtils.userPrintText(fDocument.getText(),\n fTextPanel.getDefaultValues(),\n this,\n this.getTitle());\n }", "public void print () {\n }", "public void printStatus(){\n System.out.println(\"Nodes: \" + \n getVertexCount() + \" Edges: \" + \n getEdgeCount()); \n //and \" + getEdgeCount() + \" edges active.\");\n }", "public interface PrintFinishListener {\n void onFinish();\n}", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "public int getPrintProgress(){\n\t\treturn printProgress;\n\t}", "public void print() {\n System.out.println(toString());\n }", "public void print() {\n\t\tString sqlList = \"select * from commodity;\";\n\t\tcommodityBuffer = new StringBuffer();\n\t\ttry {\n\t\t\tconnection = SQLConnect.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(sqlList);\n\n\t\t\t// put the commodity messages into a stringbuffer\n\t\t\twhile ( resultSet.next() ) {\n\t\t\t\tcommodityBuffer.append(resultSet.getString(\"number\")+\" - \"+resultSet.getString(\"name\")+\"\\n\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// show the commodity messages on window\n\t\tcommodityArea = new JTextArea(commodityBuffer.toString());\n\t}", "public void print()\n\t{\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t\tSystem.out.println(\"[Lives: \" + lives + \"][Score: \" + score + \n\t\t\t\t\t\t\t\"][Time: \" + gameTime + \"]\");\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t}else\n\t\t\tSystem.out.println(\"Spawn a player ship to view game info\");\n\t}", "public void print_statusline( boolean start, boolean left ) {\n\t\tif ( start ) {\n\t\t\tflush();\n\t\t\t_status_line = new StringBuffer( 10 );\n\t\t\t_status_line.append( _last_printed ); // store this here\n\t\t\treturn;\n\t\t}\n\n\t\t// this always prints to the statusline and is not affected by\n\t\t// outhide() or outcapture()\n\t\tflush();\n\t\t_platform_io.set_status_string( _status_line.toString().substring( 1 ), left );\n\t\t_last_printed = _status_line.charAt( 0 ); // and restore it\n\t\t_status_line = null;\n\t}", "public static void print() {\r\n System.out.println();\r\n }", "void printout() {\n\t\tprintstatus = idle;\n\t\tanyprinted = false;\n\t\tfor (printoldline = printnewline = 1;;) {\n\t\t\tif (printoldline > oldinfo.maxLine) {\n\t\t\t\tnewconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (printnewline > newinfo.maxLine) {\n\t\t\t\toldconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (newinfo.other[printnewline] < 0) {\n\t\t\t\tif (oldinfo.other[printoldline] < 0)\n\t\t\t\t\tshowchange();\n\t\t\t\telse\n\t\t\t\t\tshowinsert();\n\t\t\t} else if (oldinfo.other[printoldline] < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse if (oldinfo.other[printoldline] == printnewline)\n\t\t\t\tshowsame();\n\t\t\telse\n\t\t\t\tshowmove();\n\t\t}\n\t\tif (anyprinted == true)\n\t\t\tprintln(\">>>> End of differences.\");\n\t\telse\n\t\t\tprintln(\">>>> Files are identical.\");\n\t}", "public Object getPrinter(PageFormat pf);", "public void print() {\n\t\tSystem.out.println(\"ONOMA IDIOKTITH: \" + fname);\n\t\tSystem.out.println(\"EPWNYMO IDIOKTITH: \" + lname);\n\t\tSystem.out.println(\"DIEUTHINSH FARMAKEIOU: \" + address);\n\t\tSystem.out.println(\"THLEFWNO FARMAKEIOU: \" + telephone);\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args){\n Printer printer = new Printer();\n printer.print();\n }", "private void printScreen()\n {\n try\n {\n Graphics g = getGraphics();\n if(drawingArea != null && g != null)\n {\n g.drawImage(drawingArea, 0, 0, null);\n }\n\n // Sync the display on some systems.\n // (on Linux, this fixes event queue problems)\n Toolkit.getDefaultToolkit().sync();\n g.dispose();\n }\n catch(Exception ex)\n {\n System.out.println(\"Graphics error: \" + ex);\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tif(!usbfactory.is_connecusb())\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tprobe();\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tToast_Util.ToastString(getApplicationContext(),\"printer_connected\");//打印机已连接 printer connected\n\t\t\t\t}\n\n\n\t\t\t}", "@Override\r\n public void display(PrintWriter out) {\r\n if (this.nrBasic > 0) {\r\n out.println(\"Basic\");\r\n } else {\r\n super.display(out);\r\n }\r\n }", "protected void logToScreen() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tdisplayInfo = !displayInfo;\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tproc.setDisplayInfo(displayInfo);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfactory.setDisplayInfo(displayInfo);\r\n\t\t}\r\n\t}", "static void print (){\n \t\tSystem.out.println();\r\n \t}" ]
[ "0.7786165", "0.7508936", "0.7141271", "0.68235695", "0.66973126", "0.6619973", "0.6571195", "0.6531662", "0.64871866", "0.6481476", "0.6472766", "0.64598566", "0.6440881", "0.64309746", "0.64013594", "0.64007384", "0.63832676", "0.6365001", "0.63308674", "0.63247514", "0.6316209", "0.6272002", "0.62663925", "0.6239845", "0.62299365", "0.62132776", "0.62130266", "0.61960447", "0.61775047", "0.61775047", "0.61775047", "0.61775047", "0.6170694", "0.61682", "0.616271", "0.61406416", "0.6118417", "0.61181235", "0.6105327", "0.6085377", "0.608283", "0.6062094", "0.6049288", "0.6046852", "0.60447276", "0.60346437", "0.60268843", "0.6024327", "0.602033", "0.6008068", "0.60079837", "0.5999245", "0.59912705", "0.59804213", "0.5977271", "0.59724885", "0.5967544", "0.59558636", "0.5945563", "0.594469", "0.5940625", "0.59369993", "0.592937", "0.5923741", "0.59231085", "0.59229845", "0.59172684", "0.59072804", "0.59036887", "0.58968943", "0.58968943", "0.58968943", "0.58968943", "0.58968943", "0.5891712", "0.5890522", "0.5890063", "0.58775866", "0.58457357", "0.5830118", "0.5828518", "0.5824762", "0.5821644", "0.5819569", "0.58189386", "0.5809596", "0.57930285", "0.5787377", "0.5781492", "0.57705426", "0.5761293", "0.57591146", "0.5757451", "0.5756984", "0.57527363", "0.5747417", "0.57449156", "0.5744402", "0.5740453", "0.57362944", "0.57330644" ]
0.0
-1
Prints the value of the parameter on the user's display
void setConfig(String parameter, String value, SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print(String value){\r\n System.out.println(value);\r\n }", "String displayValue();", "private void display(int key, String value)\n {\n System.out.println(\"Value for id \" + key + \": \" + value);\n }", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(valueType+\": \"+value);\n\t}", "public static String displayValue(TestExecutionParameter param) {\n if (param == null) {\n return \"&nbsp;\";\n }\n String value = param.getValue();\n if (value == null) {\n return \"&nbsp;\";\n }\n if (value.startsWith(\"http://\") || value.startsWith(\"https://\")) {\n if (value.length() > 100) {\n //the magic number 96 is arbitrary, it's used only so the text wouldn't be so long\n return \"<a href=\\\"\" + value + \"\\\">\" + value.substring(0, 96) + \" ...</a>\";\n } else {\n return \"<a href=\\\"\" + value + \"\\\">\" + value + \"</a>\";\n }\n } else if (value.length() > 100) {\n return \"<a href=\\\"\" + FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath() + \"/param/\" + param.getId() + \"\\\">\" + StringEscapeUtils.escapeHtml(value.substring(0, 96)) + \" ...</a>\";\n } else {\n return StringEscapeUtils.escapeHtml(value);\n }\n }", "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "private static void showvalue(int n) {\n\t\tSystem.out.println(\"n is\"+ n);\r\n\t}", "public void show(int x){\n System.out.println(\"In int \"+x);\n }", "java.lang.String getParameterValue();", "public void display(){\r\n System.out.println(\"The Vacancy Number is : \" + getVacancyNumber());\r\n System.out.println(\"The Designation is : \" + getDesignation());\r\n System.out.println(\"The Job Type is : \" + getJobType());\r\n }", "public void printCode( String value )\r\n\t{\r\n\t\tSystem.out.println(\"A suitable number for this : \");\r\n\t\tSystem.out.println(value);\r\n\t}", "public String display();", "abstract String display(T value);", "@Override\n public String print() {\n return this.text + \"\\n\" + \"1. \" + this.option1.text + \"\\n\" + \"2. \" + this.option2.text;\n }", "@Override\n public String toString()\n {\n final StringBuilder sb = new StringBuilder(12);\n sb.append('(');\n sb.append(this.parameter.toString());\n sb.append(\")%\");\n return sb.toString();\n }", "@Override\r\n public void infixDisplay() {\r\n System.out.print(value);\r\n }", "public String getValue(Object... params) {\r\n\t\treturn Utils.format(LocalizedTextManager.getCurrent().getProperty(name()), params);\r\n\t}", "public String printInfo()\r\n {\r\n String info;\r\n \r\n info = \"Inputed number = \" + mark;\r\n \r\n return info;\r\n }", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(name);\n\t}", "private void displaySomething() {\n if (userInputValue == null) {\n System.out.println(\"You have not yet entered anything.\");\n } else {\n System.out.println(\"Here's what you entered: \");\n System.out.println(userInputValue);\n }\n }", "public void printToViewConsole(String arg);", "public void show()\n {\n System.out.println( getFullName() + \", \" +\n String.format(Locale.ENGLISH, \"%.1f\", getAcademicPerformance()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getSocialActivity()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getCommunicability()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getInitiative()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getOrganizationalAbilities())\n );\n }", "static void print() {\n\t\tSystem.out.println(\"Value of x1 = \" +x1);\n\t}", "public void println(String pVal) throws IOException {\n mPrintWriter.println(pVal);\n }", "public void print() {\n print$$dsl$guidsl$guigs();\n System.out.print( \" eqn =\" + eqn );\n }", "void display() {\n System.out.println(id + \" \" + name + \" \" + age);\n }", "static void PrintVarValues(String s){\n System.out.println(s);\n }", "@Override\r\n\tpublic void setParameter2Screen(String value) {\n\t\t\r\n\t}", "public void printToScreen() {\n String type = \"\";\n switch (this.type) {\n case 1:\n type = \"Fashion\";\n break;\n case 2:\n type = \"Electronic\";\n break;\n case 3:\n type = \"Consumable\";\n break;\n case 4:\n type = \"Household appliance\";\n break;\n }\n// System.out.println(\"Type : \" + type);\n System.out.printf(\"%6d%15s%6f%20s\\n\", id, name, price, type);\n }", "public void displayWord() {\n System.out.println(String.valueOf(display));\n }", "public void print() {\n System.out.print(\"[ \" + value + \":\" + numSides + \" ]\");\n }", "public void display(String result);", "protected abstract String display();", "public void display(){\n\t\tSystem.out.print(programGrade + \" \" + examGrade );\n\t\t\n\t\t\n\t}", "void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }", "private void display(Object a) {\r\n System.out.print(a.toString());\t\r\n }", "public String show() {\n\t\tif (opened) {\n\t\t\tif (isBomb()) {\n\t\t\t\treturn \"o*\";\n\t\t\t} else{\n\t\t\t\treturn \"\"+value;\n\t\t\t}\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}", "public void Display(){\n System.out.println(a);\n }", "int getDisplayValue();", "void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}", "void putdata()\n {\n System.out.printf(\"\\nCD Title \\\"%s\\\", is of %d minutes length and of %d rupees.\",title,length,price);\n }", "public void printVal()\n {\n for (int i=0;i<intData.length;i++)\n System.out.print(intData[i] + \" \");\n System.out.println();\n System.out.println(\"Sum: \" + sum + \", Avg: \" + avg + \", Prod: \" + prod);\n }", "void display()\n\t {\n\t\t System.out.println(\"Student ID: \"+id);\n\t\t System.out.println(\"Student Name: \"+name);\n\t\t System.out.println();\n\t }", "public static void print(Object val) {\n Builtins.print(val);\n }", "public void display() {\r\n String kind;\r\n if (profit == true) {\r\n kind = \"profit\";\r\n }\r\n\r\n else kind = \"non-profit\";\r\n System.out.println(name + \" is a \" + kind + \" organization that has\" + \" \" + revenue + \" dollars in revenue\" );\r\n }", "public abstract String display();", "void display() {\n System.out.println(id + \" \" + name);\n }", "public void printString() {\n\t\tSystem.out.println(name);\n\t\t\n\t\t\n\t}", "public void showValor() {\n String out = new String();\n this.setText(Integer.toString(valor));\n }", "public void display() {\n \t\tSystem.out.printf(\"|%6s \", String.valueOf(idNumber));\n\t\tSystem.out.printf(\"|%13s |\", name);\n\t\tSystem.out.printf(\"%10s |\", quantity);\n\t\tSystem.out.printf(\"%8.2f |\", price);\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.println();\n }", "void putdata()\n {\n System.out.printf(\"Book Title \\\"%s\\\", written by \\\"%s\\\" has %d pages and of %d rupees.\",title,writer,pages,price);\n }", "void show() {\r\n System.out.println(\"Weight of the Cycle is = \" + weight);\r\n System.out.println(\"Name of the Cycle is = \" + name);\r\n }", "@Override\n public void display(){\n System.out.println(\"Student id: \"+getStudentId()+\"\\nName is: \"+getName()+\"\\nAge :\"+getAge()+\"\\nAcademic year: \"+getSchoolYear()\n +\"\\nNationality :\"+getNationality());\n }", "public String paramString() {\n\t\tString tail = super.paramString();\n\t\ttail = tail.substring(tail.indexOf(')') + 1);\n\t\treturn \"points=\" + points + \", lineWidth=\" + getLineWidth() + tail;\n\t}", "public void printInfo(){\n System.out.println(\" this is my y \"+(y+1)+\" this is my x \"+ X.valueOfInt(x));\n System.out.println(\"i am full: \"+ isFull);\n }", "public void printInfo() {\r\n System.out.printf(\"%-25s\", \"Nomor Rekam Medis Pasien\");\r\n System.out.println(\": \" + getNomorRekamMedis());\r\n System.out.printf(\"%-25s\", \"Nama Pasien\");\r\n System.out.println(\": \" + getNama());\r\n System.out.printf(\"%-25s\", \"Tempat, Tanggal Lahir\");\r\n System.out.print(\": \" + getTempatLahir() + \" , \");\r\n getTanggalKelahiran();\r\n System.out.printf(\"%-25s\", \"Alamat\");\r\n System.out.println(\": \" + getAlamat());\r\n System.out.println(\"\");\r\n }", "public void printDetails (StringBuilder param)\r\n {\r\n System.out.println(\"The stringBuilder is \"+ param +\" the length is \"+ param.length()+\" and the capacity is \"+ param.capacity());\r\n }", "public void display() {\n System.out.println(toString());\n }", "protected void printValConfig(){\n\t\t//System.out.println(\"writing values\");\n\t\tif(valueFxn.compareToIgnoreCase(\"additive\")==0){\n\t\t\tprintAdditive();\n\n\t\t}else if(valueFxn.compareToIgnoreCase(\"schedule\")==0){\n\t\t\tprintSchedule();\n\n\n\t\t}else if(valueFxn.compareToIgnoreCase(\"contract\")==0){\n\t\t\tprintContracts();\n\n\t\t}else{\n\t\t\tSystem.out.println(\"Value function not set correctly.\");\n\t\t}\n\t}", "public void display() {\r\n System.out.println(firstPrompt + \"[\" + minScale + \"-\" + maxScale + \"]\");\r\n }", "public String getParamValueAsString(String label, String defaultValue);", "void displayMyStaticVariable() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// displayMyStaticVariable Method created with no parameters\r\n System.out.println(\"Static Variable Initialized in class called StaticVariables and equals to \" + myStaticVariable);\t// This will print out the argument in the next line\r\n }", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(menuTitle);\n\t\tfor(int i=1; i<menuArr.length; i++)\n\t\t{\n\t\t\tSystem.out.printf(\"%d.%s \", i, menuArr[i]);\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"¼±Åà : \");\n\t\tint num = scan.nextInt();\n\t\tdata.number = num;\n\t\t\n\t}", "public void display()\r\n\t{\r\n\t\tSystem.out.println(\"Dollar: $\"+getAmount());\r\n\t\tSystem.out.println(\"Rupiah: Rp.\"+dollarTorp());\r\n\t}", "private static void printBoard() {\n\n\t//\tJOptionPane.showMessageDialog(null, \"Heyoo\", \".-*Board*-.\", -1);\n\t\t//String name = JOptionPane.showInputDialog(\"Vat is dain name?\");\n\t\t//JOptionPane.showMessageDialog(null, \"Aiight you good, \" + name);\n\t\t\n\t\t\n\t\tString[] options = {\"Sten\", \"Sax\", \"Påse\"};\n\t\tString Val = (String)JOptionPane.showInputDialog(null, \"Sten, Sax eller Påse?\",\n \"Game nr\", JOptionPane.QUESTION_MESSAGE, null, options, options[2]);\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Pasos dados por \" + a.nombre + \" \" + a.distancia + \" m = \" + pasosActividad + \" / Pasos en total = \" + pasosTotal);\n\t}", "void printInfo() {\n\t\tdouble salary=120000;\n\t System.out.println(salary);\n\t\tSystem.out.println(name+\" \"+age);\n\t}", "private static void display(String fName, String lName, int age) {\n\t\tSystem.out.println(\"Hi \" + fName + \" \" + lName + \". How are you doing?\" + \"\\nyour age is \" + age);\n\t}", "void printAmount(Amount iAmount)\n {\n System.out.println(iAmount.getElementValue());\n }", "@Override\r\n\tpublic void Print() {\r\n\t\tSystem.out.print(this.tav+\" \");\r\n\t\t\r\n\t}", "public static void display() { System.err.println(\"Train parameters: smooth=\" + smoothing + \" PA=\" + PA + \" GPA=\" + gPA + \" selSplit=\" + selectiveSplit + \" (\" + selectiveSplitCutOff + (deleteSplitters != null ? \"; deleting \" + deleteSplitters : \"\") + \")\" + \" mUnary=\" + markUnary + \" mUnaryTags=\" + markUnaryTags + \" sPPT=\" + splitPrePreT + \" tagPA=\" + tagPA + \" tagSelSplit=\" + tagSelectiveSplit + \" (\" + tagSelectiveSplitCutOff + \")\" + \" rightRec=\" + rightRec + \" leftRec=\" + leftRec + \" xOverX=\" + xOverX + \" collinsPunc=\" + collinsPunc + \" markov=\" + markovFactor + \" mOrd=\" + markovOrder + \" hSelSplit=\" + hSelSplit + \" (\" + HSEL_CUT + \")\" + \" compactGrammar=\" + compactGrammar() + \" leaveItAll=\" + leaveItAll + \" postPA=\" + postPA + \" postGPA=\" + postGPA + \" selPSplit=\" + selectivePostSplit + \" (\" + selectivePostSplitCutOff + \")\" + \" tagSelPSplit=\" + tagSelectivePostSplit + \" (\" + tagSelectivePostSplitCutOff + \")\" + \" postSplitWithBase=\" + postSplitWithBaseCategory + \" fractionBeforeUnseenCounting=\" + fractionBeforeUnseenCounting + \" openClassTypesThreshold=\" + openClassTypesThreshold); }", "public void output_UpdatedData(){\r\n\r\n\t System.out.println(\"\\nParameters are updated as following...\");\r\n\t \r\n\t System.out.println(\"Dry (double): \"+DRY);\r\n\t \r\n\t System.out.println(\"Wet (double): \"+WET);\r\n\t System.out.println(\"ISNOW (double): \"+ISNOW);\r\n\t System.out.println(\"Wind(double): \"+WIND);\r\n\t System.out.println(\"BUO (double): \"+BUO);\r\n\t System.out.println(\"Iherb (int): \"+IHERB);\r\n}", "public void show() {\n super.show(color, value.toString());\n }", "void printSNo(SNo iSNo)\n {\n System.out.println(iSNo.getElementValue());\n }", "public void output() {\n System.out.printf(\"Dien tich: %.2f \\n\", getArea());\n System.out.printf(\"Chu vi: %.2f \\n\", getPeripheral());\n }", "void getInfo() {\n\tSystem.out.println(\"My name is \"+name+\" and I am going to \"+school+\" and my grade is \"+grade);\n\t}", "Parameter getParameter();", "public String getParameterValue() {\r\n return parameterValue;\r\n }", "String getValue(String param)\n\t{\n\t\tString value = null;\n\n\t\tif (userSupplied != null && (value = this.userSupplied.get(param)) != null)\n\t\t{\n\t\t\treturn value;\n\t\t}\n\n\t\tElement element = this.parameters.get(param);\n\t\tif (element == null)\n\t\t{\n\t\t\tlog.debug(\"PISE FILE ERROR, expression uses undefined parameter: \" + param);\n\t\t\treturn null;\n\t\t} \n\t\t// When one parameter has an expression that references the value of a disabled parameter\n\t\t// return \"0\" if it's a switch or \"\" for anything else. Similar to what the gui does in\n\t\t// code generator pise2JSP.ftl getValue() function.\n\t\tif (!element.enabled) \n\t\t{\n\t\t\tif (element.type.equals(\"Switch\"))\n\t\t\t{\n\t\t\t\tlog.debug(\"\\tGETVALUE of disabled parameter: \" + param + \" returns '0'\");\n\t\t\t\treturn \"0\";\n\t\t\t} else\n\t\t\t{\n\t\t\t\tlog.debug(\"\\tGETVALUE of disabled parameter: \" + param + \" returns ''\");\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t\treturn element.value;\n\t}", "public void display () {\n System.out.println(rollNo + \" \" + name + \" \" + college );\n }", "public void print() {\n System.out.println(\"Nome: \" + nome);\n System.out.println(\"Telefone: \" + telefone);\n }", "public String print(int format);", "public String echo(String value) {\n\t\treturn value;\n\t}", "@Override\n\tpublic void print() {\n\t\tSystem.out.print(amount + \" \" + currencyFrom + \" to \" + currencyTo + \" is \" + ans);\n\t}", "public String getParam() {\n\t\treturn getTextContent(paramElem);\n\t}", "@Override\r\n public void status(String strVar)\r\n {\r\n System.out.println(strVar);\r\n }", "public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }", "public void print()\r\n\t{\r\n\t\tSystem.out.println(\"Method name: \" + name);\r\n\t\tSystem.out.println(\"Return type: \" + returnType);\r\n\t\tSystem.out.println(\"Modifiers: \" + modifiers);\r\n\r\n\t\tif(exceptions != null)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Exceptions: \" + exceptions[0]);\r\n\t\t\tfor(int i = 1; i < exceptions.length; i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\", \" + exceptions[i]);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Exceptions: none\");\r\n\t\t}\r\n\r\n\t\tif(parameters != null)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Parameters: \" + parameters[0]);\r\n\t\t\tfor(int i = 1; i < parameters.length; i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\", \" + parameters[i]);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Parameters: none\");\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t}", "public void display() {\n\t\tSystem.out.println(state+\" and its' capital is \"+capital);\n\t}", "public abstract void printOneValue(int index);", "public void Display(){\n System.out.println(\"************************************************************\");\n System.out.println(\"Customer Account Number: \"+getAccountNo());\n System.out.println(\"Customer Account Id: \"+getAccountId());\n System.out.println(\"Customer Type: \"+getAccountType());\n System.out.println(\"Customer Balance: $\"+getAccountBal());\n System.out.println(\"Thank you for banking with us!\");\n System.out.println(\"************************************************************\");\n }", "public void print() {\n System.out.println(\"Person of name \" + name);\n }", "public String toString() {\n return getClass().getName() + \"[\" + paramString() + \"]\";\n }", "public void showInfo()\n\t{\n\t\tSystem.out.println(\"Account Number : \"+getAccountNumber());\n\t\tSystem.out.println(\"Balance : \"+getBalance());\n\t\tSystem.out.println(\"Tenure Year : \"+tenureYear);\n\t}", "public void displayMessage(){//displayMessage body start\n\t\tSystem.out.printf(\"course name = %s\\n\", getCourseName());\n\t}", "protected String paramString() {\n return super.paramString() + \",\" + \"caretColor=\" + caretColor + \",\"\n + \"disabledTextColor=\" + disabledTextColor + \",\" + \"editable=\"\n + isEditable + \",\" + \"margin=\" + margin + \",\"\n + \"selectedTextColor=\" + selectedTextColor + \",\"\n + \"selectionColor=\" + selectionColor;\n\n }", "@Override\r\n\tpublic String getScreenParameter() {\n\t\treturn null;\r\n\t}", "private void printScore() {\r\n View.print(score);\r\n }", "String getDisplayText();", "public void displayCharacter() {\n System.out.println(\"**************************\");\n System.out.println(p.showDetails());\n System.out.println(\"**************************\"+\"\\n\");\n\n }", "public static void printNames(String name){\n System.out.printf(\"Hello, %s\", name);\n}" ]
[ "0.7151394", "0.7103031", "0.68703413", "0.68486965", "0.67372197", "0.6559592", "0.65085137", "0.6503019", "0.6474397", "0.63751656", "0.63550466", "0.6352901", "0.6281043", "0.6271309", "0.6261906", "0.62584484", "0.6240749", "0.6240662", "0.622824", "0.62014663", "0.6138713", "0.6112747", "0.6112049", "0.61001277", "0.6085902", "0.6084769", "0.60789394", "0.6074121", "0.6042232", "0.6037452", "0.60357285", "0.6035678", "0.6024262", "0.6000831", "0.5987705", "0.5979606", "0.59687394", "0.5963477", "0.5961604", "0.5948473", "0.59471256", "0.5942978", "0.59272265", "0.5907214", "0.5898964", "0.58978105", "0.5896289", "0.5872283", "0.5871138", "0.58618754", "0.58613837", "0.58605427", "0.585502", "0.585422", "0.58528864", "0.5852746", "0.58482796", "0.5847983", "0.5843509", "0.58377576", "0.58341575", "0.5833709", "0.58332914", "0.5828795", "0.5825592", "0.58216435", "0.5816072", "0.580719", "0.580217", "0.58000743", "0.5799993", "0.57997763", "0.5792082", "0.5791565", "0.5788297", "0.5784724", "0.5776675", "0.57650614", "0.5751421", "0.5750454", "0.5748532", "0.57447463", "0.5743614", "0.5735768", "0.57260346", "0.5722667", "0.57225627", "0.57219917", "0.57205766", "0.57205313", "0.5718256", "0.57135284", "0.5704959", "0.5701535", "0.5694062", "0.5693413", "0.568843", "0.56881374", "0.56854826", "0.5674354", "0.56732297" ]
0.0
-1
Sets the parameter to value
SignedObject authenticate(String username, String hashedPassword) throws RemoteException, Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setParameter(String name, String value);", "void setParameter(String name, Object value);", "public void setParameter(String parName, Object parVal) throws HibException ;", "public void setParamValue(String label, Object value);", "public void setParam(String paramName, String value);", "public void setParameter(String name, Object value) {\n \tParameterExtendedImpl param = parameters.getParameter(name);\n \tif(param != null){\n\t\t\tparam.setValue(value);\n\t\t\treturn;\n \t}\n \t\t\n \tparam = new ParameterExtendedImpl();\n \tparam.setIndex(parameters.getParameter().size()+1);\n \tparam.setName(name);\n \tparam.setValue(value);\n \tparam.setDirection(ParameterExtendedImpl.IN);\n \tparameters.getParameter().add(param);\n \tparameters.getInParameters().add(param);\n\t}", "public void setParamValue(String label, int value);", "public void setParamValue(int i, Object value);", "public void setValue(Object value) { this.value = value; }", "public void setParameter(String name, String value) throws IOException {\r\n boundary();\r\n writeName(name);\r\n newline();\r\n newline();\r\n writeln(value);\r\n }", "public void setValue(Object value);", "public void setValue(Object val);", "@Override\n\t\tpublic void setParameter(VariableValue variableValue) throws ModelInterpreterException\n\t\t{\n\n\t\t}", "protected void set(String name, String value) {\n\t\tParameter param = new Parameter(name, value);\n\t\t_parameters.set(param);\n\t}", "void setValue(V value);", "public void setParameter(String name,String value) throws \n IllegalArgumentException, SipParseException {\n\t if ( LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"hasParameter() \" \n\t\t\t+ name + \" value \" + value);\n Via via=(Via)sipHeader;\n \n if (name == null || value == null) {\n throw new \n IllegalArgumentException\n (\"JAIN-EXCEPTION: Name or value is null!\");\n }\n else via.setParameter(name,value);\n }", "public Object setParam(Parameter p, Object value) throws InvalidParameterException{\n\t\tvalue = ParamUtil.checkValue(p,value);\r\n\t\t\r\n\t\t//Store\r\n\t\treturn params.put(p, value);\r\n\t}", "void setValue(Object value);", "public void setParameterValue(String name, String value) {\n\tgetLogger().finest(\"Setting: \"+name+\" = \"+value);\n\tif (name.equals(\"genie.restart\")) {\n\t _parameters.put(name,value.substring(0,CHARS_RESTART));\n\t} else if (name.equals(\"genie.lout\")) {\n\t _parameters.put(name,value.substring(0,CHARS_LOUT));\n\t} else if (name.equals(\"genie.lin\")) {\n\t _parameters.put(name,value.substring(0,CHARS_LIN));\n\t} else {\n\t _parameters.put(name,value);\n\t}\n }", "@Override\n public void setParameter(String parameter, String value) {\n //no parameters\n }", "public void setValue(Object value) {\n this.value = value;\n }", "public V setValue(V value);", "@Override\n\tpublic <P> ProcedureCallImplementor<R> setParameter(QueryParameter<P> parameter, P value) {\n\t\tparamBindings.getBinding( getParameterMetadata().resolve( parameter ) ).setBindValue( value );\n\t\treturn this;\n\t}", "public void setValue(Value value) {\n this.value = value;\n }", "public void setParamValue(String label, double value);", "public void setParameter(String key, String value) {\n\t\tsetField(\"Param.\" + key, value);\n\t}", "@Override\n public boolean setParameter(String parameterName, String value) {\n return false;\n }", "void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}", "public void setParameter(String key, String value)\n {\n if (SAVE_AS_PARAM.equalsIgnoreCase(key))\n _saveAsExtension = value;\n else if (START_PARAM.equalsIgnoreCase(key))\n _startDirectory = value;\n else if (STOP_PARAM.equalsIgnoreCase(key))\n _stopDirectory = value;\n else if (TRIM_CONTRIBUTIONS_PARAM.equalsIgnoreCase(key))\n _trimModuleContributions = Boolean.parseBoolean(value);\n else if (AST_GENERATOR.equalsIgnoreCase(key))\n {\n value = value.trim();\n if (value.equalsIgnoreCase(\"default\") || value.equals(\"\"))\n _astGenerator = _defaultASTGenerator;\n else\n try\n {\n _astGenerator = (Function<IModel, CommonTree>) ParameterHandler\n .classInstance().coerce(value).newInstance();\n }\n catch (Exception e)\n {\n LOGGER.error(\n String.format(\"Failed to set ast generator to %s \", value), e);\n _astGenerator = _defaultASTGenerator;\n }\n }\n else if (LOGGER.isWarnEnabled())\n LOGGER.warn(\"No clue what to do with \" + key + \"=\" + value);\n }", "Statement setParameter(String name, Object param);", "void setValue(T value);", "void setValue(T value);", "void setValue(int value);", "@Override\n public boolean setParameter(String parameterName, double value) {\n return false;\n }", "public void setValue(T value) {\n this.value = value;\n }", "public void setValue(T value) \n\t{\n\t\tthis.value = value;\n\t}", "public void setValue(Object param1, Object param2) {\n }", "protected abstract void setValue(V value);", "public void setValue(final Object value) { _value = value; }", "public void setValue(T value) {\n\t\tthis.value = value;\n\t}", "public void setValue(T value) {\n\t\tthis.value = value;\n\t}", "public void set(){\n if (getRhs().isResolved() && getRhs().isSimpleValue()){\n getParameter().setExpression((ArchSimpleExpressionSymbol) getRhs());\n }\n else {\n throw new IllegalStateException(\"The value of the parameter is set to a sequence or the expression is not resolved. This should never happen.\");\n }\n }", "public void setParam(String paramName, double value);", "public void setValue(Object value)\r\n\t{\r\n\t\tm_value = value;\r\n\t}", "private void setValue(String parameterName, String valueAsString) throws SAXException {\n if (currentNode == null)\n throw new SAXException(\"There is no current node.\");\n Parameter parameter;\n try {\n parameter = currentNode.getParameter(parameterName);\n } catch (NotFoundException e) {\n throw new SAXException(\"Node \" + currentNode.getName() + \" has no parameter '\" + parameterName + \"'\", e);\n }\n Object value;\n try {\n value = parameter.parseValue(valueAsString);\n } catch (NumberFormatException e) {\n throw new SAXException(parameter.getAbsolutePath() + \": could not parse value '\" + valueAsString + \"'\", e);\n }\n try {\n parameter.setValue(value);\n } catch (ValueError e) {\n throw new SAXException(parameter.getAbsolutePath() + \": value '\" + valueAsString + \"' invalid for parameter\", e);\n }\n }", "protected void setValue(T value) {\r\n this.value = value;\r\n }", "public void setValue(int value);", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "public void setValue(String value);", "public void setValue(String value);", "public void setValue(String value);", "public void setValue(String value);", "public boolean setParameter(String parameterName, String value) {\n\t\t\n\t\t if (parameterName.equals(\"mu\")) {\n\t\t\t mu = Double.parseDouble(value);\n\t\t } else if (parameterName.equals(\"lambda\")) {\n\t\t\t lambda = Double.parseDouble(value);\n\t\t } else {\n\t\t\treturn false;\n\t\t }\n\t\t \n\t\treturn true;\n\t}", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "public abstract void setValue(T value);", "public void setValue(Object value)\r\n {\r\n m_value = value;\r\n }", "@Override\n public void setValue(Object val)\n {\n value = val;\n }", "public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }", "public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }", "public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }", "public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }", "public HttpParams setParameter(String name, Object value) throws UnsupportedOperationException {\n/* 228 */ throw new UnsupportedOperationException(\"Setting parameters in a stack is not supported.\");\n/* */ }", "public void setParam(String param, Object value) {\n\t\tapplicationParams.put(param, value);\n\t}", "protected void setParameter(Query query, String hqlParamName, Object parameterValue) throws Exception\r\n {\r\n //ClassLoader cl = MainFrame.getMainInstance().getReportClassLoader();\r\n \r\n if (parameterValue == null)\r\n {\r\n query.setParameter( getLiteral( hqlParamName ), parameterValue);\r\n return;\r\n }\r\n \r\n query.setParameter(hqlParamName, parameterValue);\r\n }", "public void setValue(final V value) {\n this.value = value;\n }", "public ParameterDefinition setValue(String value) {\n this.value = value;\n return this;\n }", "void setValue(String value);", "void setValue(String value);", "public void set(T pValue) {\n mValue = pValue;\n }", "public void setValue(final String name, final Object value) {\r\n this.params.put(name, value);\r\n }", "public int setValue (int val);", "public void setValue(int value)\n {\n this.value = value;\n }", "public abstract void setValue(int value);", "public void setValue(Object o){\n \tthis.value = o;\n }", "public void setParameter(String pname, String pvalue) {\n\t\tif (pvalue == null || pvalue.isEmpty()) {\n\t\t\tparameters.remove(pname);\n\t\t} else {\n\t\t\tparameters.put(pname, pvalue);\n\t\t}\n\t}", "public void setValue (String Value);", "public static void setCustomMethodParameter(String key, String value) {\n if (active) {\n TransactionAccess.setMethodParameter(key, value);\n }\n }", "public void setValue(int val)\r\n {\r\n value = val;\r\n }", "public void setValue(Object value) {\n\t\tthis.value = value;\n\t\tsetValueAction(value);\n\t}", "public void setParameterValue(int index, String value) {\n\tString name = getParameterName(index);\n\tif (name!=null) {\n\t setParameterValue(name,value);\n\t} else {\n\t getLogger().warning(\"Parameter does not exist at index \"+index);\n\t}\n }", "Statement setParameter(int index, Object param);", "public Builder setParameterValue(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n parameterValue_ = value;\n\n return this;\n }", "public void setValue(A value) {this.value = value; }", "public void setParameterValue(String newValue) throws StyxException\n {\n // Check that the new value is valid\n // Switches must be \"true\" or \"false\"\n if (this.getJSAPParameter() instanceof Switch)\n {\n if (!newValue.equalsIgnoreCase(\"true\") &&\n !newValue.equalsIgnoreCase(\"false\"))\n {\n throw new StyxException(\"Parameter \" + this.getName() +\n \" can only be \\\"true\\\" or \\\"false\\\"\");\n }\n }\n else\n {\n Option op = (Option)this.getJSAPParameter();\n // Check for empty values\n // TODO: also check type of argument (integer, float etc)\n if (newValue.trim().equals(\"\"))\n {\n if (op.required())\n {\n throw new StyxException(\"Parameter \" + this.getName() +\n \" must have a non-empty value\");\n }\n else\n {\n // Parameter is not required, so unset the parameter and return\n ((InMemoryFile)this.baseFile).setContents(\"\");\n this.valueSet = false;\n return;\n }\n }\n else if (this.param.getInputFile() != null)\n {\n // This parameter represents an input file.\n // For each value in this parameter, see if it is a \"readfrom:<url>\"\n // If so, do nothing: if not, add an InputFile to allow clients\n // to upload data to this file\n String[] files = newValue.split(\" \");\n // First we must remove all previous input files that were set by\n // this parameter\n this.instance.removeInputFiles(files);\n // The input file(s) appear in the namespace when they are uploaded\n }\n // Parameters representing output files don't show up in the namespace\n }\n // TODO: only set contents if the value has changed\n ((InMemoryFile)this.baseFile).setContents(newValue);\n this.valueSet = true;\n }", "public void setValue(int value) {\r\n this.value = value;\r\n }", "public void setValue (V v) {\n value = v;\n }", "@Override\r\n public void setParameter(String parameters) {\r\n // dummy\r\n }", "void setValue(Object object, Object value);", "void setElementValue(SetElementValue cmd);", "private static void inParameter(final Parameter parameter, final String value, final String format) {\n if (null != value) {\n parameter.setValue(value);\n }\n if (null != format) {\n parameter.setFormat(format);\n }\n }", "public void set(String name, Object value) {\n }", "void setToValue(int val);", "public void setValue(int value) {\n this.value = value;\n }", "public void setValue(int value) {\n this.value = value;\n }", "public void setValue(int value) {\n this.value = value;\n }", "public void SET_PARAMETER(String name, String... value) throws SystemException {\r\n\t\t\r\n\t\t// make sure this is done right. Kinda sucks that Java can't separate those items.\r\n\t\tif (name == null) throw new SystemException(\"SET_PARAMETER faulty. Parameter passed with a null name.\", SystemException.SYSTEM_COMMAND_ERROR_TYPE_VIOLATION, SystemNamespace.ATTR_SYSTEM_COMMAND_NAME, this.named());\r\n\t\tif (value == null) throw new SystemException(\"SET_PARAMETER faulty. Parameter set with a null value.\", SystemException.SYSTEM_COMMAND_ERROR_TYPE_VIOLATION, SystemNamespace.ATTR_SYSTEM_COMMAND_PARAMETER_NAME, name, SystemNamespace.ATTR_SYSTEM_COMMAND_NAME, this.named());\r\n\t\t\r\n\t\t// Instance check.\r\n\t\tisCommandInstance();\r\n\t\t\r\n\t\t// Can I set it?\r\n\t\tif (cachedDefinition.parameters.containsKey(name)) {\r\n\t\t\t\r\n\t\t\tCommandItem thisItem = cachedDefinition.parameters.get(name);\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t\t// Enforce type\r\n\t\t\t\tif ((thisItem.myDataType == DataType.VALUE)&&(value.length > 1)) \r\n\t\t\t\t\tthrow new SystemException(\"SET_PARAMETER faulty. Parameter defined with as date type VALUE, but a list was passed.\", SystemException.SYSTEM_COMMAND_ERROR_TYPE_VIOLATION, SystemNamespace.ATTR_SYSTEM_COMMAND_PARAMETER_NAME, name, SystemNamespace.ATTR_SYSTEM_COMMAND_NAME, this.named());\r\n\t\t\t\t\t\r\n\t\t\t\t// Save by occurence\r\n\t\t\t\tswitch (thisItem.myOccurence) {\r\n\t\t\t\t\tcase NEVER:\r\n\t\t\t\t\t\tthrow new SystemException(\"SET_PARAMETER faulty. Parameter defiend with an occurence of NEVER.\", SystemException.SYSTEM_COMMAND_ERROR_OCCURANCE_VIOLATION, SystemNamespace.ATTR_SYSTEM_COMMAND_PARAMETER_NAME, name, SystemNamespace.ATTR_SYSTEM_COMMAND_NAME, this.named());\r\n\t\t\t\t\r\n\t\t\t\t\tcase ONLYONE:\r\n\t\t\t\t\t\t// Replace\r\n\t\t\t\t\t\tcommandInstance.removeAttribute(name);\r\n\t\t\t\t\t\tcommandInstance.addAttribute(new NV(name,value));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase MANY:\r\n\t\t\t\t\tcase WHATEVER:\t\t\t\t\t\r\n\t\t\t\t\t\t// Simply add it.\r\n\t\t\t\t\t\tcommandInstance.addAttribute(new NV(name,value));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tthrow new SystemException(\"SET_PARAMETER FAULT. Parameter occurence value not defined. This is a bug.\", SystemException.SYSTEM_COMMAND_FAULT_UNDEFINED_STATE, SystemNamespace.ATTR_SYSTEM_COMMAND_NAME, this.named());\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t} catch (SystemException se) {\r\n\t\t\t\tthrow se;\r\n\t\t\t} catch (ThingsException te) {\r\n\t\t\t\tthrow new SystemException(\"SET_PARAMETER faulty. Could not set it.\", SystemException.SYSTEM_COMMAND_ERROR_SET_FAILED, te, SystemNamespace.ATTR_PLATFORM_MESSAGE,te.getMessage(), SystemNamespace.ATTR_SYSTEM_COMMAND_NAME, this.named());\r\n\t\t\t} catch (Throwable t) {\r\n\t\t\t\tthrow new SystemException(\"SET_PARAMETER FAULT. Parameter occurence value not defined. This is a bug.\", SystemException.SYSTEM_COMMAND_FAULT_SET_PROBLEM, t, SystemNamespace.ATTR_PLATFORM_MESSAGE, t.getMessage(), SystemNamespace.ATTR_SYSTEM_COMMAND_NAME, this.named());\r\n\t\t\t}\r\n\t\t\r\n\t\t\t// else if parameter not defined\r\n\t\t} else {\r\n\t\t\tthrow new SystemException(\"SET_PARAMETER faulty. Parameter not defined.\", SystemException.SYSTEM_COMMAND_ERROR_PARAMETER_NOT_DEFINED, SystemNamespace.ATTR_SYSTEM_COMMAND_PARAMETER_NAME, name, SystemNamespace.ATTR_SYSTEM_COMMAND_NAME, this.named());\r\n\t\t}\r\n\t\t\r\n\t}", "public void setValue(int value)\n {\n // we have assumed value 1 for X and 10 for O\n this.value = value;\n }", "public void setValue(S s) { value = s; }", "public void setParameter(String paramName, Object value, Query query) {\r\n\t\tif (hasParameter(paramName)) {\r\n\t\t\tquery.setParameter(paramName, value);\r\n\t\t}\r\n\t}", "public void setValue(int param1Int) {\n/* 294 */ this.s.setValue(-param1Int);\n/* */ }", "private void setParam(int param, int value) {\n bind();\n glTexParameteri(GL_TEXTURE_2D, param, value);\n }" ]
[ "0.8290172", "0.82308066", "0.77778304", "0.77070886", "0.7667578", "0.7484462", "0.7482145", "0.7434821", "0.73726547", "0.7372618", "0.73444337", "0.72847116", "0.72552186", "0.72343206", "0.7199056", "0.71952456", "0.7183217", "0.71587443", "0.71372837", "0.71299183", "0.7116513", "0.7115657", "0.71128845", "0.7106942", "0.7092473", "0.7076726", "0.7067296", "0.7067046", "0.7063202", "0.7055955", "0.703569", "0.703569", "0.70333374", "0.7025911", "0.7024653", "0.69985706", "0.69855815", "0.698551", "0.6946162", "0.6945407", "0.6945407", "0.694352", "0.693957", "0.6939047", "0.69350225", "0.69031656", "0.68806744", "0.6862308", "0.6850382", "0.6850382", "0.6850382", "0.6850382", "0.6832597", "0.68007636", "0.680065", "0.6790013", "0.6788444", "0.67855287", "0.67855287", "0.67855287", "0.67855287", "0.678369", "0.67750555", "0.67679554", "0.676249", "0.67484665", "0.6746966", "0.6746966", "0.6743922", "0.673971", "0.6739388", "0.6739271", "0.6726015", "0.6716168", "0.6714694", "0.67110443", "0.670118", "0.6700319", "0.66871744", "0.66739506", "0.6661904", "0.6661091", "0.66577214", "0.66450405", "0.66408914", "0.66382617", "0.6637511", "0.6627674", "0.66265696", "0.6603401", "0.66003186", "0.6589579", "0.65843743", "0.65843743", "0.65843743", "0.65758705", "0.65714014", "0.65589076", "0.6551843", "0.65440196", "0.6543976" ]
0.0
-1
is all permission granted
public boolean isAllGranted(){ //PackageManager.PERMISSION_GRANTED return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean permisos() {\n for(String permission : PERMISSION_REQUIRED) {\n if(ContextCompat.checkSelfPermission(getContext(), permission) != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n return true;\n }", "boolean isHasPermissions();", "public boolean hasPerms()\n {\n return ContextCompat.checkSelfPermission(itsActivity, itsPerm) ==\n PackageManager.PERMISSION_GRANTED;\n }", "public boolean hasAllPermissions(Context paramContext, String[] paramArrayOfString) {\n }", "public void verifyAppPermissions() {\n boolean hasAll = true;\n mHasBluetoothPermissions = ActivityCompat.checkSelfPermission(this, Manifest.permission.BLUETOOTH) == PackageManager.PERMISSION_GRANTED;\n mHasBluetoothAdminPermissions = ActivityCompat.checkSelfPermission(this, Manifest.permission.BLUETOOTH_ADMIN) == PackageManager.PERMISSION_GRANTED;\n hasAll &= ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;\n hasAll &= ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED;\n\n if (!hasAll) {\n // We don't have permission so prompt the user\n ActivityCompat.requestPermissions(\n this,\n APP_PERMISSIONS,\n REQUEST_PERMISSIONS\n );\n }\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n private boolean arePermissionsEnabled(){\n for(String permission : mPermissions){\n if(checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED)\n return false;\n }\n return true;\n }", "private boolean checkAndRequestPermissions() {\n List<String> listPermissionsNeeded = new ArrayList<>();\n for (String pem : appPermissions){\n if (ContextCompat.checkSelfPermission(this, pem) != PackageManager.PERMISSION_GRANTED){\n listPermissionsNeeded.add(pem);\n }\n }\n\n //ask for non-granted permissions\n if (!listPermissionsNeeded.isEmpty()) {\n ActivityCompat.requestPermissions(this, listPermissionsNeeded.toArray(new String[listPermissionsNeeded.size()]), PERMISSION_REQUEST_CODE);\n return false;\n }\n return true;\n }", "@Override\n\tpublic boolean can(String permission)\n\t{\n\t\treturn this.auth() != null && this.auth().getRole() != null && this.auth().getRole().getPermissions().parallelStream().filter(p -> Pattern.compile(p.getName()).matcher(permission).groupCount() == 0).count() != 0;\n\t}", "@Override\n public void checkPermission(Permission perm) {\n }", "public boolean isPermissionGranted(String permission){\n return true;\n// else\n// return false;\n }", "boolean isWritePermissionGranted();", "private void checkRunTimePermission() {\n\n if(checkPermission()){\n\n Toast.makeText(MainActivity.this, \"All Permissions Granted Successfully\", Toast.LENGTH_LONG).show();\n\n }\n else {\n\n requestPermission();\n }\n }", "boolean allGranted(String roles);", "@Test\n\tpublic void testIsPermittedAll_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "boolean hasSetAcl();", "private boolean checkPermission() {\r\n int result = ContextCompat.checkSelfPermission(getApplicationContext(), READ_CONTACTS);\r\n int result1 = ContextCompat.checkSelfPermission(getApplicationContext(), CAMERA);\r\n int result2 = ContextCompat.checkSelfPermission(getApplicationContext(), ACCESS_FINE_LOCATION);\r\n int result3 = ContextCompat.checkSelfPermission(getApplicationContext(), READ_EXTERNAL_STORAGE);\r\n int result4 = ContextCompat.checkSelfPermission(getApplicationContext(), WRITE_EXTERNAL_STORAGE);\r\n int result5 = ContextCompat.checkSelfPermission(getApplicationContext(), READ_PHONE_STATE);\r\n int result6 = ContextCompat.checkSelfPermission(getApplicationContext(), RECORD_AUDIO);\r\n int result7 = ContextCompat.checkSelfPermission(getApplicationContext(), SEND_SMS);\r\n //int result8 = ContextCompat.checkSelfPermission(getApplicationContext(), BLUETOOTH);\r\n\r\n return result == PackageManager.PERMISSION_GRANTED && result1 == PackageManager.PERMISSION_GRANTED && result2 == PackageManager.PERMISSION_GRANTED &&\r\n result3 == PackageManager.PERMISSION_GRANTED && result4 == PackageManager.PERMISSION_GRANTED && result5 == PackageManager.PERMISSION_GRANTED &&\r\n result6 == PackageManager.PERMISSION_GRANTED && result7 == PackageManager.PERMISSION_GRANTED/*&& result8== PackageManager.PERMISSION_GRANTED*/;\r\n }", "public boolean checkPerms()\n {\n boolean perms = hasPerms();\n if (!perms) {\n ActivityCompat.requestPermissions(\n itsActivity, new String[] { itsPerm }, itsPermsRequestCode);\n }\n return perms;\n }", "private Boolean checkRuntimePermission() {\n List<String> permissionsNeeded = new ArrayList<String>();\n\n final List<String> permissionsList = new ArrayList<String>();\n if (!addPermission(permissionsList, Manifest.permission.READ_EXTERNAL_STORAGE))\n permissionsNeeded.add(\"Storage\");\n if (!addPermission(permissionsList, Manifest.permission.CAMERA))\n permissionsNeeded.add(\"Camera\");\n /* if (!addPermission(permissionsList, Manifest.permission.WRITE_CONTACTS))\n permissionsNeeded.add(\"Write Contacts\");*/\n\n if (permissionsList.size() > 0) {\n if (permissionsNeeded.size() > 0) {\n // Need Rationale\n String message = \"You need to grant access to \" + permissionsNeeded.get(0);\n for (int i = 1; i < permissionsNeeded.size(); i++)\n message = message + \", \" + permissionsNeeded.get(i);\n showMessageOKCancel(message,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(permissionsList.toArray(new String[permissionsList.size()]),\n REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS);\n }\n }\n });\n return false;\n }\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(permissionsList.toArray(new String[permissionsList.size()]),\n REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS);\n }\n return false;\n }\n return true;\n }", "@Test\n\tpublic void testIsPermittedAll_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = null;\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public void checkPermissions(){\n //Check if some of the core permissions are not already granted\n if ((ContextCompat.checkSelfPermission(LoginActivity.this, Manifest.permission.ACCESS_FINE_LOCATION)!= PackageManager.PERMISSION_GRANTED)\n || (ContextCompat.checkSelfPermission(LoginActivity.this,Manifest.permission.CAMERA)!= PackageManager.PERMISSION_GRANTED)\n || (ContextCompat.checkSelfPermission(LoginActivity.this,Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED)) {\n Toast.makeText(this, \"Some permissions are not granted. Please enable them.\", Toast.LENGTH_SHORT).show();\n\n //If so, request the activation of this permissions\n ActivityCompat.requestPermissions(LoginActivity.this,\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.CAMERA,\n Manifest.permission.WRITE_EXTERNAL_STORAGE},\n REQUEST_CODE_ASK_PERMISSIONS);\n }\n else{\n //Permissions already granted\n }\n }", "public boolean canViewAllSites() {\n return SecurityUtils.getSubject().isPermitted(\"allSites:view\");\n }", "private boolean checkDeviceSettings()\n {\n List<String> listPermissionNeeded= new ArrayList<>();\n boolean ret = true;\n for(String perm : permission)\n {\n if(ContextCompat.checkSelfPermission(this,perm)!= PackageManager.PERMISSION_GRANTED)\n listPermissionNeeded.add(perm);\n }\n if(!listPermissionNeeded.isEmpty())\n {\n ActivityCompat.requestPermissions(this,listPermissionNeeded.toArray(new String[listPermissionNeeded.size()]),REQUEST_PERMISSION);\n ret = false;\n }\n\n return ret;\n }", "public boolean isAccessGranted() {\n try {\n PackageManager packageManager = getPackageManager();\n ApplicationInfo applicationInfo = packageManager.getApplicationInfo(getPackageName(), 0);\n AppOpsManager appOpsManager = (AppOpsManager) getSystemService(Context.APP_OPS_SERVICE);\n int mode;\n assert appOpsManager != null;\n mode = appOpsManager.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n applicationInfo.uid, applicationInfo.packageName);\n return (mode == AppOpsManager.MODE_ALLOWED);\n\n } catch (PackageManager.NameNotFoundException e) {\n return false;\n }\n }", "public static boolean isSecurityAllRestrictedActions() {\r\n return (isSecurityAllRestrictedActions);\r\n }", "public boolean granted(){\n\t\treturn this.granted;\n\t}", "@Test\n\tpublic void testIsPermittedAll_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "private boolean checkAndRequestPermissions() {\n\n List<String> listPermissionsNeeded = new ArrayList<>();\n /*if (camera != PackageManager.PERMISSION_GRANTED) {\n listPermissionsNeeded.add(android.Manifest.permission.CAMERA);\n }\n\n if (wstorage != PackageManager.PERMISSION_GRANTED) {\n listPermissionsNeeded.add(android.Manifest.permission.WRITE_EXTERNAL_STORAGE);\n }\n\n if (rstorage != PackageManager.PERMISSION_GRANTED) {\n listPermissionsNeeded.add(Manifest.permission.READ_EXTERNAL_STORAGE);\n }\n if (rphoneState != PackageManager.PERMISSION_GRANTED)\n {\n listPermissionsNeeded.add(Manifest.permission.READ_PHONE_STATE);\n }*/\n\n// if(cLocation != PackageManager.PERMISSION_GRANTED){\n// listPermissionsNeeded.add(Manifest.permission.ACCESS_COARSE_LOCATION);\n// }\n//\n// if(fLocation != PackageManager.PERMISSION_GRANTED){\n// listPermissionsNeeded.add(Manifest.permission.ACCESS_FINE_LOCATION);\n// }\n\n if (!listPermissionsNeeded.isEmpty()) {\n ActivityCompat.requestPermissions(this, listPermissionsNeeded.toArray\n (new String[listPermissionsNeeded.size()]), REQUEST_ID_MULTIPLE_PERMISSIONS);\n return false;\n }\n success();\n return true;\n }", "@Test\n\tpublic void testIsPermittedAll_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public boolean [] getPermissions()\n\t{\n\t\treturn this.permissions;\n\t}", "public boolean accesspermission()\n {\n AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);\n int mode = 0;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n mode = appOps.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n Process.myUid(),context.getPackageName());\n }\n if (mode == AppOpsManager.MODE_ALLOWED) {\n\n return true;\n }\n return false;\n\n }", "public List<Permission> queryAllPermission() {\n\t\treturn permissionMapper.queryAllPermission();\n\t}", "void askForPermissions();", "private boolean checkPermission() {\n if (Build.VERSION.SDK_INT >= 23 &&\n ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // Permission is not granted\n return false;\n } else {\n return true;// Permission has already been granted }\n }\n }", "private boolean checkAndRequestPermissions() {\n int locationPermission = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\n List<String> listPermissionsNeeded = new ArrayList<>();\n if (locationPermission != PackageManager.PERMISSION_GRANTED) {\n listPermissionsNeeded.add(Manifest.permission.ACCESS_FINE_LOCATION);\n }\n// if (permissionSendMessage != PackageManager.PERMISSION_GRANTED) {\n// listPermissionsNeeded.add(Manifest.permission.SEND_SMS);\n// }\n if (!listPermissionsNeeded.isEmpty()) {\n ActivityCompat.requestPermissions(this, listPermissionsNeeded.toArray(new String[listPermissionsNeeded.size()]), REQUEST_ID_MULTIPLE_PERMISSIONS);\n return false;\n }\n return true;\n }", "public boolean hasPermissions(Set<Permission> p) {\n if (p.isEmpty()) {\n return true;\n }\n return hasPermissionsFor(request, subject, p);\n }", "private boolean checkPermissions(Activity activity) {\n String[] permissions = getRequiredAndroidPermissions();\n return handler.areAllPermissionsGranted(activity, permissions);\n }", "private boolean runtime_permissions() {\n if(Build.VERSION.SDK_INT >= 23 && ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n\n requestPermissions(new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},100);\n\n return true;\n }\n return false;\n }", "boolean ignoresPermission();", "public boolean validatePermissions()\r\n\t{\n\t\treturn true;\r\n\t}", "public Boolean isPermissions() {\n return (Boolean) get(\"permissions\");\n }", "private boolean checkPermissions() {\n int permissionState1 = ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION);\n\n int permissionState2 = ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION);\n return permissionState1 == PackageManager.PERMISSION_GRANTED && permissionState2 == PackageManager.PERMISSION_GRANTED;\n }", "public void checkpermission()\n {\n permissionUtils.check_permission(permissions,\"Need GPS permission for getting your location\",1);\n }", "@Override\n public void checkPermission(Permission perm, Object context) {\n }", "private boolean checkPermissions() {\n if (!read_external_storage_granted ||\n !write_external_storage_granted ||\n !write_external_storage_granted) {\n Toast.makeText(getApplicationContext(), \"Die App braucht Zugang zur Kamera und zum Speicher.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "private void checkPermissions() {\n List<String> permissions = new ArrayList<>();\n String message = \"osmdroid permissions:\";\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.ACCESS_FINE_LOCATION);\n message += \"\\nLocation to show user location.\";\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);\n message += \"\\nStorage access to store map tiles.\";\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.READ_PHONE_STATE);\n message += \"\\n access to read phone state.\";\n //requestReadPhoneStatePermission();\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECEIVE_SMS) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.RECEIVE_SMS);\n message += \"\\n access to receive sms.\";\n //requestReadPhoneStatePermission();\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.GET_ACCOUNTS) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.GET_ACCOUNTS);\n message += \"\\n access to read sms.\";\n //requestReadPhoneStatePermission();\n }\n if (!permissions.isEmpty()) {\n // Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n String[] params = permissions.toArray(new String[permissions.size()]);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(params, REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS);\n }\n } // else: We already have permissions, so handle as normal\n }", "public static boolean m45181a() {\n Context b = m45183b();\n if (b != null) {\n try {\n PackageManager packageManager = b.getPackageManager();\n if (packageManager == null) {\n return true;\n }\n String[] strArr = packageManager.getPackageInfo(b.getPackageName(), 4096).requestedPermissions;\n if (strArr == null) {\n return false;\n }\n String[] strArr2 = f31382a;\n for (String str : strArr2) {\n boolean a = m45182a(strArr, str);\n f31383b.put(str, Boolean.valueOf(a));\n if (!a) {\n TLogger.m45340ee(\"PermissionChecker\", \"The required permission of <\" + str + \"> does not found!\");\n return false;\n }\n }\n return true;\n } catch (Throwable th) {\n TLogger.m45339e(\"PermissionChecker\", \"check required permissins exception.\", th);\n return false;\n }\n } else {\n throw new IllegalArgumentException(\"The context parameter can not be null!\");\n }\n }", "public boolean checkPermission(Permission permission);", "@Override\r\n\tpublic List<Permission> queryAll() {\n\t\treturn permissionDao.queryAll();\r\n\t}", "@Override\n public void onPermissionsChecked(MultiplePermissionsReport report) {\n if (report.areAllPermissionsGranted()) {\n Toast.makeText(getApplicationContext(), \"All permissions are granted!\", Toast.LENGTH_SHORT).show();\n }\n\n // check for permanent denial of any permission\n if (report.isAnyPermissionPermanentlyDenied()) {\n // show alert dialog navigating to Settings\n showSettingsDialog();\n }\n }", "private boolean isReadStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);\n int write = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED && write == PackageManager.PERMISSION_DENIED) {\n return true;\n } else {\n\n //If permission is not granted returning false\n return false;\n }\n }", "abstract public void getPermission();", "public void permission_check() {\n //Usage Permission\n if (!isAccessGranted()) {\n new LovelyStandardDialog(MainActivity.this)\n .setTopColorRes(R.color.colorPrimaryDark)\n .setIcon(R.drawable.ic_perm_device_information_white_48dp)\n .setTitle(getString(R.string.permission_check_title))\n .setMessage(getString(R.string.permission_check_message))\n .setPositiveButton(android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(android.provider.Settings.ACTION_USAGE_ACCESS_SETTINGS);\n startActivity(intent);\n }\n })\n .setNegativeButton(android.R.string.no, null)\n .show();\n }\n }", "private boolean checkPermissions(HttpServletRequest request, RouteAction route) {\n\t\treturn true;\n\t}", "private boolean checkPermission() {\n\n if ((ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this,\n Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED)\n\n ) {\n\n // Permission is not granted\n return false;\n\n }\n return true;\n }", "public Enumeration permissions();", "@Override\n public void onPermissionsChecked(MultiplePermissionsReport report) {\n if (report.areAllPermissionsGranted()) {\n //Toast.makeText(getApplicationContext(), \"All permissions are granted!\", Toast.LENGTH_SHORT).show();\n }\n\n // check for permanent denial of any permission\n if (report.isAnyPermissionPermanentlyDenied()) {\n // show alert dialog navigating to Settings\n // showSettingsDialog();\n }\n }", "private boolean isReadStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "@Test\n\tpublic void testIsPermittedAll_5()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public Map<String, Boolean> hasPermission(String login, List<String> permissions);", "public boolean isPermissionSet ( String name ) {\n\t\treturn extract ( handle -> handle.isPermissionSet ( name ) );\n\t}", "public static boolean checkReadAllTasksPermission() {\r\n boolean hasReadAllTasksPermission =\r\n Ivy.session()\r\n .getSecurityContext()\r\n .hasPermission(Ivy.request().getApplication().getSecurityDescriptor(),\r\n ch.ivyteam.ivy.security.IPermission.TASK_READ_ALL);\r\n return hasReadAllTasksPermission;\r\n }", "@Override\r\n\tpublic List<Permission> getAllPermissions() {\n\t\treturn null;\r\n\t}", "public boolean checkPermissions(String check)\n {\n Log.d(TAG,\"check single PErmission\");\n int permissionRequest= ActivityCompat.checkSelfPermission(UploadActivity.this,check);\n if(permissionRequest!= PackageManager.PERMISSION_GRANTED)\n {\n Log.d(TAG,\"check PErmission\\nPermission was not granted for:\"+check);\n return false;\n }\n else\n {\n Log.d(TAG,\"check PErmission\\nPermission was granted for:\"+check);\n return true;\n }\n\n }", "private boolean isLocationAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\r\n\r\n //If permission is granted returning true\r\n if (result == PackageManager.PERMISSION_GRANTED)\r\n return true;\r\n\r\n //If permission is not granted returning false\r\n return false;\r\n }", "int getPermissionRead();", "private boolean checkPermissionsArray(String[] permissions)\n {\n Log.d(TAG,\"checkPErmissionsArray\");\n for(int i=0;i<permissions.length;i++)\n {\n String check=permissions[i];\n if(checkPermissions(check))\n {\n return false;\n }\n }\n return true;\n }", "public void checkPermission() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.RECORD_AUDIO) +\n ContextCompat.checkSelfPermission(this, Manifest.permission.MODIFY_AUDIO_SETTINGS)\n != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(this, perms, permsRequestCode);\n permissionGranted = false;\n } else {\n permissionGranted = true;\n }\n }", "private boolean isReadStorageAllowed() {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "private static boolean hasPermissions(Context context, String... permissions) {\n for (String permission : permissions) {\n if (ContextCompat.checkSelfPermission(context, permission)\n != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n return true;\n }", "private boolean checkPermissions() {\n boolean permissionGrant = false;\n if (Build.VERSION.SDK_INT >= 23 && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions((Activity) this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSION_REQUEST_CODE_ACCESS_COARSE_LOCATION);\n } else {\n permissionGrant = true;\n }\n return permissionGrant;\n\n }", "private void checkPermissions() {\n final ArrayList<String> missedPermissions = new ArrayList<>();\n\n for (final String permission : PERMISSIONS_REQUIRED) {\n if (ActivityCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED) {\n missedPermissions.add(permission);\n }\n }\n\n if (!missedPermissions.isEmpty()) {\n final String[] permissions = new String[missedPermissions.size()];\n missedPermissions.toArray(permissions);\n\n ActivityCompat.requestPermissions(this, permissions, PERMISSION_REQUEST_CODE);\n }\n }", "@Test\n\tpublic void testIsPermitted_7()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tPermission permission = new AllPermission();\n\n\t\tboolean result = fixture.isPermitted(permission);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public boolean checkForPermission() {\r\n int permissionCAMERA = ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA);\r\n int storagePermission = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);\r\n int accessCoarseLocation = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION);\r\n int accessFineLocation = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\r\n\r\n List<String> listPermissionsNeeded = new ArrayList<>();\r\n if (storagePermission != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.READ_EXTERNAL_STORAGE);\r\n }\r\n if (permissionCAMERA != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.CAMERA);\r\n }\r\n if (accessCoarseLocation != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.ACCESS_COARSE_LOCATION);\r\n }\r\n if (accessFineLocation != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.ACCESS_FINE_LOCATION);\r\n }\r\n if (!listPermissionsNeeded.isEmpty()) {\r\n ActivityCompat.requestPermissions(this,\r\n listPermissionsNeeded.toArray(new String[listPermissionsNeeded.size()]), MY_PERMISSIONS_REQUEST);\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "private boolean isWriteStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "private void checkPermission(){\n // vérification de l'autorisation d'accéder à la position GPS\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n// // l'autorisation n'est pas acceptée\n// if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n// Manifest.permission.ACCESS_FINE_LOCATION)) {\n// // l'autorisation a été refusée précédemment, on peut prévenir l'utilisateur ici\n// } else {\n // l'autorisation n'a jamais été réclamée, on la demande à l'utilisateur\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n FINE_LOCATION_REQUEST);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n // }\n } else {\n // TODO : autorisation déjà acceptée, on peut faire une action ici\n initLocation();\n }\n }", "private void checkPermissions(){\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this,Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n ActivityCompat.requestPermissions(this, new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.ACCESS_COARSE_LOCATION\n },PERMS_CALL_ID);\n\n }\n\n\n }", "private static boolean isPermissionGranted(Context context, String permission) {\n if (ContextCompat.checkSelfPermission(context, permission)\n == PackageManager.PERMISSION_GRANTED) {\n Log.i(TAG, permission + \" granted\");\n return true;\n }\n Log.i(TAG, permission + \" not granted yet\");\n return false;\n }", "private boolean checkPermissions() {\n int permissionState = ActivityCompat.checkSelfPermission(\n this, Manifest.permission.ACCESS_FINE_LOCATION\n );\n return permissionState == PackageManager.PERMISSION_GRANTED;\n }", "public boolean checkPermissions() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n new AlertDialog.Builder(this)\n .setTitle(\"TITLE\")\n .setMessage(\"TEXT\")\n .setPositiveButton(\"OKAY\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Prompt the user once explanation has been shown\n ActivityCompat.requestPermissions(MapsActivity.this,\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSION_REQ_LOC);\n }\n })\n .create()\n .show();\n\n\n } else {\n // No explanation needed, we can request the permission.\n ActivityCompat.requestPermissions(this,\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSION_REQ_LOC);\n }\n return false;\n } else {\n return true;\n }\n }", "@Override\n public boolean hasPermission(Permission permission) {\n // FacesContext context = FacesContext.getCurrentInstance();\n String imp = (String)ADFContext.getCurrent().getSessionScope().get(\"isImpersonationOn\");\n// String imp = (String)context.getExternalContext().getSessionMap().get(\"isImpersonationOn\");\n if(imp == null || !imp.equals(\"Y\")){\n return super.hasPermission(permission);\n }\n else{\n return true;\n \n }\n \n }", "private boolean checkPermissions() {\n int permissionState = ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION);\n return permissionState == PackageManager.PERMISSION_GRANTED;\n }", "private boolean checkPermissions() {\n int permissionState = ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION);\n return permissionState == PackageManager.PERMISSION_GRANTED;\n }", "private boolean checkPermissions() {\r\n int permissionState = ActivityCompat.checkSelfPermission(this,\r\n Manifest.permission.ACCESS_FINE_LOCATION);\r\n return permissionState == PackageManager.PERMISSION_GRANTED;\r\n }", "static boolean checkPermissionAllowed(Context context, String permission) {\n if (android.os.Build.VERSION.SDK_INT >= 23) {\n boolean hasPermission = false;\n try {\n // Invoke checkSelfPermission method from Android 6 (API 23 and UP)\n java.lang.reflect.Method methodCheckPermission = Activity.class.getMethod(\"checkSelfPermission\", java.lang.String.class);\n Object resultObj = methodCheckPermission.invoke(context, permission);\n int result = Integer.parseInt(resultObj.toString());\n hasPermission = (result == PackageManager.PERMISSION_GRANTED);\n } catch (Exception ex) {\n\n }\n\n return hasPermission;\n } else {\n return true;\n }\n }", "@Override\n public void onPermissionsChecked(MultiplePermissionsReport report) {\n }", "private boolean checkPermissions() {\n int permissionState = ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION);\n return permissionState == PackageManager.PERMISSION_GRANTED;\n }", "public boolean checkPermissions(String permission) {\r\n Log.d(TAG, \"checkPermissions: checking permission: \" + permission);\r\n\r\n int permissionRequest = ActivityCompat.checkSelfPermission(EditProfileActivity.this, permission);\r\n\r\n if (permissionRequest != PackageManager.PERMISSION_GRANTED) {\r\n Log.d(TAG, \"checkPermissions: \\n Permission was not granted for: \" + permission);\r\n Toast.makeText(this, \"Permissions not granted to access camera,\\n\" +\r\n \"please give permissions to GetAplot\", Toast.LENGTH_SHORT).show();\r\n return false;\r\n } else {\r\n Log.d(TAG, \"checkPermissions: \\n Permission was granted for: \" + permission);\r\n return true;\r\n }\r\n }", "private boolean checkPermissions() {\n return PackageManager.PERMISSION_GRANTED == ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION);\n }", "public boolean CheckPermissions() {\n int result = ContextCompat.checkSelfPermission(getApplicationContext(), WRITE_EXTERNAL_STORAGE);\r\n int result1 = ContextCompat.checkSelfPermission(getApplicationContext(), RECORD_AUDIO);\r\n return result == PackageManager.PERMISSION_GRANTED && result1 == PackageManager.PERMISSION_GRANTED;\r\n }", "public boolean checkPermissions(String... permissions) {\n if (permissions != null) {\n for (String permission : permissions) {\n if (ActivityCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n }\n return true;\n }", "@Override\n public void onPermissionGranted() {\n }", "private boolean checkPermissionStorage() {\n\n boolean isPermissionGranted = true;\n\n int permissionStorage = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n if (permissionStorage != PackageManager.PERMISSION_GRANTED)\n {\n isPermissionGranted = false;\n }\n\n return isPermissionGranted;\n }", "private boolean checkPermission() {\n int result = ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.READ_PHONE_STATE);\n\n if (result == PackageManager.PERMISSION_GRANTED) {\n return true;\n } else {\n return false;\n }\n }", "@Override\n public boolean checkPermissions() {\n int permissionState = ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION);\n return permissionState == PackageManager.PERMISSION_GRANTED;\n }", "private boolean checkPermissions() {\n return ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;\n\n // If we want background location\n // on Android 10.0 and higher,\n // use:\n // ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_BACKGROUND_LOCATION) == PackageManager.PERMISSION_GRANTED\n }", "private boolean checkPermissions() {\n return ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;\n\n // If we want background location\n // on Android 10.0 and higher,\n // use:\n // ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_BACKGROUND_LOCATION) == PackageManager.PERMISSION_GRANTED\n }", "private boolean checkPermissions() {\n boolean hasPermission = true;\n\n int result = ContextCompat.checkSelfPermission(\n this,\n Manifest.permission.ACCESS_FINE_LOCATION\n );\n if (result == PERMISSION_DENIED) {\n hasPermission = false;\n }\n\n // ACCESS_BACKGROUND_LOCATION is only required on API 29 and higher\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n result = ContextCompat.checkSelfPermission(\n this,\n Manifest.permission.ACCESS_BACKGROUND_LOCATION\n );\n if (result == PERMISSION_DENIED) {\n hasPermission = false;\n }\n }\n\n return hasPermission;\n }", "@Override\n public void onPermissionGranted() {\n }", "@Override\n public boolean userCanAccess(int id) {\n return true;\n }", "int getPermissionWrite();" ]
[ "0.74685246", "0.7384624", "0.71178144", "0.6997212", "0.69577706", "0.695398", "0.69473916", "0.6915095", "0.68851703", "0.6837757", "0.68367547", "0.6835005", "0.6794339", "0.67865336", "0.67582583", "0.6752951", "0.6737648", "0.67375267", "0.67313945", "0.6728051", "0.66717386", "0.66623026", "0.66526437", "0.6647941", "0.6617844", "0.6616498", "0.6571215", "0.6569367", "0.65657705", "0.65559155", "0.6554638", "0.6544476", "0.6530629", "0.65302086", "0.6526027", "0.64969397", "0.6494626", "0.6485678", "0.648316", "0.64801174", "0.6476994", "0.6449453", "0.6449391", "0.64425725", "0.64348245", "0.6423892", "0.641768", "0.64059377", "0.6386042", "0.63859934", "0.6381084", "0.6364562", "0.6360639", "0.63573307", "0.6356957", "0.6349787", "0.6348563", "0.6346851", "0.63334703", "0.6332619", "0.6315783", "0.6313927", "0.63102585", "0.6303337", "0.62852114", "0.62734425", "0.6272713", "0.6272672", "0.6266513", "0.6257161", "0.62520796", "0.62513983", "0.6251014", "0.62452215", "0.62390995", "0.62379533", "0.62368864", "0.6232437", "0.62296706", "0.6225266", "0.6202571", "0.6202571", "0.6197889", "0.6193413", "0.61903477", "0.6182775", "0.61710966", "0.6167884", "0.6161795", "0.6159081", "0.6152121", "0.6150482", "0.61470586", "0.61451054", "0.61406344", "0.61406344", "0.6140091", "0.6136067", "0.6132018", "0.6123124" ]
0.8236009
0
Boolean flag = true;
@PostMapping("/addAskQuestion") @ApiOperation(value = "你问我答新增") public DataResult<List<AskAnswer>> askQuestion(AskQuestionVo para){ DataResult<List<AskAnswer>> result = DataResult.success(); try { List<AskAnswer> loginReturn = qAndAService.askQuestion(para); result.setData(loginReturn); }catch(Exception e){ log.info(e.getMessage()); // flag = false; return DataResult.fail(-1,"新增失败,数据库中已经存在该数据"); } // if(!flag){ // result.setCode(0); // result.setMessage("-1"); // return result; // } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean getFlag() {\n return flag;\n }", "public boolean getFlag(){\n\t\treturn flag;\n\t}", "public void setFlag(Boolean flag) {\n this.flag = flag;\n }", "public boolean getFlag() {\n\t\treturn flag;\n\t}", "int getFlag();", "boolean hasFlag();", "public int getFlag()\n {\n return flag;\n }", "boolean getBoolean();", "boolean getBoolean();", "public static void main(String[] args) {\n\r\n\r\n\t\t boolean value = true;\r\n\r\n\t\t value = false;\r\n\r\n\t\t System.out.println(\"The value for the Boolean variable is : \"+ value);\r\n\t\r\n\r\n}", "protected void setFlag() {\n flag = flagVal;\n }", "protected void setFlag() {\n flag = flagVal;\n }", "public void setFlag(boolean bol){\n\t\tflag = bol;\n\t}", "private CheckBoolean() {\n\t}", "public void setFlag(Integer flag) { this.flag = flag; }", "public boolean isFlagged();", "void boolean1(boolean a);", "public boolean getBoolean();", "boolean isSet(int flag)\n {\n return (waitFlags & flag) != 0;\n }", "public boolean isFlagged() {\n return flagged;\n }", "public String getIsFlag() {\r\n return isFlag;\r\n }", "public void method_217(boolean var1) {}", "void mo98208a(boolean z);", "void mo1488a(boolean z);", "boolean booleanOf();", "public Boolean asBoolean();", "void mo21069a(boolean z);", "@Override\n public int getFlag() {\n return flag_;\n }", "void mo64153a(boolean z);", "boolean getBoolValue();", "boolean getBoolValue();", "void set(boolean value);", "boolean get();", "void mo197b(boolean z);", "void mo1492b(boolean z);", "void mo99838a(boolean z);", "@Override\n public int getFlag() {\n return flag_;\n }", "void mo6661a(boolean z);", "public void giveFlag(Flag f)\r\n\t{\r\n\t\thasFlag = true;\r\n\t\tflag = f;\r\n\t}", "public void method_9697(boolean var1) {\r\n this.field_9139 = var1;\r\n }", "private boolean isLava() {\n/* 317 */ return this.isLava;\n/* */ }", "public boolean sawNonboolean() {\n return nonboolean;\n }", "public void setEnabled(boolean aFlag) { _enabled = aFlag; }", "abstract public boolean getAsBoolean();", "public Boolean() {\n\t\tsuper(false);\n\t}", "public boolean getFlag() {\r\n\t\treturn (value.getInt() != 0);\r\n\t}", "public abstract boolean read_boolean();", "boolean hasTestFlag();", "void mo3305a(boolean z);", "public boolean getMyStartBoolean(){\n return myStartBoolean;\n }", "public Boolean getABoolean()\n {\n return aBoolean;\n }", "void mo12636a(boolean z);", "public void getEaten() {\n\t\tsuper.flag=true;\n\t}", "private void switchOnFlag(int flag) {\r\n\t\tsim40.memory[Simulator.STATUS_ADDRESS]|= (1<<flag);\r\n\t}", "boolean readBoolean();", "boolean getValue();", "public boolean getAI(){return ai;}", "public boolean get_boolean() {\n return local_boolean;\n }", "public RubyBoolean getTrue() {\n return trueObject;\n }", "public void setProcessed (boolean Processed)\n{\nset_Value (\"Processed\", new Boolean(Processed));\n}", "void setBoolean(boolean value);", "public BooleanValue(boolean bool) {\r\n this.val = bool;\r\n }", "public Boolean getValue() {\n/* 60 */ return Boolean.valueOf(this.val);\n/* */ }", "public void mo97905b(boolean z) {\n }", "public void set(boolean bol);", "public Boolean getActiveflag() {\n return activeflag;\n }", "public void changeIsFlagged() {\r\n\t\tif (this.isFlagged) {\r\n\t\t\tthis.isFlagged = false;\r\n\t\t} else {\r\n\t\t\tthis.isFlagged = true;\r\n\t\t}\r\n\t}", "public void method_103(boolean var1) {\n this.field_4130 = var1;\n }", "public boolean getMyBool() {\n return myBool;\n }", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "boolean doSomething() {\n\t\treturn true;\n\t}", "boolean test();", "boolean test();", "boolean test();", "public void a(boolean paramBoolean)\r\n/* 80: */ {\r\n/* 81: 83 */ this.splash = paramBoolean;\r\n/* 82: */ }", "public static void main(String[] args) {\nboolean var=false;\nboolean var1=true;\n\nSystem.out.println(var +\" \"+var1);\n\t}", "boolean getVarReturn();", "public boolean isBoolean();", "public boolean b() {\n return true;\n }", "public void mo97903a(boolean z) {\n }", "public void b(boolean paramBoolean)\r\n/* 184: */ {\r\n/* 185:183 */ this.g = paramBoolean;\r\n/* 186: */ }", "@Override\n\tpublic boolean hasFlag(BitFlag flag) {\n\t\treturn heldObj.hasFlag(flag);\n\t}", "public /* synthetic */ void mo14079a(Boolean bool) throws Exception {\n if (this.f15652h0 != bool.booleanValue()) {\n this.f15652h0 = bool.booleanValue();\n m17129H();\n }\n }", "public void mo97907c(boolean z) {\n }", "public Boolean getBestflag() {\n return bestflag;\n }", "public boolean \ngetFlag( int pFlagNumber ) {\n return ( (fFlagBox & (1 << pFlagNumber)) != 0 );\n}", "public Integer getFLAG() {\n return FLAG;\n }", "protected synchronized void setBooleanValue(String tag, boolean flag) {\n if (actualProperties != null) {\n if (flag) {\n actualProperties.put(tag, QVCSConstants.QVCS_YES);\n } else {\n actualProperties.put(tag, QVCSConstants.QVCS_NO);\n }\n }\n }", "boolean isAlwaysTrue();", "public boolean isBool() {\n return bool;\n }", "boolean isEBoolean();", "public void set_boolean(boolean param) {\n this.local_boolean = param;\n }", "public boolean isFlagSet( int flag )\n {\n return ( value & ( 1 << flag ) ) != 0;\n }", "boolean hasRetainFlag();", "public void setTallied(java.lang.Boolean value);", "public boolean b()\n {\n return false;\n }", "public boolean b()\n {\n return false;\n }", "public static boolean getBooleanTrue() {\n boolean returnValue = false;\n return returnValue;\n }" ]
[ "0.7609314", "0.7527424", "0.7455148", "0.7145097", "0.7133716", "0.710073", "0.6997587", "0.69716644", "0.69716644", "0.688908", "0.6833927", "0.6833927", "0.6811248", "0.67949516", "0.67920464", "0.67747825", "0.67363775", "0.672606", "0.6681078", "0.66430193", "0.66256833", "0.66255367", "0.6569333", "0.6564511", "0.65494573", "0.65348876", "0.65044224", "0.6491621", "0.648723", "0.64743423", "0.64743423", "0.6460715", "0.6456657", "0.6448828", "0.6440261", "0.6437953", "0.6425088", "0.6407122", "0.6395792", "0.63884455", "0.637109", "0.6362348", "0.6352296", "0.63406", "0.6321519", "0.6318155", "0.6316198", "0.6301257", "0.63012326", "0.6300207", "0.6297749", "0.628785", "0.62860733", "0.62858564", "0.6281879", "0.6280721", "0.6276991", "0.6275174", "0.62088144", "0.6204238", "0.61998117", "0.61952096", "0.61840886", "0.6182331", "0.61685413", "0.61674756", "0.6163462", "0.61500365", "0.61478966", "0.6136755", "0.6136755", "0.6136755", "0.6136755", "0.61336917", "0.61236477", "0.61236477", "0.61236477", "0.6115746", "0.61076003", "0.61027914", "0.6102049", "0.6090482", "0.60830384", "0.6080986", "0.607664", "0.60758", "0.607528", "0.60737604", "0.60728663", "0.60635954", "0.6056592", "0.60557646", "0.6054719", "0.6054256", "0.6047811", "0.60393834", "0.6028529", "0.6025827", "0.60250163", "0.60250163", "0.6022551" ]
0.0
-1
Double as Math.pow(2,i) returns a double this is casted as an int when returning
private int minusExpoBaseTwo(int order){ double cnt = 0; //This allows us to add the exponatials together whilst decreasing the power each time effectively making 2^(order) + 2^(order-1)....until order equals 1 for(int i = order;i>0;i--){ cnt = cnt + Math.pow(2, i); } //Converts it back to an int return (int) cnt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static double powerOfTwoD(int n) {\n return Double.longBitsToDouble((((long)n + (long)DoubleConsts.MAX_EXPONENT) <<\n (DoubleConsts.SIGNIFICAND_WIDTH-1))\n & DoubleConsts.EXP_BIT_MASK);\n }", "public double pow(double base, double exponent){ return Math.pow(base, exponent); }", "double ij_inter_pow(double dr2, double rpow) {\n\t\t\n\t\tif ( dr2 > 0.0 ) {\n\t\t\treturn( Math.pow(diameter2/dr2,rpow) );\n\t\t} else {\n\t\t\treturn(0.0);\n\t\t}\n\t\t\n\t}", "public double power ( int num1, int num2) throws RemoteException;", "public int differencePointsPow(){\n return (int) Math.pow(differencePoints(),2);\n }", "private double pow(double x, double y) {\r\n double value;\r\n try {\r\n value = Math.pow(x, y) ; }\r\n catch( ArithmeticException e ) {\r\n value = Double.NaN ; }\r\n return value;\r\n }", "public static double pow(double a, int b){\n if (a == 0.0) {\n if (b == 0) {\n throw new IllegalArgumentException(\"0^0 not supported\");\n } else {\n return +0;\n }\n }\n if (b == 0) {\n return 1.0;\n }\n\n // a,b <> 0\n double result = a;\n int n = Math.abs(b);\n for(int i = 2; i <= n; i++){\n result *= a;\n }\n \n if (b < 0) {\n result = 1/result;\n }\n return result;\n }", "public static double pow(double x, int n) {\n\t\treturn powLong(x,n);\n }", "public static double myPow(double x, int y) {\n double powedValue = x;\n for (int i = 1; i < y; i++) {\n powedValue *= x;\n }\n return (powedValue);\n }", "static double calcPower(double first, double second) {\n return Math.pow(first, second);\n }", "static int roundUpPower2(int i) {\n i--;\n i |= i >> 1;\n i |= i >> 2;\n i |= i >> 4;\n i |= i >> 8;\n return (i | (i >> 16)) + 1;\n }", "public int getPow() {\n return _pow;\n }", "public static double pow(double a, int b){\n\t\tif(a == 0 && b == 0)\n\t\t\treturn Integer.MIN_VALUE;\n\n\t\tif(a == 0)\n\t\t\treturn 0;\n\n\t\tif(b == 0)\n\t\t\treturn 1;\n\n\t\tif(b == 1)\n\t\t\treturn a;\n\n\t\tboolean aMinus = a < 0? true: false;\n\t\tboolean bMinus = b < 0? true : false;\n\n\t\tint bAbs = Math.abs(b);\n\t\tdouble aAbs = Math.abs(a);\n\n\t\t//check if b is odd\n\t\tdouble tempAnswer;\n\t\tif( (b & 1) != 0){\n\t\t\ttempAnswer = pow(aAbs, bAbs - 1) * aAbs;\n\t\t}\n\t\telse{\n\t\t\ttempAnswer = pow(aAbs * aAbs, bAbs / 2);\n\t\t}\n\n\t\tif(bMinus)\n\t\t\ttempAnswer = 1.0 / tempAnswer;\n\t\tif(aMinus && (b & 1)!= 0)\n\t\t\ttempAnswer *= -1;\n\n\t\treturn tempAnswer;\n\n\t}", "private int nearest_power_of_two(int x) {\n double power = 0.0d;\n while (Math.pow(2.0d, power) < x) {\n power += 1.0d;\n }\n return (int)(power);\n }", "public static int ceilToPowerOfTwo(int i) {\n return 1 << IntMath.log2(i, RoundingMode.CEILING);\n }", "public int getPower()\n {\n return this.powerOfIi;\n }", "int Pow2(int base, int power) {\n if (power == 0)\n return 1;\n else\n return 2 * Pow2(base, power - 1); \n }", "public double pow(double x, int n) {\n if (n == Integer.MIN_VALUE) {\n return 0.0; // Cannot use -n to make it positive, so n%2 is -1 at first, then the result is 1. \n }\n \n if (n < 0) {\n return 1 / powHelper(x, -n); \n } else {\n return powHelper(x, n); \n }\n }", "public double nextDouble() {\n\tdouble result = (d1 - 1.0) / (POW3_33 - 1.0);\n\tnextIterate();\n\treturn result;\n }", "public double y(double x) {\r\n return Math.pow(x, n);\r\n }", "public int getUnitPow(int index) {\n return _elements[index].getPow();\n }", "public static Double pow (Double base, Double exponent){\n return Math.pow(base, exponent);\n }", "public double power ( int num1, int num2, Credential aCrendential) throws RemoteException;", "@Override\n public InterpreterValue pow(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the power-result\n if(v instanceof IntegerValue) return new DoubleValue(Math.pow(getValue(), ((IntegerValue) v).getValue()));\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the power-result\n if(v instanceof DoubleValue) return new DoubleValue(Math.pow(getValue(), ((DoubleValue) v).getValue()));\n\n // In other case just throw an error\n throw new Error(\"Operator '**' is not defined for type double and \" + v.getName());\n\n }", "public double pow(double x, int n) {\n\n double result = 1.0;\n if (n == 0) {\n return result;\n }\n\n boolean neg = false;\n if (n < 0) {\n neg = true;\n n = -n;\n }\n\n while (n > 0) {\n if ((n % 2) == 1) {\n result *= x;\n }\n n = n / 2;\n x = x * x;\n }\n return neg ? 1.0 / result : result;\n }", "private static final int getPower(Parsing t) {\n\t\tchar s='+';\t\t// Exponent Sign\n\t\tint pow=0;\t\t// Exponent Value\n\t\tint inum=0;\t\t// Index of exponent\n\t\tint posini=t.pos;\n\t\t//System.out.print(\"....getPower on '\" + this + \"', pos=\" + pos + \": \");\n\t\tt.pos = t.length-1;\n\t\tif (Character.isDigit(t.a[t.pos])) {\n\t\t\twhile (Character.isDigit(t.a[t.pos])) --t.pos;\n\t\t\ts = t.a[t.pos];\n\t\t\tif ((s == '+') || (s == '-')) ;\t// Exponent starts here\n\t\t\telse ++t.pos;\n\t\t\tinum = t.pos;\n\t\t\tpow = t.parseInt();\n\t\t\t//System.out.print(\"found pow=\" + pow + \",pos=\" + pos);\n\t\t}\n\t\tif (pow != 0) {\t\t// Verify the power is meaningful\n\t\t\tif (t.a[0] == '(') {\n\t\t\t\tif (t.a[inum-1] != ')') pow = 0;\n\t\t\t}\n\t\t\telse {\t\t// could be e.g. m2\n\t\t\t\tfor (int i=0; i<inum; i++) {\n\t\t\t\t\t// Verify the unit is not a complex one\n\t\t\t\t\tif (!Character.isLetter(t.a[i])) pow = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (pow == 0) t.pos = posini;\n\t\telse t.pos = inum;\n\t\t//System.out.println(\" pow=\" + pow + \", pos=\" + pos);\n\t\treturn(pow);\n\t}", "long power(int a, int b){\r\n\t\tlong pow=1;\r\n\t\tfor(int i=0;i<b;i++)\r\n\t\t{\r\n\t\t\tpow=pow*a;\r\n\t\t}\r\n\t\treturn pow;\r\n\t}", "public double nextDoubleOpen() {\n\tdouble result = d1 / POW3_33;\n\tnextIterate();\n\treturn result;\n }", "public void GetPowerOfTwo(int powerOfTwo) {\n if (powerOfTwo <= 0 || powerOfTwo < 31) {\n System.out.println(\"Power of 2's: \");\n\n for (int i = 0; i <= powerOfTwo; i++) {\n int powerOfValue = ((int) Math.pow(2, i)); //2^i\n System.out.println(\"The value of 2^\" + i + \" is: \" + powerOfValue);\n }\n } else\n System.out.println(\"Value overflows int value\");\n }", "@SuppressWarnings(\"unchecked\")\r\n \tpublic IMeasure<? extends IMeasure<Q>> pow(int exp) {\r\n \t\tif (exp < 0)\r\n \t\t\treturn (IMeasure<? extends IMeasure<Q>>) this.pow(-exp).inverse();\r\n \t\tif (exp == 0)\r\n \r\n \t\t\treturn (IMeasure<? extends IMeasure<Q>>) ONE;\r\n \r\n \t\tIMeasure<? extends IMeasure<Q>> pow2 = (IMeasure<? extends IMeasure<Q>>) this;\r\n \t\tIMeasure<? extends IMeasure<Q>> result = null;\r\n \t\twhile (exp >= 1) { // Iteration.\r\n \r\n \t\t\tif ((exp & 1) == 1) {\r\n \t\t\t\tresult = (IMeasure<? extends IMeasure<Q>>) ((result == null) ? pow2\r\n \t\t\t\t\t\t: result.multiply(pow2));\r\n \r\n \t\t\t}\r\n \r\n \t\t\tpow2 = (IMeasure<? extends IMeasure<Q>>) pow2.multiply(pow2);\r\n \r\n \t\t\texp >>>= 1;\r\n \r\n \t\t}\r\n \r\n \t\treturn result;\r\n \r\n \t}", "@Override\n\tpublic double pow(double base, double exp) {\n\t\treturn 0;\n\t}", "public static double exp() {\r\n System.out.println(\"What is your base?\");\r\n int b = Main.sc.nextInt();\r\n System.out.println(\"What is your power?\");\r\n int p = Main.sc.nextInt();\r\n double answer = Math.pow((double) b, (double) p);\r\n return answer;\r\n }", "public double doubleValue(int numDays)\n {\n double amount = 0;\n \n for(int j = 0; j < numDays; j++)\n {\n amount = Math.pow(j, 2);\n \n } \n \n System.out.println(amount);\n return amount;\n }", "public int ConvertToDecimalInt() {\n int result = 0;\n int cont = 0;\n for (int index = binaries.length - 1; index > 0; index--) {\n result = result + ((int) (Math.pow(base, cont)) * binaries[index]);\n cont++;\n }\n return result;\n }", "public static double fun(double[] args) {\n\t\tdouble s = Math.pow(2, 3);\n\t\treturn s;\n\t}", "public int doubleToInt(double val) {\r\n\t\tint i = (int) val; // Cast to integer\r\n\t\tdouble p = val - i; // Retrieve the decimal component\r\n\r\n\t\tif (rand.nextDouble() < p) // Roll the dice\r\n\t\t\ti++; // +1\r\n\r\n\t\treturn i;\r\n\t}", "public static double power2(double x, int n) {\n if (n == 0)\n return 1;\n else {\n double partial = power2(x, n / 2); // rely on truncated division of n\n double result = partial * partial;\n if (n % 2 == 1) // if n odd, include extra factor of x\n result *= x;\n return result;\n }\n }", "public static int power(int a, int b) {\n\n\t\treturn (int) Math.pow(a, b);\n\t}", "public int getExponent();", "private int toIntegerExpression(double value) {\n return (int) (value * Math.pow(10.0, mNumberOfDecimalDigits));\n }", "public static long nextPowerOfTwo(long x) {\n if (x == 0) return 1;\n x--;\n x |= x >> 1;\n x |= x >> 2;\n x |= x >> 4;\n x |= x >> 8;\n x |= x >> 16;\n return (x | x >> 32) + 1;\n }", "private int power(int base, int exp) {\n\t\tint p = 1;\n\t\tfor( int i = exp ; i > 0; i-- ) {\n\t\t\tp = p * base;\n\t\t}\n\t\treturn p;\n\t}", "public int pow (int x, int n) {\n\tif (n == 0)\n\t\treturn 1;\n\tif (n == 1)\n\t\treturn x;\n\tint t = pow (x, n/2);\n\tt *= t;\n\tif (n % 2 == 1)\n\t\tt *= x;\n\treturn t;\n}", "public double myPow(double x, int n) {\n if (n == 0) {\n \treturn 1;\n }\n if (n == 1) {\n \treturn x;\n }\n if (n == -1) {\n \treturn 1 / x;\n }\n double num = myPow(x, n / 2);\n return num * num * myPow(x, n % 2);\n }", "public static int intPow(int a, int b){\n\t\tint r = 1;\n\t\tint i = 1;\n\t\tif(b > 8){\n\t\t\tr = A;\n\t\t\ti = 2; //i++;\n\t\t\twhile(i <= B){\n\t\t\t\tr *= r;\n\t\t\t\ti *= 2;\n\t\t\t}\n\t\t\ti /= 2; // >>= 2;\n\t\t}\n\t\tif(i < b){\n\t\t\tdo{\n\t\t\t\ti++;\n\t\t\t\tr *= a;\n\t\t\t} while(i <= b);\n\t\t}\n\t\treturn r;\n\t}", "public static int p(int i)\n {\n return (i - 1) / 2;\n }", "public Integer getExponent();", "public static double pow(double a, double b) {\n\t\treturn exp(b * log(a));\n\t}", "public static double power(double base, int exp) {\r\n if (exp == 0) {\r\n return 1;\r\n }\r\n\r\n if (exp > 0) {\r\n return pow(base, exp);\r\n } else {\r\n return 1 / pow(base, Math.abs(exp));\r\n }\r\n\r\n }", "public static int power(int x, int y) {\n\t\tif (y <= 0)\n\t\t\treturn 1;\n\t\tint temp;\n\t\tif (y % 2 == 0) {\n\t\t\ttemp = power(x, (y / 2));\n\t\t\treturn temp * temp;\n\t\t} else {\n\t\t\ttemp = power(x, (y - 1) / 2);\n\t\t\treturn x * temp * temp;\n\t\t}\n\t}", "public HugeUInt pow(int p) {\r\n \tHugeUInt one = new HugeUInt(1);\r\n \tHugeUInt acc = one;\r\n \tif(p==0){\r\n \t\treturn one;\r\n \t}\r\n \tHugeUInt c = one.multiply(this);\r\n \twhile(p>1){\r\n \t\tif(p%2==0){\r\n \t\t\tc = c.multiply(c);\r\n \t\t}\r\n \t\telse if(p%2==1){\r\n \t\t\tacc = acc.multiply(c);\r\n \t\t\tc = c.multiply(c);\r\n \t\t}\r\n \t\tp/=2;\r\n \t}\r\n \treturn c.multiply(acc);\r\n }", "public static int nextPowerOfTwo(int x) {\n if (x == 0) return 1;\n x--;\n x |= x >> 1;\n x |= x >> 2;\n x |= x >> 4;\n x |= x >> 8;\n return (x | x >> 16) + 1;\n }", "@Override\n public default IntegerToLongAccessPrimitive pow(long anotherValue) {\n return host -> {\n val value = accessPrimitive(this, host);\n return (long) Math.pow(value, anotherValue);\n };\n }", "public int power(int base, int exp) {\n if (exp == 0) {\n return 1;\n }\n long result = power(base, exp / 2);\n result *= result % G;\n if (exp % 2 == 1) {\n result *= base;\n }\n return (int) result;\n }", "public double nextDouble() {\r\n\r\n\t\t//System.out.println(\"cur v\"+curVal);\r\n\t\tcurVal = (long) Math.pow(curVal, 2);\r\n\t\t//System.out.println(\"sq \"+curVal);\r\n\t\t\r\n\t\tLong l = new Long(curVal);\r\n\t\tStringBuffer sb = new StringBuffer(l.toString());\r\n\t\twhile(sb.length() < size){\t\t\t\r\n\t\t\tsb.append(\"7\");\r\n\t\t}\r\n\t\tint zeros = sb.indexOf(\"00\");\t\t\r\n\t\tString s = sb.toString();\r\n\t\tif(-1 != zeros){\r\n\t\t\ts = s.replace('0', '3');\t\t\r\n\t\t}\r\n\t\t//System.out.println(\"padded \"+s);\r\n\t\t\r\n\t\tint start = (s.length() - size) / 2;\t\t\r\n\t\t//System.out.println(\"start \"+start+\" start+s \"+(start+size));\r\n\t\tcurVal = Long.parseLong(s.substring(start, start+size));\r\n\t\t//System.out.println(\"next \"+curVal);\r\n\t\t\r\n\t\treturn (double)curVal/sizeMax;\r\n\t}", "public int getExponent( double f ) {\r\n \r\n int exp = (int)( Math.log( f ) / Math.log( 2 ) );\r\n \r\n return exp;\r\n \r\n }", "public double myPow(double x, int n) {\n // write your code here\n boolean neg = false;\n if (n < 0) {\n x = 1 / x;\n n = - (n + 1);\n neg = true;\n }\n\n double ans = 1, base = x;\n while (n > 0) {\n if (n % 2 == 1) {\n ans *= base;\n }\n base *= base;\n n /= 2;\n }\n\n if (neg) ans *= x;\n return ans;\n }", "public static int nextPowerOfTwo(final int value) {\r\n final int exp = (int) Math.ceil(Math.log(value) / Math.log(2));\r\n return (int) Math.pow(2, exp);\r\n }", "static int exp(int base, long n) {\n\n // 2^3=8 , 2^x=8 -> x = ln8/ln2 , otherwise x=Math.log(8)/Math/log(2)\n\n return (int) ( Math.log(n)/Math.log(base) );\n }", "public double wrapper(double n) {\n return -1 + (n + 1) % 2;\n }", "public double f(double x) {\n return Math.pow(x, 10) - 1; // Esta es la cuarta funcion f(x) vista en clase\r\n }", "public int getPower();", "public int getPower(String genEle);", "public double xToPowOfY(double num1, double num2) {\n\t\treturn Math.pow(num1, num2);\n\t}", "public long getExponentInt64(boolean biased) {\n Native.LongPtr res = new Native.LongPtr();\n if (!Native.fpaGetNumeralExponentInt64(getContext().nCtx(), getNativeObject(), res, biased))\n throw new Z3Exception(\"Exponent is not a 64 bit integer\");\n return res.value;\n }", "public static int power(int x, int y) {\n int result = 1;\n while (y-- > 0)\n result *= x;\n return result;\n }", "public static Object pow(Object val1, Object val2) {\n\t\tif (isInt(val1) && isInt(val2)) {\n\t\t\tint exponent = ((BigInteger) val2).intValue();\n\t\t\treturn ((BigInteger) val1).pow(exponent);\n\t\t}\n\t\tthrow new OrccRuntimeException(\"type mismatch in pow\");\n\t}", "private static int getNearestPowerOfTwo(int num)\n\t{\n\n\t\tint value = -2;\n\t\tint exponent = 0;\n\n\t\tdo\n\t\t{\n\t\t\texponent = exponent + 1;\n\t\t\tvalue = (int)Math.pow(2, exponent);\n\t\t}\n\t\twhile(value <= num);\n\n\t\treturn exponent - 1;\n\t}", "public int b(int i2) {\n return (int) ((c(i2 + 1) - c(i2)) / 604800000);\n }", "public static double[] pow(double[] data, double base) {\n\t\tdouble[] result = new double[data.length];\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tresult[i] = Math.pow(base, data[i]);\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public static Matrix pow(double base, Matrix index)\n {\n double[][] d = index.getArray();\n int row = index.getRowDimension(), col = index.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double[][] C = X.getArray();\n double val = 1.0;\n\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n val = Math.pow(base, d[i][j]);\n if (val > Double.MAX_VALUE)\n {\n C[i][j] = Double.MAX_VALUE;\n }\n else\n {\n C[i][j] = val;\n }\n }\n }\n return X;\n }", "public double exponent()\n\t{\n\t\treturn _dblExponent;\n\t}", "public static double power(double a, int n) {\n\t double result=1;\n\t for(int i=0;i<n;i++) {\n\t result=result*a;\n\t }\n\t return result;\n\t }", "private int toPower(int base, int exponent)\n\t {\n\t \t if(exponent > 0)\n\t {\n\t return toPower(base, exponent - 1) * base;\n\t }\n\t return 1;\n\t }", "private int getRightOf(int i) {\n \t\t// TODO Complete this method!\n \t\treturn 2*i + 1;\n \t}", "private int nextPowerOf2(int n)\n {\n if (n > 0 && (n & (n - 1)) == 0)\n return n;\n \n int count = 0;\n for (;n != 0; n = n >> 1)\n count += 1;\n \n return 1 << count;\n }", "private static double sq (double x) {\n return Math.pow(x, 2);\n }", "public static Matrix pow(Matrix base, double index)\n {\n double[][] d = base.getArray();\n int row = base.getRowDimension(), col = base.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double[][] C = X.getArray();\n // double[][] result = new double[row][col];\n double val = 1.0;\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n val = Math.pow(d[i][j], index); // System.out.println(\"val = \"+val);\n if (val > Double.MAX_VALUE)\n {\n C[i][j] = Double.MAX_VALUE;\n }\n else\n {\n C[i][j] = val;\n }\n }\n }\n return X;\n }", "public static int hashOp( int i )\n\t{\n\t\t// Do NOT change this method!\n\t\tint doubled = 2 * i;\n\t\tif ( doubled >= 10 ) {\n\t\t\tdoubled = doubled - 9;\n\t\t}\n\t\treturn doubled;\n\t}", "public long d(int i2) {\n return i(i2).b;\n }", "private BigInteger modInversePow2(BigInteger m)\n {\n\n if (!testBit(0))\n {\n throw new ArithmeticException(\"Numbers not relatively prime.\");\n }\n\n int pow = m.bitLength() - 1;\n\n long inv64 = modInverse64(longValue());\n if (pow < 64)\n {\n inv64 &= ((1L << pow) - 1);\n }\n\n BigInteger x = BigInteger.valueOf(inv64);\n\n if (pow > 64)\n {\n BigInteger d = this.remainder(m);\n int bitsCorrect = 64;\n\n do\n {\n BigInteger t = x.multiply(d).remainder(m);\n x = x.multiply(TWO.subtract(t)).remainder(m);\n bitsCorrect <<= 1;\n }\n while (bitsCorrect < pow);\n }\n\n if (x.sign < 0)\n {\n x = x.add(m);\n }\n\n return x;\n }", "public Double square(Double advNum1) {\n answer = Math.pow(advNum1, 2);\n return answer;\n }", "public int getPower() {\n return PA_POW_reg.getPower();\n }", "public double power(double firstNumber, double secondNumber) {\n\t\tdouble result= Math.pow(firstNumber, secondNumber);\n\t\tif (Double.MAX_VALUE <= result || Double.MIN_VALUE >= result || Double.NaN == result || Double.isInfinite(result)){\n\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Input \", \"Error message\", JOptionPane.ERROR_MESSAGE);\t\t\t\n\t\t\treturn -1111.1111;\n\t\t}\n\t\treturn result;\n\t}", "private static int ceilPow2(int n) {\n int x = 0;\n while ((1L << x) < n)\n x++;\n return x;\n }", "private static long m7404a(long j, long j2) {\n return (long) Math.floor(Math.pow((double) j, 1.0d / ((double) j2)));\n }", "public static void toPower(int size, int power){\nsize = 4;\npower = 2;\n\nInteger powerArray[] = new Integer[size];\nfor (int i = 0; i < size; i++){\n powerArray[i] = (int)Math.pow(i, power);\n}\nSystem.out.println(Arrays.toString(powerArray));\n }", "public java.math.BigDecimal getInput_power()\n\t\tthrows java.rmi.RemoteException;", "public int toDecimal() {\n\t\tint length = data.length;\n\t\tint decimal = 0;\n\t\tfor(int i = 0;i < length;i++) {\n\t\t\tint index = length - 1 - i;\n\t\t\tint power = (int)Math.pow(2, index);\n\t\t\tdecimal = decimal + data[i] * power;\n\t\t}\n\t\treturn decimal;\n\t}", "float getPower();", "public static long power(int n, int m) {\n return (long) Math.pow(n,m);\n }", "public static double powLong(double x, long n) {\n if(n==0) return 1;\n if(n==1) return x;\n if(n<0) return 1/(powLong(x,-n));\n \n double tmp = powLong(x, n/2);\n return tmp*tmp*(powLong(x, n%2));\n }", "public static double exp(double a, double b){\r\n\t\treturn Math.pow(a,b);\r\n\t}", "protected static int right(int i){\n return 2*(i+1);\n }", "public double nextDouble() {\n long x = (nextLong() >>> LONG_TO_DOUBLE_SHIFT) | LONG_TO_DOUBLE_MASK;\n return Double.longBitsToDouble(x) - 1.0;\n }", "public Double exponent(Double advNum1, Double advNum2) {\n answer = Math.pow(advNum1, advNum2);\n return answer;\n }", "private void functionalInterfacesForDoubleIntLong() {\n double d = 1.0;\n DoubleToIntFunction f1 = x -> 1;\n f1.applyAsInt(d);\n\n }", "static int right(int i)\n {\n return (2*i+2);\n }", "BigInteger getPower_consumption();", "public double myPowIter(double x, int n) {\n\t\tif (n == 0)\n\t\t\treturn 1;\n\n\t\tif (n < 0) {\n\t\t\tn = -n;\n\t\t\tx = 1 / x;\n\t\t}\n\t\tdouble ans = 1;\n\t\twhile (n > 0) {\n\t\t\tif ((n & 1) == 1)\n\t\t\t\tans *= x;\n\t\t\tx *= x;\n\t\t\tn >>= 1;\n\t\t}\n\t\treturn ans;\n\t}" ]
[ "0.6890231", "0.65971494", "0.65197974", "0.6486254", "0.6448677", "0.63766897", "0.6317729", "0.6266468", "0.6261335", "0.6232478", "0.62062305", "0.61689216", "0.6168187", "0.6165972", "0.6122576", "0.6118391", "0.6116591", "0.60729647", "0.59536254", "0.5949068", "0.59345037", "0.5921492", "0.59014636", "0.5897662", "0.58829087", "0.58814096", "0.5878565", "0.5878065", "0.58761054", "0.58426964", "0.58004093", "0.5799308", "0.57869095", "0.578523", "0.57751477", "0.5773093", "0.5748819", "0.57428455", "0.57399607", "0.5739362", "0.573616", "0.5729022", "0.5701366", "0.5668674", "0.5667093", "0.5657226", "0.5634605", "0.56339824", "0.5631602", "0.562674", "0.5622589", "0.5596607", "0.55764765", "0.55716807", "0.556864", "0.55593365", "0.555419", "0.5551544", "0.5542757", "0.5536839", "0.55336225", "0.55283916", "0.5523379", "0.5519421", "0.5510675", "0.5500284", "0.5496426", "0.5495416", "0.54819417", "0.5475226", "0.5466507", "0.5463106", "0.5462321", "0.5455452", "0.5448681", "0.5437482", "0.54220766", "0.5420513", "0.54045063", "0.5396755", "0.5396583", "0.5395801", "0.5392129", "0.53878736", "0.53785425", "0.53754497", "0.53749967", "0.5374262", "0.537082", "0.5368581", "0.5362417", "0.53579044", "0.5354333", "0.53316075", "0.53193426", "0.531914", "0.53148794", "0.53082097", "0.5302835", "0.52863264" ]
0.554487
58
This method was created because concat of the root nodes state, e which is a symbol for nothing, and 1 ends up as e1 instead of 1
private String concat(String concat, String orignalState){ if(orignalState.equals("e")){ return concat; } else{ return concat.concat(orignalState); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void prefix(ExpressionNodes root, StringBuilder sb)\n\t {\n\t \t\n\t \t// add the string of this node to the the string builder \n\t \tsb.append(root.data);\n\t \t\n\t \t// add a space in between nodes for clarity.\n\t \tsb.append(\" \");\n\t \t\n\t \tif (root.left != null) // if there is a left child\n\t \t{ \n\t \t\tprefix(root.left, sb); // run recursive method \n\t \t}\n\t \t\n\t \tif (root.right != null) // if there is a right child\n\t \t{ \n\t \t\tprefix(root.right, sb); // run recursive method \n\t \t}\n\t \t\n\t }", "private String getLabelNodeAvl(){\n return concatLabel(this.root);\n }", "@Override\n\tpublic void addInitialState(TreeNode root) {\n\n\t}", "private String toString2(BinaryNode<E> t) {\n if (t == null) return \"\";\n StringBuilder sb = new StringBuilder();\n sb.append(toString2(t.left));\n sb.append(t.element.toString() + \" \");\n sb.append(toString2(t.right));\n return sb.toString();\n }", "private void infix(ExpressionNodes root, StringBuilder sb)\n\t {\t\n\t \t\n\t \tif (root.left != null) // if there is a left child\n\t \t{ \n\t \t\tinfix(root.left, sb); // run recursive method \n\t \t}\n\t \t\n\t \t// add the string of this node to the the string builder \n\t \tsb.append(root.data);\n\t \t\n\t \t// add a space in between nodes for clarity.\n\t \tsb.append(\" \");\n\t \t\n\t \t\n\t \tif (root.right != null) // if there is a right child\n\t \t{ \n\t \t\tinfix(root.right, sb); // run recursive method \n\t \t}\n\t \t\n\t }", "private Node expandStateArgNode(State s, Node curr, Node parent, int depth) {\n\n Node add = null;\n\n if (curr instanceof TerminalNode) {\n\n if (curr instanceof NullaryTerminalNode) {\n\n if (parent != null && !(parent instanceof RepSketchNode)) {\n\n if (((OperatorNode) parent).operatorName.equals(\"notcc\")) {\n\n if (((TerminalNode) curr).sym.name.equals(\"<any>\")) return add;\n\n } else if (((OperatorNode) parent).operatorName.equals(\"not\")) {\n\n s.cost += Main.NOT_TERMINAL_PATTERN;\n\n }\n\n }\n\n add = s.pp.mkTerminalNode(((TerminalNode) curr).sym.name, parent);\n\n\n } else if (curr instanceof RealConstantTerminalNode) {\n\n RealConstantTerminalNode cn = (RealConstantTerminalNode) curr;\n add = s.pp.mkRealConstantNode(cn.k, curr.parent);\n\n }\n\n return add;\n\n } else if (curr instanceof OperatorNode) {\n\n Node[] args = new Node[((OperatorNode) curr).opSymbol.prod.argumentSymbols.length];\n add = s.pp.mkOperatorNode(((OperatorNode) curr).opSymbol, parent, args);\n\n\n if (((OperatorNode) curr).operatorName.contains(\"repeat\")) {\n\n s.pp.numRepeat++;\n\n if (checkConsecutiveRepeat(add)) s.cost += Main.CONSECUTIVE_REPEAT_COST;\n\n }\n\n\n for (int i = 0; i < args.length; i++) {\n\n Node curr_arg = ((OperatorNode) curr).args.get(i);\n Node parsed_arg = expandStateArgNode(s, curr_arg, add, depth + 1);\n\n ((OperatorNode) add).args.set(i, parsed_arg);\n\n }\n\n return add;\n } else {\n\n add = s.pp.mkVarNode(curr, parent, depth);\n\n return add;\n\n }\n\n }", "@Override\n\tpublic void visit(Concat arg0) {\n\t\t\n\t}", "Event_tree()//constructor\r\n\t{\r\n\t\troot_e = null ;\r\n\t}", "public StatementParse reconstructTree(ArrayList<StatementParse> expression){\n // an empty expression will not trigger this method\n // first element is always an integer\n StatementParse left_node = expression.get(0);\n\n for (int i = 1; i < expression.size(); i++){\n StatementParse right_node = expression.get(i);\n if (right_node instanceof IntegerParse && ((IntegerParse) right_node).getValue() == 0){\n continue;\n }\n StatementParse top;\n if (right_node.isNegative()){\n top = new StatementParse(\"-\");\n } else {\n top = new StatementParse(\"+\");\n }\n top.getChildren().add(left_node);\n top.getChildren().add(right_node);\n left_node = top;\n }\n return left_node;\n }", "@Override\n\t\tpublic String toString() {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tpreOrderTraverse(expression.root, 1, sb);\n\t\t\treturn sb.toString();\n\t\t}", "@Override\n public void nullstill() {\n Node<T> curr= hode;\n while (curr!=null){\n Node<T> p= curr.neste;\n curr.forrige=curr.neste= null;\n curr.verdi= null;\n curr= p;\n }\n hode= hale= null;\n endringer++;\n antall=0;\n }", "@Override\n\tpublic void VisitUnaryNode(UnaryOperatorNode Node) {\n\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"Testing expression creation and evaluation.\\n\");\n\n ExpNode e1 = new Bin0pNode(\"+\", new VariableNode(), new ConstNode(3));\n ExpNode e2 = new Bin0pNode(\"*\", new ConstNode(2), new VariableNode());\n ExpNode e3 = new Bin0pNode(\"-\", e1, e2);\n ExpNode e4 = new Bin0pNode(\"/\", e1, new ConstNode(-3));\n\n System.out.println(\"For x = 3: \");\n System.out.println(\" \" + e1 + \" = \" + e1.value(3));\n System.out.println(\" \" + e2 + \" = \" + e2.value(3));\n System.out.println(\" \" + e3 + \" = \" + e3.value(3));\n System.out.println(\" \" + e4 + \" = \" + e4.value(3));\n\n System.out.println(\"nTesting copying...\");\n System.out.println(\" copy of \" + e1 + \" gives \" + copy(e1));\n System.out.println(\" copy of \" + e2 + \" gives \" + copy(e2));\n System.out.println(\" copy of \" + e3 + \" gives \" + copy(e3));\n System.out.println(\" copy of \" + e4 + \" gives \" + copy(e4));\n\n // make a copy of e3, where e3.left is e1\n ExpNode e3copy = copy(e3);\n // make a mdification to e1\n ((Bin0pNode)e1).left = new ConstNode(17);\n System.out.println(\" modified e3: \" + e3 + \"; copy should be unmodified: \" + e3copy);\n\n System.out.println(\"nChecking test data...\");\n double[][] dt = makeTestData();\n for (int i = 0; i < dt.length; i++) {\n System.out.println(\" x = \" + dt[i][0] + \"; y = \" + dt[i][1]);\n\n }\n }", "@Override\n\t\tpublic String toString() {\n\t\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\t\tif (prev != null) {\n\t\t\t\tstringBuilder.append(prev.elementE);\n\t\t\t}else {\n\t\t\t\tstringBuilder.append(\"null\");\n\t\t\t}\n\t\t\tstringBuilder.append(\"_\").append(elementE).append(\"_\");\n\t\t\tif (next != null) {\n\t\t\t\tstringBuilder.append(next.elementE);\n\t\t\t}else {\n\t\t\t\tstringBuilder.append(\"null\");\n\t\t\t}\n\t\t\treturn stringBuilder.toString();\n\t\t}", "@Override\n\tpublic String visitExpr(ExprContext ctx) {\n\t\t\t\t\n\t\t\tif(ctx.getChildCount()==1)\n\t\t\t{\n\t\t\t\treturn visitSubexpr(ctx.subexpr());\n\t\t\t}\n\t\t\telse\n\t\t\t\t\n\t\t\t{\n\t\t\t\tString result = \"\";\n\t\t\t\t\n\t\t\t\t\tresult = \"temp\"+ count.count++;\n\t\t\t\tif(ctx.getChild(1).getText().equals(\"+\"))\n\t\t\t\t{\n\t\t\t\t\tsb.append(\"ADD \"+visit(ctx.children.get(0))+\" \"+visitSubexpr(ctx.subexpr())+\" \"+result+\"\\n\");\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsb.append(\"SUB \"+visit(ctx.children.get(0))+\" \"+visitSubexpr(ctx.subexpr())+\" \"+ result+\"\\n\");\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\n\n\t\t\n\t}", "@Override\n\tpublic void visit(Concat arg0) {\n\n\t}", "int[] concat(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n st[0] = s1;\r\n\t\tst[1] = t2;\r\n\t\t\r\n\t\taddEdge(t1, epssymbol, s2);\r\n\t\t\r\n\t\treturn st;\r\n\t}", "private void rebalanceLeft(TreeNodeDataType n) {\n left(n);\r\n \r\n \r\n }", "void pairwiseCombine(){\n\t\t\n\t\tmin.Left.Right = min.Right;\n\t\tmin.Right.Left = min.Left;\n\t\t/**\n\t\tPairwise combine differentiates itself in operation of depending on the presence of a child node\n\t\t*/\n\t\t\n\t\tif(min.Child==null){\n\t\t/*map acts as the table to store similar degree nodes*/\n\t\t\tHashMap<Integer, Nodefh> map = new HashMap<Integer, Nodefh>();\n\t\t\tcurrent = min.Right;\n\t\t\tmin = null;\n\t\t\tmin = current;\n\t\t\tlast = current.Left;\n\t\t\twhile(current!=last){\n\t\t\t\tNodefh check = new Nodefh();\n\t\t\t\tcheck = current.Right;\n\t\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\t\t\n\t\t\t\t\t/*Since a parent node can have only one child node a condition is checked to update its child node*/\n\t\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\t/*If the node stored is less than the incoming node*/\n\t\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\t\tif(temp.Child == temp.Child.Right){\n\t\t\t\t\t\t\t\ttemp.Child.Right = current;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcurrent = temp;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t/*If the incoming node is lower*/\n\t\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\t\tcurrent.ChildCut = false;\t\n\t\t\t\t\t\tif(current.isChildEmpty()){\n\n\t\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif(min.dist >= current.dist){\n\t\t\t\t\tmin = current;\n\t\t\t\t}\n\t\t\t\tmap.put(current.degree, current);\n\t\t\t\tcurrent = check;\n\n\t\t\t}\n\t\t\tlast = min.Left;\n\t\t\t/*Since our condition is used only till last node and exits during last node the iteration is repeated for the last node*/\n\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = temp;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(min.dist >= current.dist){\n\t\t\t\tmin = current;\n\t\t\t}\n\t\t\tcurrent = min;\n\t\t\tlast = min.Left;\n\n\t\t}\n\t\telse{\n\t\t\tHashMap<Integer, Nodefh> map = new HashMap<Integer, Nodefh>();\n\t\t\tcurrent = min.Child;\n\t\t\tcurrent.Parent = null;\n\t\t\tif(min!=min.Right){\n\t\t\t\tcurrent.Right.Left = min.Left;\n\t\t\t\tmin.Left.Right = current.Right;\n\t\t\t\tcurrent.Right = min.Right;\n\t\t\t\tmin.Right.Left = current;\n\t\t\t\tlast = current.Left;\n\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tlast = current.Left;\n\n\t\t\t}\n\t\t\tmin =null;\n\t\t\tmin = current;\n\t\t\t/*In the presence of a child the child has to be inserted at the top level*/\n\t\t\twhile(current != last){\n\t\t\t\tNodefh check = new Nodefh();\n\t\t\t\tcheck = current.Right;\n\n\t\t\t\twhile(map.containsKey(current.degree)){\n\n\t\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\t\tif(temp.isChildEmpty()){\n\n\t\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrent = temp;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(min.dist >= current.dist){\n\t\t\t\t\tmin = current;\n\n\t\t\t\t}\n\t\t\t\tmap.put(current.degree, current);\n\t\t\t\tcurrent = check;\n\t\t\t}\n\t\t\tlast = min.Left;\n\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\tif(temp.dist < current.dist && temp.dist!=0){\n\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = temp;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(min.dist >= current.dist){\n\t\t\t\tmin = current;\n\n\t\t\t}\n\t\t\tcurrent = min;\n\t\t\tlast = min.Left;\n\t\t}\n\n\t}", "@Override\n public void outPlusExp(PlusExp node)\n {\n Type lexpType = this.mCurrentST.getExpType(node.getLExp());\n Type rexpType = this.mCurrentST.getExpType(node.getRExp());\n mPrintWriter.println(\"#Addddddddddddding\");\n Label l1 = new Label();\n Label l0 = new Label();\n Label l2 = new Label();\n Label l3 = new Label();\n //# Load constant int 1\n if(lexpType == Type.BYTE && rexpType == Type.INT){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Load constant int 0\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //mPrintWriter.println(# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //mPrintWriter.println(# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n\n // mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.BYTE && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt \" + l2);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l3);\n mPrintWriter.println(l2 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l3 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.INT && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //mPrintWriter.println(# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Casting int to byte by popping);\n //mPrintWriter.println(# 2 bytes off stack and only pushing low order bits);\n //mPrintWriter.println(# back on. Low order bits are on top of stack.);\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Load constant int 0);\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a two byte expression off stack);\n mPrintWriter.println(\"pop r18\");\n //mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt\" + l0);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l1 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else{\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n }", "BaleElementEvent fixup()\n{\n if (line_elements.size() > 0) addLine();\n\n BaleElementEvent ee = new BaleElementEvent(root_element,new_children);\n root_element.clear();\n for (BaleElement be : new_children) root_element.add(be);\n BoardLog.logD(\"BALE\",\"ELEMENT FIXUP ROOT \" + new_children.size());\n\n return ee;\n}", "private Node(Node p, E e) {\n \tCLinkedList.this.size++;\n \tthis.data = e;\n \tthis.pred = p;\n \tthis.succ = p.succ;\n \tthis.pred.succ = this;\n \tthis.succ.pred = this;\n }", "public String toString(){\n\t\tStringBuffer sb = new StringBuffer();\n\t\tTList<T> root = this.getRoot();\n\t\tif (root == this) \n\t\t\tsb.append(\"*\");\n\t\tif (root.visited())\n\t\t\tsb.append(\"-\");\n\t\tsb.append(root.getValue());\n\t\twhile (root.hasNext()) {\n\t\t\tsb.append(\" -> \");\n\t\t\troot = root.getNext();\n\t\t\tif (root == this) \n\t\t\t\tsb.append(\"*\");\n\t\t\tif (root.visited())\n\t\t\t\tsb.append(\"-\");\n\t\t\tsb.append(root.getValue());\n\t\t}\n\t\treturn sb.toString();\n\t}", "private List<State> expandStateOperatorNode(State s, OperatorNode n, VariableNode v) {\n\n List<State> ret = new ArrayList<>();\n\n // do not continue if we are trying to replace argument of notcc with a op node\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"notcc\")) {\n return ret;\n }\n }\n\n // Added on 1014\n Node add = expandStateArgNode(s, n, v.parent, v.depth);\n\n s.pp.substituteVar(v, add, true);\n if (evalApprox(s)) ret.add(s);\n\n return ret;\n }", "@Override\r\n public String toString() {\r\n String result = head.toString();\r\n if (result.equals(\"\")) {\r\n return \"0\";\r\n }\r\n if (result.charAt(0) == '+') {\r\n result = result.substring(1);\r\n }\r\n return result;\r\n }", "@Override\n public String toString() { return '(' + left.toString() + ' ' + operation.toString() + ' ' + right.toString() + ')'; }", "@Override\n public String toString() { return '(' + left.toString() + ' ' + operation.toString() + ' ' + right.toString() + ')'; }", "public void inOrden(Node root) {\n\r\n if (root != null) {\r\n inOrden(root.left);\r\n expresion = expresion + root.value + \"\";\r\n inOrden(root.right);\r\n }\r\n\r\n }", "@Override\n\tpublic String toPrefixNotation() {\n\t\tint num;\n\t\tExpressionTree left, right;\n\n\t\ttry {\n\t\t\tnum = Integer.parseInt(EMPTY + this.getValue());\n\t\t\treturn EMPTY + num;\n\t\t}\n\t\tcatch(NumberFormatException n) {\n\t\t\tleft = new ExpressionTree(getLeft());\n\t\t\tright = new ExpressionTree(getRight());\n\t\t\treturn getValue() + SPACE + left.toPrefixNotation() + SPACE \n\t\t\t\t\t+ right.toPrefixNotation();\n\t\t}\n\t}", "@Test\n public void testRemoveDuplicateParentLabels() {\n System.out.println(\"removeDuplicateParentLabels\");\n HuffmanEncoder huffman = new HuffmanEncoder(p, ensemble);\n HuffmanNode root = huffman.createTree();\n HuffmanDemoComponent comp = new HuffmanDemoComponent(root, ensemble);\n HuffmanCell[][] cells = comp.cells;\n CellDisplayCleaner.removeDuplicateParentLabels(cells);\n assertEquals(6, cells.length);\n assertEquals(5, cells[0].length);\n assertTrue(cells[0][0].getLabel().getText().isEmpty());\n assertEquals(\"step 1\", cells[0][1].getLabel().getText());\n assertEquals(\"step 2\", cells[0][2].getLabel().getText());\n assertEquals(\"step 3\", cells[0][3].getLabel().getText());\n assertEquals(\"step 4\", cells[0][4].getLabel().getText());\n assertEquals(\"a\", cells[1][0].getLabel().getText());\n assertEquals(\"b\", cells[2][0].getLabel().getText());\n assertEquals(\"c\", cells[3][0].getLabel().getText());\n assertEquals(\"d\", cells[4][0].getLabel().getText());\n assertEquals(\"e\", cells[5][0].getLabel().getText());\n \n assertEquals(\"0.25\", cells[1][1].getLabel().getText());\n assertEquals(\"0.25\", cells[2][1].getLabel().getText());\n assertEquals(\"0.2\", cells[3][1].getLabel().getText());\n assertEquals(\"0.15\", cells[4][1].getLabel().getText());\n assertEquals(\"0.15\", cells[5][1].getLabel().getText());\n \n assertEquals(\"0.25\", cells[1][2].getLabel().getText());\n assertEquals(\"0.25\", cells[2][2].getLabel().getText());\n assertEquals(\"0.2\", cells[3][2].getLabel().getText());\n assertEquals(\"0.3\", cells[4][2].getLabel().getText());\n assertEquals(\"\", cells[5][2].getLabel().getText());\n \n assertEquals(\"0.25\", cells[1][3].getLabel().getText());\n assertEquals(\"0.45\", cells[2][3].getLabel().getText());\n assertEquals(\"\", cells[3][3].getLabel().getText());\n assertEquals(\"0.3\", cells[4][3].getLabel().getText());\n assertEquals(\"\", cells[5][3].getLabel().getText());\n \n assertEquals(\"0.55\", cells[1][4].getLabel().getText());\n assertEquals(\"0.45\", cells[2][4].getLabel().getText());\n assertEquals(\"\", cells[3][4].getLabel().getText());\n assertEquals(\"\", cells[4][4].getLabel().getText());\n assertEquals(\"\", cells[5][4].getLabel().getText());\n }", "public void updateRoot(MachineState theState) {\n ;\n }", "public void internal() {\n if(count() == 1) return;\n if(!empty()){\n internalNodes(root);\n }\n System.out.println();\n }", "public void setAsEmpty(){\n\t\tnodeStatus = Status.empty;\n\t\tunitNum=-1;\n\t}", "@Override\n public void add(E e) throws NullPointerException\n {\n if(e == null)\n {\n throw new NullPointerException();\n }\n new Node(e, left, right);\n idx += 1;\n previous();\n canRemove = false;\n }", "public void root(Node n) {}", "public OpTree(String theOp)\n\t{\n\t\tme = ++total;\n\t\tif (DEBUG) System.out.println(\"Terminal Op \" + me);\n\t\top = theOp;\n\t\tdval = null;\n\t\tleft = null;\n\t\tright = null;\n\t}", "public static void main(String a[]) {\n TreeNode root = new TreeNode(1,\n new TreeNode(2,\n null,\n new TreeNode(4, null, null)),\n new TreeNode(3, null, null));\n StringBuffer sb = new StringBuffer();\n tree2str(root, sb);\n System.out.println(sb.toString());\n }", "private BinaryNode<AnyType> copy1(BinaryNode<AnyType> t)\r\n\t{\r\n\t\tBinaryNode<AnyType> newNode=null;\r\n\t\tif(t!=null)\r\n\t\t{\r\n\t\t\tnewNode = new BinaryNode<>(t.element,t.left,t.right);\r\n\t\t\tcopy1(t.left);\r\n\t\t\tcopy1(t.right);\r\n\t\t}\r\n\t\treturn newNode;\r\n\t}", "private void linkFirst(E e) {\r\n \tfinal Node<E> f= first;\r\n \tfinal Node<E> newNode = new Node<>(null, e, f);\r\n \tfirst = newNode;\r\n \tif (f == null)\r\n \t\tlast = newNode;\r\n \telse\r\n \t\tf.prev = newNode;\r\n \tsize++;\r\n \tmodCount++;\r\n }", "private Type traverseTree(Node parsedTree) {\n Expression exp = new Expression(Type.EMPTY, Type.EMPTY, Connector.empty); // Creation of a new expression with empty fields\n\n\t\t// Determines the type from left to right of the given expression\n for (Node child : parsedTree.getChildren()) {\n \texp = evalExpressionAndSetLeft(addChildToExpression(child, exp));\n }\n return exp.getLeftExpressionType();\n }", "protected Expression duplicateNodesUnderOps(Expression root, Fragment op) {\n Set<Expression> visited = new HashSet<>();\n if (duplicateNodesUnderOps(root, op, visited)) {\n return visited.iterator().next();\n }\n return null;\n }", "private void createStringConcat( AOpExpr node){\n\t\til.append(fi.createNew(\"java.lang.StringBuilder\"));\n \til.append(InstructionConstants.DUP);\n \tnode.getLeft().apply(this); //Load the left string.\n \til.append(fi.createInvoke(\"java.lang.StringBuilder\", \"<init>\", org.apache.bcel.generic.Type.VOID, new org.apache.bcel.generic.Type[] { org.apache.bcel.generic.Type.STRING }, Constants.INVOKESPECIAL));\n \tnode.getRight().apply(this); \n \til.append(fi.createInvoke(\"java.lang.StringBuilder\", \"append\", new org.apache.bcel.generic.ObjectType(\"java.lang.StringBuilder\"), new org.apache.bcel.generic.Type[] { org.apache.bcel.generic.Type.STRING }, Constants.INVOKEVIRTUAL));\n \til.append(fi.createInvoke(\"java.lang.StringBuilder\", \"toString\", org.apache.bcel.generic.Type.STRING, org.apache.bcel.generic.Type.NO_ARGS, Constants.INVOKEVIRTUAL));\n\t}", "public void makeEmpty() {\r\n\t\troot = null;\r\n\t}", "public String toString() { return root == null ? \"nil\" : root.toString(); }", "@Override public JannotTreeJCExpression getLeftOperand()\n{\n return createTree(getNode().getLeftOperand()); \n}", "public void makeEmpty( )\r\n\t{\r\n\t\troot = null;\r\n\t}", "public void encodeTreeHelper(HuffmanNode node, StringBuilder builder){\n if(node.getLeft() == null && node.getRight()== null && !node.getCharAt().equals(null))\n encodedTable.put(node.getCharAt(),builder.toString());\n else{\n encodeTreeHelper(node.getLeft(), builder.append(\"0\"));\n encodeTreeHelper(node.getRight(), builder.append(\"1\"));\n }\n \n if(builder.length()>0)\n builder.deleteCharAt(builder.length()-1);\n }", "void printpopulateInorderSucc(Node t){\n\t\n\n}", "private BSTNode<E> successor(BSTNode<E> node) {\n\t\treturn null;\n\t}", "public String toString() {\n return toString(root) + \" \";//call helper method for in-order traversal representation\n }", "abstract public E addEmpty();", "public void RecursiveExpansion() throws TreeTooBigException {\r\n int transIndex; //Index to count transitions\r\n int[] newMarkup; //markup used to create new node\r\n boolean aTransitionIsEnabled = false; //To check for deadlock\r\n //Attribute used for assessing whether a node has occured before\r\n boolean repeatedNode = false; \r\n \r\n boolean allOmegas = false;\r\n \r\n boolean[] enabledTransitions = \r\n tree.dataLayer.getTransitionEnabledStatusArray(markup);\r\n\r\n //For each transition\r\n for (int i = 0; i < enabledTransitions.length; i++) {\r\n if (enabledTransitions[i] == true) {\r\n //Set transArray of to true for this index\r\n transArray[i] = true;\r\n \r\n //System.out.println(\"\\n Transition \" + i + \" Enabled\" );\r\n aTransitionIsEnabled = true;\r\n \r\n //print (\"\\n Old Markup is :\", markup);//debug\r\n \r\n //Fire transition to produce new markup vector\r\n newMarkup = fire(i);\r\n \r\n //print (\"\\n New Markup is :\", newMarkup);//debug\r\n \r\n //Check for safeness. If any of places have > 1 token set variable.\r\n for (int j = 0; j < newMarkup.length; j++) {\r\n if (newMarkup[j] > 1 || newMarkup[j] == -1) {\r\n tree.moreThanOneToken = true;\r\n break;\r\n }\r\n } \r\n \r\n //Create a new node using the new markup vector and attach it to\r\n //the current node as a child.\r\n children[i] = \r\n new myNode(newMarkup, this, tree, depth + 1);\r\n \r\n /* Now need to (a) check if any omegas (represented by -1) need to \r\n * be inserted in the markup vector of the new node, and (b) if the \r\n * resulting markup vector has appeared anywhere else in the tree. \r\n * We must do (a) before (b) as we need to know if the new node \r\n * contains any omegas to be able to compare it with existing nodes. \r\n */ \r\n allOmegas = children[i].InsertOmegas();\r\n \r\n //check if the resulting markup vector has occured anywhere else in the tree\r\n repeatedNode = (tree.root).FindMarkup(children[i]);\r\n \r\n if (tree.nodeCount >= Pipe.MAX_NODES && !tree.tooBig) {\r\n tree.tooBig = true;\r\n throw new TreeTooBigException();\r\n }\r\n \r\n if (!repeatedNode && !allOmegas) {\r\n children[i].RecursiveExpansion();\r\n }\r\n }\r\n }\r\n \r\n if (!aTransitionIsEnabled) {\r\n System.err.println(\"No transition enabled\");\r\n if (!tree.noEnabledTransitions || tree.pathToDeadlock.length < depth-1) {\r\n RecordDeadlockPath();\r\n tree.noEnabledTransitions = true;\r\n } else {\r\n System.err.println(\"Deadlocked node found, but path is not shorter\"\r\n + \" than current path.\");\r\n }\r\n } else {\r\n //System.out.println(\"Transitions enabled.\");\r\n }\r\n }", "@Override\n public void clear() {\n root = new Node ('i', false, 256);\n }", "private String _toString(IntTreeNode root) {\r\n if (root == null) {\r\n return \"\";\r\n } else {\r\n String leftToString = _toString(root.left);\r\n String rightToString = _toString(root.right);\r\n return leftToString + rightToString + \" \" + root.data;\r\n } \r\n }", "@Override\n\tpublic int evalTree() {\n\t\tint num;\n\t\tExpressionTree left, right;\n\t\t\n\t\ttry {\n\t\t\tnum = Integer.parseInt(EMPTY + this.getValue());\n\n\t\t\treturn num;\n\t\t}\n\n\t\tcatch (NumberFormatException n) {\n\t\t\tleft = new ExpressionTree(getLeft());\n\t\t\tright = new ExpressionTree(getRight());\n\t\t\tif(TIMES_SIGN.equals(this.getValue()))\n\t\t\t\treturn left.evalTree() * right.evalTree();\n\t\t\telse\n\t\t\t\treturn left.evalTree() + right.evalTree();\n\t\t}\n\t}", "private void validOrderResult() {\n TreeNode currentTreeNode = treeLeaf;\n TreeNode orderTreeNode = null;\n while (!(currentTreeNode instanceof SourceTreeNode)) {\n if (currentTreeNode instanceof OrderGlobalTreeNode) {\n orderTreeNode = currentTreeNode;\n break;\n } else {\n currentTreeNode = UnaryTreeNode.class.cast(currentTreeNode).getInputNode();\n }\n }\n if (null != orderTreeNode) {\n OrderGlobalTreeNode orderGlobalTreeNode = OrderGlobalTreeNode.class.cast(orderTreeNode);\n TreeNode aggTreeNode = orderTreeNode.getOutputNode();\n while (aggTreeNode != null && aggTreeNode.getNodeType() != NodeType.AGGREGATE) {\n aggTreeNode = aggTreeNode.getOutputNode();\n }\n if (null != aggTreeNode) {\n if (aggTreeNode instanceof FoldTreeNode) {\n TreeNode inputTreeNode = UnaryTreeNode.class.cast(aggTreeNode).getInputNode();\n if (inputTreeNode == orderTreeNode) {\n return;\n }\n UnaryTreeNode inputUnaryTreeNode = UnaryTreeNode.class.cast(inputTreeNode);\n if (inputUnaryTreeNode.getInputNode() == orderTreeNode &&\n (inputUnaryTreeNode instanceof EdgeVertexTreeNode &&\n EdgeVertexTreeNode.class.cast(inputUnaryTreeNode).getDirection() != Direction.BOTH)) {\n return;\n }\n String orderLabel = orderGlobalTreeNode.enableOrderFlag(labelManager);\n SelectOneTreeNode selectOneTreeNode = new SelectOneTreeNode(new SourceDelegateNode(inputUnaryTreeNode, schema), orderLabel, Pop.last, Lists.newArrayList(), schema);\n selectOneTreeNode.setConstantValueType(new ValueValueType(Message.VariantType.VT_INTEGER));\n OrderGlobalTreeNode addOrderTreeNode = new OrderGlobalTreeNode(inputUnaryTreeNode, schema,\n Lists.newArrayList(Pair.of(selectOneTreeNode, Order.incr)));\n UnaryTreeNode.class.cast(aggTreeNode).setInputNode(addOrderTreeNode);\n }\n } else {\n if (treeLeaf instanceof OrderGlobalTreeNode) {\n return;\n }\n TreeNode currTreeNode = orderTreeNode.getOutputNode();\n boolean hasSimpleShuffle = false;\n while (currTreeNode != null) {\n if (currTreeNode.getNodeType() == NodeType.FLATMAP\n || (currTreeNode instanceof PropertyNode &&\n !(UnaryTreeNode.class.cast(currTreeNode).getInputNode().getOutputValueType() instanceof EdgeValueType))) {\n hasSimpleShuffle = true;\n break;\n }\n currTreeNode = currTreeNode.getOutputNode();\n }\n if (!hasSimpleShuffle) {\n return;\n }\n\n UnaryTreeNode outputTreeNode = UnaryTreeNode.class.cast(treeLeaf);\n if (outputTreeNode.getInputNode() == orderTreeNode) {\n if (outputTreeNode instanceof EdgeVertexTreeNode &&\n EdgeVertexTreeNode.class.cast(outputTreeNode).getDirection() != Direction.BOTH) {\n return;\n }\n if (orderTreeNode.getOutputValueType() instanceof EdgeValueType && outputTreeNode instanceof PropertyNode) {\n return;\n }\n }\n String orderLabel = orderGlobalTreeNode.enableOrderFlag(labelManager);\n SelectOneTreeNode selectOneTreeNode = new SelectOneTreeNode(new SourceDelegateNode(treeLeaf, schema), orderLabel, Pop.last, Lists.newArrayList(), schema);\n selectOneTreeNode.setConstantValueType(new ValueValueType(Message.VariantType.VT_INTEGER));\n treeLeaf = new OrderGlobalTreeNode(treeLeaf, schema,\n Lists.newArrayList(Pair.of(selectOneTreeNode, Order.incr)));\n }\n }\n }", "public Node()\n\t{\n\t\toriginalValue = sumValue = 0;\n\t\tparent = -1;\n\t}", "@Override\n public boolean add(E e) {\n if (root != null) {\n if (!root.addElement(e)) {\n return false;\n }\n root = root.balance();\n } else {\n root = new Node(e, null, null, 1);\n }\n size++;\n return true;\n }", "public void makeEmpty() {\n\t\troot = null;\n\t}", "@Override\n public String toString(){\n String result = \"\";\n Node n = first;\n while(n != null){\n result += n.value + \" \";\n n = n.next;\n }\n return result;\n }", "private void postfix(ExpressionNodes root, StringBuilder sb)\n\t {\n\t \tif (root.left != null) // if there is a left child\n\t \t{ \n\t \t\tpostfix(root.left, sb); // run recursive method\n\t \t}\n\t \t\n\t \tif (root.right != null) // if there is a right child\n\t \t{ \n\t \t\tpostfix(root.right, sb); // run recursive method \n\t \t}\n\t \t\n\t \t// add the string of this node to the the string builder \n\t \tsb.append(root.data);\n\t \t\n\t \t// add a space in between nodes for clarity.\n\t \tsb.append(\" \");\n\t }", "public EventNode getDummyInitialNode() {\n return dummyInitialNode;\n }", "@Override\n public ListNode<T> append(T e) {\n \treturn new ListNode<T>(e,this);\n }", "@Override\n public String toString() { return root.toString(); }", "public String toString2() {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tpostOrderTraverse(expression.root,sb);\n\t\t\treturn sb.toString();\n\t\t}", "public void updateFirstNode()\n {\n firstNode = (lastNode.getNext() == null) ? lastNode : lastNode.getNext();\n }", "@Override\n public TreeNode parse() {\n TreeNode first = ArithmeticSubexpression.getAdditive(environment).parse();\n if (first == null) return null;\n\n // Try to parse something starting with an operator.\n List<Wrapper> wrappers = RightSideSubexpression.createKleene(\n environment, ArithmeticSubexpression.getAdditive(environment),\n BemTeVicTokenType.EQUAL, BemTeVicTokenType.DIFFERENT,\n BemTeVicTokenType.GREATER_OR_EQUALS, BemTeVicTokenType.GREATER_THAN,\n BemTeVicTokenType.LESS_OR_EQUALS, BemTeVicTokenType.LESS_THAN\n ).parse();\n\n // If did not found anything starting with an operator, return the first node.\n if (wrappers.isEmpty()) return first;\n\n // Constructs a binary operator node containing the expression.\n Iterator<Wrapper> it = wrappers.iterator();\n Wrapper secondWrapper = it.next();\n BinaryOperatorNode second = new BinaryOperatorNode(secondWrapper.getTokenType(), first, secondWrapper.getOutput());\n\n if (wrappers.size() == 1) return second;\n\n // If we reach this far, the expression has more than one operator. i.e. (x = y = z),\n // which is a shortcut for (x = y AND y = z).\n\n // Firstly, determine if the operators are compatible.\n RelationalOperatorSide side = RelationalOperatorSide.NONE;\n for (Wrapper w : wrappers) {\n side = side.next(w.getTokenType());\n }\n if (side.isMixed()) {\n environment.emitError(\"XXX\");\n }\n\n // Creates the other nodes. In the expression (a = b = c = d), The \"a = b\"\n // is in the \"second\" node. Creates \"b = c\", and \"c = d\" nodes.\n List<BinaryOperatorNode> nodes = new LinkedList<BinaryOperatorNode>();\n nodes.add(second);\n\n TreeNode prev = secondWrapper.getOutput();\n while (it.hasNext()) {\n Wrapper w = it.next();\n BinaryOperatorNode current = new BinaryOperatorNode(w.getTokenType(), prev, w.getOutput());\n prev = w.getOutput();\n nodes.add(current);\n }\n\n // Combines all of the nodes in a single one using AND.\n return new VariableArityOperatorNode(BemTeVicTokenType.AND, nodes);\n }", "public String getForward(){\n String str = \"\";\n if( !this.isEmpty() ){\n MyDoubleNode<Type> aux = this.start;\n while(aux != null){\n str += aux.value.toString() + \" \";\n aux = aux.next;\n }\n }\n return str;\n }", "private String bfs(){\n String ans=\"\";\n //Base Case\n if (mRoot == null)\n return \"\";\n if (mRoot.mIsLeaf)\n return mRoot.toString();\n //create a queue for nodes and a queue for signs\n Queue<BTNode> q = new QueueAsLinkedList<>();\n Queue<Character> s = new QueueAsLinkedList<>();\n BTNode currNode = mRoot;\n q.enqueue(currNode);\n return getBfsOutput(ans, q, s, currNode);\n }", "private Node append(E element) {\n \treturn new Node(sentinel.pred, element);\n }", "public ExpressionTree()\n\t\t{\n\t root = null;\n\t\t}", "public int fullNode(Node root) {\n\t\t\n\t\tint fullnode = 0;\n\t\t\n\t\tif(root == null)\n\t\t\treturn 0;\n\t\t\n\t\tif(root.left!=null && root.right!=null) {\n\t\t\tfullnode ++;\n\t\t\tSystem.out.print(root.data + \" \");\n\t\t}\n\t\tfullnode += fullNode(root.left)+fullNode(root.right); \n\t\n\t\treturn fullnode;\n\t\t\n\t}", "private int joinFirstCase(AVLTree t1, IAVLNode x, AVLTree t2) {\r\n\t\t\t int returnValue = 0;\r\n\t\t\t IAVLNode curr = t2.getRoot();\r\n\t\t\t \r\n\t\t\t while(true) {\r\n\t\t\t\t if(curr.getHeight() <= t1.getRoot().getHeight())\r\n\t\t\t\t\t break;\r\n\t\t\t\t if(curr.getLeft().getHeight() == -1)\r\n\t\t\t\t\t break;\r\n\t\t\t\t curr = curr.getLeft();\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t if(t2.getRoot() == curr) {\r\n\t\t\t\t curr.setLeft(x);\r\n\t\t\t\t x.setParent(curr);\r\n\t\t\t\t curr.setHeight(curr.getHeight() + 1 );\r\n\t\t\t\t return 0;\r\n\t\t\t\t\t\t \r\n\t\t\t }\r\n\t\t\t returnValue = t2.getRoot().getHeight() - curr.getHeight();\r\n\t\t\r\n\t\t\t //replacing pointers\r\n\t\t\t x.setRight(curr);\r\n\t\t\t x.setParent(curr.getParent());\r\n\t\t\t curr.getParent().setLeft(x);\r\n\t\t\t curr.setParent(x);\r\n\t\t\t x.setLeft(t1.getRoot());\r\n\t\t\t t1.getRoot().setParent(x);\r\n\t\t\t t1.setRoot(t2.getRoot());\r\n\t\t\t x.setHeight(Math.max(x.getRight().getHeight(),x.getLeft().getHeight()) + 1);\r\n\t\t\t \r\n\t\t\t t2.minimum = t1.minimum;\r\n\t\t\t \r\n\t\t\t //FIXING NEW TREE CREATED\r\n\t\t\t HieghtsUpdating(x);\r\n\t\t\t SizesUpdate(x);\r\n\t\r\n\t\t\t return returnValue;\r\n\t\t\t \r\n\t\t}", "private List<State> expandStateTerminalNode(State s, TerminalNode n, VariableNode v) {\n\n List<State> ret = new ArrayList<>();\n\n if (n instanceof NullaryTerminalNode) {\n\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"notcc\")) {\n if (n.sym.name.equals(\"<any>\")) return ret;\n } else if (((OperatorNode) v.parent).operatorName.equals(\"not\")) {\n s.cost += Main.NOT_TERMINAL_PATTERN;\n }\n }\n\n Node add = s.pp.mkTerminalNode(n.sym.name, v.parent);\n s.pp.substituteVar(v, add, true);\n\n } else if (n instanceof RealConstantTerminalNode) {\n\n RealConstantTerminalNode cn = (RealConstantTerminalNode) n;\n Node add = s.pp.mkRealConstantNode(cn.k, v.parent);\n s.pp.substituteVar(v, add);\n\n }\n\n if (evalApprox(s)) ret.add(s);\n\n\n return ret;\n }", "public void leaves( ) {\n if(count() == 1) return;\n if(!empty()){\n leavesNodes(root);\n }\n System.out.println();\n }", "public boolean empty() {\n if(root==EXT_NODE) {\r\n \treturn true;\r\n }\r\n return false;\r\n }", "public String infix()\n\t {\n\t \t// create an empty string builder // \n\t \tStringBuilder sb = new StringBuilder();\n\t \t\n\t \t// fill the string builder//\n\t \tinfix(root, sb);\n\t \t\n\t \treturn sb.toString().trim();\n\t }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tTreeNode r1 = new TreeNode(1);\n\t\tTreeNode r2 = new TreeNode(2);\n\t\tTreeNode r3 = new TreeNode(3);\n\t\tTreeNode r4 = new TreeNode(4);\n\t\tTreeNode r5 = new TreeNode(5);\n\t\tTreeNode r6 = new TreeNode(6);\n\t\tTreeNode r7 = new TreeNode(7);\n\t\tTreeNode r8 = new TreeNode(8);\n\t\t\n\t\tr1.left = r2;\n\t\tr1.right = r5;\n\t\tr2.left = r3;\n\t\tr2.right = r4;\n\t\tr5.right = r6;\n\t\tr6.left = r7;\n\t\tr6.right = r8;\n\t\t\n\t\tflatten(r1);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tTreeNode p = r1;\n\t\twhile(p !=null){\n\t\t\tsb.append(p.val+\"-->\");\n\t\t\tp=p.right;\n\t\t}\n\t\t\n\t\tSystem.out.println(sb);\n\t\t\n\t}", "@Override\n\tpublic java.lang.String getNode_1() {\n\t\treturn _dictData.getNode_1();\n\t}", "public String addValToPreorder(Node root)\n\t{\n\t\tpreorder = preorder + root.getNodeValue() + \" \";\n\t\treturn preorder;\n\t}", "private void helper(TreeNode root) {\n if (root == null) {\n return;\n }\n\n helper(root.left);\n ans.add(root.val);\n helper(root.right);\n }", "private AvlNode<E> doubleWithLeftChild(AvlNode<E> k1){\n k1.left = rotateWithRightChild(k1.left);\n return rotateWithLeftChild(k1);\n }", "static int nullNode() {\n\t\treturn -1;\n\t}", "@Override\r\n public String toString(){\r\n return Integer.toString(node);\r\n }", "public TreeNode(Object e) {\n element = e;\n //this.parent = null;\n left = null;\n right = null;\n }", "public void makeEmpty()\n {\n root = nil;\n }", "private FiniteAutomaton parseE() {\n\n\t\tFiniteAutomaton t = parseT();\n\n\t\tint c = peek();\n\n\t\tif (c >= 0 && c != ')' && c != '|') {\n\t\t\t// concatenation\n\n\t\t\tFiniteAutomaton e = parseE();\n\n\t\t\t// create result automaton\n\t\t\tFiniteAutomaton result = new FiniteAutomaton();\n\t\t\tresult.addAll(t);\n\t\t\tresult.addAll(e);\n\n\t\t\t// create ε-transition connecting e's accepting state to r's start state\n\t\t\tresult.createTransition(t.getUniqueAcceptingState(), e.getStartState(), FiniteAutomaton.EPSILON);\n\t\t\tt.getUniqueAcceptingState().setAccepting(false);\n\t\t\te.getStartState().setStart(false);\n\n\t\t\t// done\n\t\t\treturn check(result);\n\t\t}\n\n\t\treturn t;\n\t}", "@Override\n\tpublic String toInfixNotation() {\n\t\tint num;\n\t\tExpressionTree left, right;\n\n\t\ttry {\n\t\t\tnum = Integer.parseInt(EMPTY + this.getValue());\n\t\t\treturn EMPTY + num;\n\t\t}\n\t\tcatch(NumberFormatException n) {\n\t\t\tleft = new ExpressionTree(getLeft());\n\t\t\tright = new ExpressionTree(getRight());\n\t\t\t\n\t\t\treturn OPEN_PAREN + left.toInfixNotation() + SPACE + getValue() \n\t\t\t\t\t+ SPACE + right.toInfixNotation() + CLOSED_PAREN;\n\t\t}\n\t}", "public static TreeNode buildTree01() {\n\t\t\n\t\tTreeNode root = new TreeNode(5);\n\t\t\n\t\troot.left = new TreeNode(4);\n\t\troot.left.left = new TreeNode(11);\n\t\troot.left.left.left = new TreeNode(7);\n\t\troot.left.left.right = new TreeNode(2);\n\t\t\n\t\troot.right = new TreeNode(8);\n\t\troot.right.left = new TreeNode(13);\n\t\troot.right.right = new TreeNode(4);\n\t\troot.right.right.right = new TreeNode(1);\n\t\t\n\t\treturn root;\n\t}", "private Node() {\n \tthis.data = null;\n \tthis.pred = this;\n \tthis.succ = this;\n }", "public BinNode (E data)\n {\n this.data = data;\n left = null;\n right = null;\n }", "public Stabel(){\n elementer = 0;\n hode = new Node(null);\n hale = hode;\n hode.neste = hale;\n hale.forrige = hode;\n }", "public static TreeNode generateBinaryTree1() {\n // Nodes\n TreeNode root = new TreeNode(5);\n TreeNode rootLeft = new TreeNode(2);\n TreeNode rootRight = new TreeNode(4);\n TreeNode rootLeftLeft = new TreeNode(20);\n TreeNode rootLeftRight = new TreeNode(1);\n // Edges\n root.left = rootLeft;\n root.right = rootRight;\n rootLeft.left = rootLeftLeft;\n rootLeft.right = rootLeftRight;\n\n // Return root\n return root;\n }", "public String toString() {\n\t\tif (label == null && numChildren <= 0)\n\t\t\treturn \"()\";\n\t\tStringBuffer ret = new StringBuffer(label.toString());\n\t\tif (numChildren > 0) {\n\t\t\tret.append(\"(\"+children[0].toString());\n\t\t\tfor (int i = 1; i < numChildren; i++) {\n\t\t\t\tret.append(\" \"+children[i].toString());\n\t\t\t}\n\t\t\tret.append(\")\");\n\t\t}\n\t\t//\telse\n\t\t//\t ret.append(\":\"+label.hashCode());\n\t\treturn ret.toString();\n\t}", "public String printBFSTree(){\n if(root==null)return \"\";\n String binstr=\"\";\n String valuestr=\"\";\n String codestr=\"\";\n LinkedList<HCNode> list=new LinkedList<HCNode>();\n root.code=\"\";\n list.add(root);\n HCNode node;\n while(list.size()>0){\n node=list.getFirst();\n if(node.left==null && node.right==null){\n binstr=binstr+\"0\";\n valuestr=valuestr+((byte)node.str.charAt(0))+\"\\n\";\n codestr=codestr+node.code;\n }else{\n binstr=binstr+\"1\";\n }\n if(node.left!=null){node.left.code=node.left.parent.code+\"0\";list.addLast(node.left);}\n if(node.right!=null){node.right.code=node.right.parent.code+\"1\";list.addLast(node.right);}\n list.removeFirst();\n }\n String res=binstr+\"\\n\"+valuestr+codestr+\"\\n\";\n System.out.println(binstr);\n System.out.print(valuestr);\n System.out.println(codestr);\n return res;\n }", "private static void test4() {\n BinaryTreeNode node1 = new BinaryTreeNode(5);\n BinaryTreeNode node2 = new BinaryTreeNode(4);\n BinaryTreeNode node3 = new BinaryTreeNode(3);\n BinaryTreeNode node4 = new BinaryTreeNode(2);\n BinaryTreeNode node5 = new BinaryTreeNode(1);\n node1.left = node2;\n node2.left = node3;\n node3.left = node4;\n node4.left = node5;\n test(\"Test4\", node1, false);\n }", "public TernaryTree() {\n root = null;\n\n }", "public static TreeNode getSumTree2(){\n\t\tTreeNode t1 = new TreeNode(26);\n\t\tTreeNode t2 = new TreeNode(10);\n\t\tTreeNode t3 = new TreeNode(3);\n\t\tTreeNode t4 = new TreeNode(4);\n\t\tTreeNode t5 = new TreeNode(6);\n\t\tTreeNode t7 = new TreeNode(3);\n\t\tt1.left = t2;\n\t\tt1.right = t3;\n\t\tt2.left = t4;\n\t\tt2.right = t5;\n\t\tt3.right = t7;\n\t\treturn t1;\n\t}", "private static Node buildSmallerTree() {\n\t\tNode root = createNode(10);\n\t\troot.leftChild = createNode(25);\n\t\troot.rightChild = createNode(25);\n\t\troot.leftChild.leftChild = createNode(13);\n\t\troot.rightChild.rightChild = createNode(7);\n\t\troot.leftChild.rightChild = createNode(27);\n\t\t\n\t\treturn root;\n\t}", "private int root(int i){\n\t\twhile ( i != id[i].getVertexLabel())\n\t\t\ti = id[i].getVertexLabel();\n\t\treturn i;\n\t}", "private void process(TreeNode root){\n while(root!=null){\n dq.push(root);\n root= root.left;\n }\n }" ]
[ "0.57145226", "0.5502196", "0.5498679", "0.5436161", "0.542287", "0.54212195", "0.54060715", "0.5398688", "0.53869426", "0.5374502", "0.5348409", "0.5341991", "0.53412074", "0.5331431", "0.53106207", "0.530623", "0.5291299", "0.5286828", "0.52836883", "0.5261261", "0.5257846", "0.524307", "0.5231987", "0.52317315", "0.5228807", "0.52234834", "0.52234834", "0.5221168", "0.52047586", "0.5197651", "0.5188855", "0.51861364", "0.5184473", "0.5179847", "0.5166907", "0.51668316", "0.5163196", "0.5155497", "0.5131214", "0.511769", "0.5114185", "0.51106375", "0.5108057", "0.51055586", "0.510388", "0.50995326", "0.5089347", "0.5079041", "0.5077218", "0.5076334", "0.5075236", "0.50690323", "0.50661194", "0.5064974", "0.5058843", "0.505857", "0.5053403", "0.50531006", "0.50506455", "0.5049805", "0.50411093", "0.50376225", "0.5036109", "0.5035435", "0.50326467", "0.5028067", "0.5012857", "0.5009441", "0.5007378", "0.50067365", "0.50037336", "0.50033385", "0.5001299", "0.50012726", "0.50011855", "0.49982888", "0.4994545", "0.49942204", "0.49912566", "0.49881244", "0.49862695", "0.4985154", "0.49841502", "0.4982293", "0.49769482", "0.49707696", "0.49636796", "0.49620506", "0.49608287", "0.49578005", "0.49550018", "0.49535272", "0.4951988", "0.4951362", "0.49440935", "0.49412376", "0.4937096", "0.49357215", "0.49353683", "0.49348748", "0.4933286" ]
0.0
-1
This method was created because the above version returns it the wrong way round for certain operations
private String concatReverse(String orignalState, String concat){ if(orignalState.equals("e")){ return concat; } else{ return orignalState.concat(concat); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n protected Integer compute() {\n\n\n return null;\n }", "public abstract long mo9229aD();", "@Override\r\n\tpublic int getResult() {\n\t\treturn 0;\r\n\t}", "protected boolean func_70814_o() { return true; }", "public abstract int mo9754s();", "public double method_886() {\n return this.field_666;\n }", "public abstract BigInteger getUseed();", "public abstract long mo9746k();", "@Override\n public void func_104112_b() {\n \n }", "public Object getResult()\n/* */ {\n/* 129 */ Object resultToCheck = this.result;\n/* 130 */ return resultToCheck != RESULT_NONE ? resultToCheck : null;\n/* */ }", "public abstract long mo24409b();", "public abstract long mo13681c();", "Object findOperatorNeedCheck();", "protected abstract O getResult();", "@Override\n\tprotected Integer compute() {\n\t\treturn 3;\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public Float calc() {\n\treturn null;\n }", "public long method_4107() {\n return 0L;\n }", "long getUnknown2();", "public long method_4106() {\n return 0L;\n }", "@Override\n public Integer reduceInit() { return 0; }", "private float getLatestOvers() {\n // return 10.2 for simplicity\n return (float) 10.2;\n }", "public abstract long mo24410c();", "StackManipulation cached();", "public int method_209() {\r\n return 0;\r\n }", "public abstract Integer mo36212o();", "public int getValue()\r\n/* 21: */ {\r\n/* 22: 71 */ return this.value;\r\n/* 23: */ }", "private static int benchmarkedMethod() {\n return 3;\n }", "public BigDecimal getConvertedSplitQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ConvertedSplitQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}", "@Override\n public int getCost() {\n\treturn 0;\n }", "@Override\r\n\tpublic int single() {\n\t\treturn 0;\r\n\t}", "public boolean func_145773_az() { return true; }", "@Override\r\n\tpublic double alapterulet() {\n\t\treturn 0;\r\n\t}", "public int method_113() {\r\n return 0;\r\n }", "public int method_2436() {\r\n return 16;\r\n }", "protected float method_4216() {\r\n return 5.0F;\r\n }", "@Override\n\tpublic Long get() {\n\t\tlong f=f3+f2+f1;\n\t\tf3=f2;\n\t\tf2=f1;\n\t\tf1=f;\n\t\treturn f;\n\t}", "public abstract long mo20901UQ();", "public abstract long mo24412e();", "@Override\n\t\tpublic void reduce() {\n\t\t\t\n\t\t}", "public int getWorth() { return 1; }", "@Override public short getComplexity() {\n return 0;\n }", "public double method_890() {\n return this.field_668;\n }", "public BigDecimal getConvertedShrinkQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ConvertedShrinkQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}", "public double method_888() {\n return this.field_667;\n }", "public double method_872() {\n return this.field_658;\n }", "protected float l()\r\n/* 72: */ {\r\n/* 73: 84 */ return 0.0F;\r\n/* 74: */ }", "public Object getNoAccess() {\r\n return new Integer(3 / 0);\r\n }", "public class_1562 method_207() {\r\n return null;\r\n }", "public void method_4270() {}", "@Override\n\tpublic long javaMethodBaseWithLongLongRet() {\n\t\treturn 0;\n\t}", "public class_1048 method_2258() {\r\n return this.field_1859;\r\n }", "public abstract Integer gethourNeed();", "public long mo15024g() {\n throw new UnsupportedOperationException();\n }", "protected class_496 method_1608() {\n return this.field_936;\n }", "public abstract long mo9743h();", "public abstract long mo9750o();", "public abstract long mo9755t();", "private float testMethod() {\n {\n int lI0 = (-1456058746 << mI);\n mD = ((double)(int)(double) mD);\n for (int i0 = 56 - 1; i0 >= 0; i0--) {\n mArray[i0] &= (Boolean.logicalOr(((true ? ((boolean) new Boolean((mZ))) : mZ) || mArray[i0]), (mZ)));\n mF *= (mF * mF);\n if ((mZ ^ true)) {\n mF *= ((float)(int)(float) 267827331.0f);\n mZ ^= ((false & ((boolean) new Boolean(false))) | mZ);\n for (int i1 = 576 - 1; i1 >= 0; i1--) {\n mZ &= ((mArray[279]) | ((boolean) new Boolean(true)));\n mD -= (--mD);\n for (int i2 = 56 - 1; i2 >= 0; i2--) {\n mF /= (mF - mF);\n mI = (Math.min(((int) new Integer(mI)), (766538816 * (++mI))));\n mF += (mZ ? (mB.a()) : ((! mZ) ? -752042357.0f : (++mF)));\n mJ |= ((long) new Long((-2084191070L + (mJ | mJ))));\n lI0 |= ((int) new Integer(((int) new Integer(mI))));\n if (((boolean) new Boolean(false))) {\n mZ &= (mZ);\n mF *= (mF--);\n mD = (Double.POSITIVE_INFINITY);\n mF += ((float)(int)(float) (-2026938813.0f * 638401585.0f));\n mJ = (--mJ);\n for (int i3 = 56 - 1; i3 >= 0; i3--) {\n mI &= (- mI);\n mD = (--mD);\n mArray[426] = (mZ || false);\n mF -= (((this instanceof Main) ? mF : mF) + 976981405.0f);\n mZ &= ((mZ) & (this instanceof Main));\n }\n mZ ^= (Float.isFinite(-1975953895.0f));\n } else {\n mJ /= ((long) (Math.nextDown(-1519600008.0f)));\n mJ <<= (Math.round(1237681786.0));\n }\n }\n mArray[i0] &= (false || ((1256071300.0f != -353296391.0f) ? false : (mZ ^ mArray[i0])));\n mF *= (+ ((float) mD));\n for (int i2 = 0; i2 < 576; i2++) {\n mD *= ((double) lI0);\n lI0 = (lI0 & (Integer.MIN_VALUE));\n mF -= (--mF);\n }\n if ((this instanceof Main)) {\n mZ ^= ((boolean) new Boolean(true));\n } else {\n {\n int lI1 = (mZ ? (--lI0) : 1099574344);\n mJ >>= (Math.incrementExact(mJ));\n mJ = (~ -2103354070L);\n }\n }\n }\n } else {\n mJ *= (- ((long) new Long(479832084L)));\n mJ %= (Long.MAX_VALUE);\n mD /= (--mD);\n if ((mI > ((mBX.x()) << mI))) {\n {\n long lJ0 = (mJ--);\n mI >>>= (mBX.x());\n }\n mF = (+ 505094603.0f);\n mD *= (((boolean) new Boolean((! false))) ? mD : 1808773781.0);\n mI *= (Integer.MIN_VALUE);\n for (int i1 = 576 - 1; i1 >= 0; i1--) {\n if (((boolean) new Boolean(false))) {\n mD += ((double)(float)(double) -1051436901.0);\n } else {\n mF -= ((float)(int)(float) (Float.min(mF, (mF--))));\n }\n for (int i2 = 0; i2 < 576; i2++) {\n mJ -= ((long) new Long(-1968644857L));\n mJ ^= (+ (mC.s()));\n }\n }\n } else {\n mF -= ((- mF) + -2145489966.0f);\n }\n mD -= (mD++);\n mD = (949112777.0 * 1209996119.0);\n }\n mZ &= (Boolean.logicalAnd(true, ((mZ) & (((boolean) new Boolean(true)) && true))));\n }\n }\n return ((float) 964977619L);\n }", "@Override\r\n\tprotected Integer deriveLower() {\r\n\t return 0;\r\n\t}", "public abstract Integer mo36210m();", "Operations operations();", "public BigDecimal getConvertedProductQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ConvertedProductQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}", "private Rational computeDirectly() {\n BigInteger _26390k = _26390.multiply(BigInteger.valueOf(start));\n BigInteger _24591257856pk = _24591257856.pow(start);\n\n Rational sum = Rational.ZERO;\n\n for (int k = start; k < end; k++) {\n BigInteger num = Factorial.verified(BigInteger.valueOf(k << 2));\n num = num.multiply(_1103.add(_26390k));\n\n BigInteger den = Factorial.verified(BigInteger.valueOf(k)).pow(4);\n den = den.multiply(_24591257856pk);\n\n _26390k = _26390k.add(_26390);\n _24591257856pk = _24591257856pk.multiply(_24591257856);\n\n sum = sum.add(Rational.valueOf(num, den).dropTo(context));\n sum = sum.dropTo(context);\n }\n return sum;\n }", "public int getOperacion()\r\n/* 22: */ {\r\n/* 23:45 */ return this.operacion;\r\n/* 24: */ }", "public double result() {return 0;}", "public long calHurt() {\n/* 82 */ return 0L;\n/* */ }", "public int getTakeSpace() {\n return 0;\n }", "protected abstract SoyValue compute();", "public double method_882() {\n return this.field_663;\n }", "int getResultValue();", "int getResultValue();", "protected Object calcRightNullRow()\n {\n return null;\n }", "@Override\n\tpublic double javaMethodBaseWithDoubleRet() {\n\t\treturn 0;\n\t}", "public abstract long mo131997a() throws IOException;", "java.lang.String getResult();", "public Double method_892() {\n return this.field_669;\n }", "public int getMobCap()\r\n/* 24: */ {\r\n/* 25:41 */ return this.f;\r\n/* 26: */ }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public boolean method_218() {\r\n return false;\r\n }", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "private static byte[] m17790a(Bitmap bitmap) {\n int i;\n int i2;\n int i3;\n int width = bitmap.getWidth();\n int height = bitmap.getHeight();\n OutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n for (i = 0; i < 32; i++) {\n byteArrayOutputStream.write(0);\n }\n int[] iArr = new int[(width - 2)];\n bitmap.getPixels(iArr, 0, width, 1, 0, width - 2, 1);\n Object obj = iArr[0] == -16777216 ? 1 : null;\n Object obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n int length = iArr.length;\n width = 0;\n int i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n int i5 = i4;\n int i6 = i5 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i3 = i - 1;\n } else {\n i3 = i;\n }\n iArr = new int[(height - 2)];\n bitmap.getPixels(iArr, 0, 1, 0, 1, 1, height - 2);\n obj = iArr[0] == -16777216 ? 1 : null;\n obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n length = iArr.length;\n width = 0;\n i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n i6 = i4 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i--;\n }\n for (i6 = 0; i6 < i3 * i; i6++) {\n C5225r.m17788a(byteArrayOutputStream, 1);\n }\n byte[] toByteArray = byteArrayOutputStream.toByteArray();\n toByteArray[0] = (byte) 1;\n toByteArray[1] = (byte) i5;\n toByteArray[2] = (byte) i4;\n toByteArray[3] = (byte) (i * i3);\n C5225r.m17787a(bitmap, toByteArray);\n return toByteArray;\n }", "synchronized byte getCurrentValueLo()\n {\n return (byte)getCurrentValue();\n }", "int method20()\n {\n return 579190;\n }", "public boolean method_210() {\r\n return false;\r\n }", "private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }", "@Override\n public double getCost() {\n\t return 13;\n }", "public double method_874() {\n return this.field_659;\n }", "public boolean method_2434() {\r\n return false;\r\n }", "public abstract long mo13679a();", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "protected Item func_146068_u() { return Item.func_150899_d(0); }", "protected void method_4157() {\r\n super.method_4157();\r\n this.method_4211(class_1840.field_9390).method_390(200.0D);\r\n }", "long getQuantite();", "public int mo1534c() {\n return 2;\n }", "@Override\n\tpublic long javaMethodBaseWithLongRet() {\n\t\treturn 0;\n\t}", "public abstract int selfExplodingKittenDrawn();", "public double method_898() {\n return this.field_672;\n }", "public abstract int mo9797a();" ]
[ "0.58334404", "0.55837655", "0.53527653", "0.5307468", "0.5137638", "0.51033616", "0.5080727", "0.50796235", "0.50743103", "0.5060139", "0.50422287", "0.501356", "0.49839452", "0.49652708", "0.49621218", "0.49614185", "0.4960366", "0.49182707", "0.49142662", "0.49108392", "0.49091923", "0.48766756", "0.48762336", "0.48749292", "0.48602673", "0.48568478", "0.48554468", "0.48530754", "0.48432577", "0.48416227", "0.48377442", "0.4835271", "0.48350564", "0.48313046", "0.48291335", "0.48212057", "0.48087806", "0.48070663", "0.4805475", "0.48045576", "0.48044437", "0.48014024", "0.47988665", "0.47988474", "0.47978625", "0.47950175", "0.479239", "0.4782148", "0.4779613", "0.4774113", "0.47646058", "0.4759917", "0.47526586", "0.47524706", "0.4742868", "0.4742127", "0.4740489", "0.47388348", "0.47373036", "0.47365355", "0.47344732", "0.47339287", "0.47294816", "0.4728902", "0.47266984", "0.47214296", "0.47214246", "0.4717334", "0.47156435", "0.47120908", "0.47065783", "0.47029108", "0.47021276", "0.47021276", "0.46954763", "0.46952257", "0.46881598", "0.46877128", "0.4687271", "0.46840695", "0.468359", "0.46813563", "0.46780354", "0.46772623", "0.4674784", "0.46747214", "0.467399", "0.46696457", "0.46685046", "0.4667858", "0.4660271", "0.46475798", "0.46442983", "0.4636048", "0.4635494", "0.4634811", "0.4634563", "0.4629262", "0.46285096", "0.4627065", "0.4626481" ]
0.0
-1
This method was created because the above version returns it the wrong way round for certain operations
private String concatReverse(String orignalState, char concat){ String stringChar = ""; stringChar += concat; if(orignalState.equals("e")){ return stringChar; } else{ return orignalState.concat(stringChar); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n protected Integer compute() {\n\n\n return null;\n }", "public abstract long mo9229aD();", "@Override\r\n\tpublic int getResult() {\n\t\treturn 0;\r\n\t}", "protected boolean func_70814_o() { return true; }", "public abstract int mo9754s();", "public double method_886() {\n return this.field_666;\n }", "public abstract BigInteger getUseed();", "public abstract long mo9746k();", "@Override\n public void func_104112_b() {\n \n }", "public Object getResult()\n/* */ {\n/* 129 */ Object resultToCheck = this.result;\n/* 130 */ return resultToCheck != RESULT_NONE ? resultToCheck : null;\n/* */ }", "public abstract long mo24409b();", "public abstract long mo13681c();", "Object findOperatorNeedCheck();", "@Override\n\tprotected Integer compute() {\n\t\treturn 3;\n\t}", "protected abstract O getResult();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public Float calc() {\n\treturn null;\n }", "public long method_4107() {\n return 0L;\n }", "long getUnknown2();", "public long method_4106() {\n return 0L;\n }", "@Override\n public Integer reduceInit() { return 0; }", "private float getLatestOvers() {\n // return 10.2 for simplicity\n return (float) 10.2;\n }", "public abstract long mo24410c();", "StackManipulation cached();", "public int method_209() {\r\n return 0;\r\n }", "public abstract Integer mo36212o();", "private static int benchmarkedMethod() {\n return 3;\n }", "public int getValue()\r\n/* 21: */ {\r\n/* 22: 71 */ return this.value;\r\n/* 23: */ }", "public BigDecimal getConvertedSplitQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ConvertedSplitQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}", "@Override\n public int getCost() {\n\treturn 0;\n }", "@Override\r\n\tpublic int single() {\n\t\treturn 0;\r\n\t}", "public boolean func_145773_az() { return true; }", "@Override\r\n\tpublic double alapterulet() {\n\t\treturn 0;\r\n\t}", "public int method_113() {\r\n return 0;\r\n }", "public int method_2436() {\r\n return 16;\r\n }", "protected float method_4216() {\r\n return 5.0F;\r\n }", "@Override\n\tpublic Long get() {\n\t\tlong f=f3+f2+f1;\n\t\tf3=f2;\n\t\tf2=f1;\n\t\tf1=f;\n\t\treturn f;\n\t}", "public abstract long mo24412e();", "public abstract long mo20901UQ();", "@Override\n\t\tpublic void reduce() {\n\t\t\t\n\t\t}", "@Override public short getComplexity() {\n return 0;\n }", "public int getWorth() { return 1; }", "public double method_890() {\n return this.field_668;\n }", "public BigDecimal getConvertedShrinkQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ConvertedShrinkQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}", "public double method_888() {\n return this.field_667;\n }", "public double method_872() {\n return this.field_658;\n }", "protected float l()\r\n/* 72: */ {\r\n/* 73: 84 */ return 0.0F;\r\n/* 74: */ }", "public Object getNoAccess() {\r\n return new Integer(3 / 0);\r\n }", "public class_1562 method_207() {\r\n return null;\r\n }", "public void method_4270() {}", "@Override\n\tpublic long javaMethodBaseWithLongLongRet() {\n\t\treturn 0;\n\t}", "public class_1048 method_2258() {\r\n return this.field_1859;\r\n }", "public abstract Integer gethourNeed();", "public long mo15024g() {\n throw new UnsupportedOperationException();\n }", "protected class_496 method_1608() {\n return this.field_936;\n }", "public abstract long mo9743h();", "public abstract long mo9750o();", "public abstract long mo9755t();", "private float testMethod() {\n {\n int lI0 = (-1456058746 << mI);\n mD = ((double)(int)(double) mD);\n for (int i0 = 56 - 1; i0 >= 0; i0--) {\n mArray[i0] &= (Boolean.logicalOr(((true ? ((boolean) new Boolean((mZ))) : mZ) || mArray[i0]), (mZ)));\n mF *= (mF * mF);\n if ((mZ ^ true)) {\n mF *= ((float)(int)(float) 267827331.0f);\n mZ ^= ((false & ((boolean) new Boolean(false))) | mZ);\n for (int i1 = 576 - 1; i1 >= 0; i1--) {\n mZ &= ((mArray[279]) | ((boolean) new Boolean(true)));\n mD -= (--mD);\n for (int i2 = 56 - 1; i2 >= 0; i2--) {\n mF /= (mF - mF);\n mI = (Math.min(((int) new Integer(mI)), (766538816 * (++mI))));\n mF += (mZ ? (mB.a()) : ((! mZ) ? -752042357.0f : (++mF)));\n mJ |= ((long) new Long((-2084191070L + (mJ | mJ))));\n lI0 |= ((int) new Integer(((int) new Integer(mI))));\n if (((boolean) new Boolean(false))) {\n mZ &= (mZ);\n mF *= (mF--);\n mD = (Double.POSITIVE_INFINITY);\n mF += ((float)(int)(float) (-2026938813.0f * 638401585.0f));\n mJ = (--mJ);\n for (int i3 = 56 - 1; i3 >= 0; i3--) {\n mI &= (- mI);\n mD = (--mD);\n mArray[426] = (mZ || false);\n mF -= (((this instanceof Main) ? mF : mF) + 976981405.0f);\n mZ &= ((mZ) & (this instanceof Main));\n }\n mZ ^= (Float.isFinite(-1975953895.0f));\n } else {\n mJ /= ((long) (Math.nextDown(-1519600008.0f)));\n mJ <<= (Math.round(1237681786.0));\n }\n }\n mArray[i0] &= (false || ((1256071300.0f != -353296391.0f) ? false : (mZ ^ mArray[i0])));\n mF *= (+ ((float) mD));\n for (int i2 = 0; i2 < 576; i2++) {\n mD *= ((double) lI0);\n lI0 = (lI0 & (Integer.MIN_VALUE));\n mF -= (--mF);\n }\n if ((this instanceof Main)) {\n mZ ^= ((boolean) new Boolean(true));\n } else {\n {\n int lI1 = (mZ ? (--lI0) : 1099574344);\n mJ >>= (Math.incrementExact(mJ));\n mJ = (~ -2103354070L);\n }\n }\n }\n } else {\n mJ *= (- ((long) new Long(479832084L)));\n mJ %= (Long.MAX_VALUE);\n mD /= (--mD);\n if ((mI > ((mBX.x()) << mI))) {\n {\n long lJ0 = (mJ--);\n mI >>>= (mBX.x());\n }\n mF = (+ 505094603.0f);\n mD *= (((boolean) new Boolean((! false))) ? mD : 1808773781.0);\n mI *= (Integer.MIN_VALUE);\n for (int i1 = 576 - 1; i1 >= 0; i1--) {\n if (((boolean) new Boolean(false))) {\n mD += ((double)(float)(double) -1051436901.0);\n } else {\n mF -= ((float)(int)(float) (Float.min(mF, (mF--))));\n }\n for (int i2 = 0; i2 < 576; i2++) {\n mJ -= ((long) new Long(-1968644857L));\n mJ ^= (+ (mC.s()));\n }\n }\n } else {\n mF -= ((- mF) + -2145489966.0f);\n }\n mD -= (mD++);\n mD = (949112777.0 * 1209996119.0);\n }\n mZ &= (Boolean.logicalAnd(true, ((mZ) & (((boolean) new Boolean(true)) && true))));\n }\n }\n return ((float) 964977619L);\n }", "@Override\r\n\tprotected Integer deriveLower() {\r\n\t return 0;\r\n\t}", "Operations operations();", "public abstract Integer mo36210m();", "public BigDecimal getConvertedProductQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ConvertedProductQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}", "public int getOperacion()\r\n/* 22: */ {\r\n/* 23:45 */ return this.operacion;\r\n/* 24: */ }", "private Rational computeDirectly() {\n BigInteger _26390k = _26390.multiply(BigInteger.valueOf(start));\n BigInteger _24591257856pk = _24591257856.pow(start);\n\n Rational sum = Rational.ZERO;\n\n for (int k = start; k < end; k++) {\n BigInteger num = Factorial.verified(BigInteger.valueOf(k << 2));\n num = num.multiply(_1103.add(_26390k));\n\n BigInteger den = Factorial.verified(BigInteger.valueOf(k)).pow(4);\n den = den.multiply(_24591257856pk);\n\n _26390k = _26390k.add(_26390);\n _24591257856pk = _24591257856pk.multiply(_24591257856);\n\n sum = sum.add(Rational.valueOf(num, den).dropTo(context));\n sum = sum.dropTo(context);\n }\n return sum;\n }", "public double result() {return 0;}", "public long calHurt() {\n/* 82 */ return 0L;\n/* */ }", "public int getTakeSpace() {\n return 0;\n }", "protected abstract SoyValue compute();", "public double method_882() {\n return this.field_663;\n }", "int getResultValue();", "int getResultValue();", "protected Object calcRightNullRow()\n {\n return null;\n }", "@Override\n\tpublic double javaMethodBaseWithDoubleRet() {\n\t\treturn 0;\n\t}", "public abstract long mo131997a() throws IOException;", "java.lang.String getResult();", "public Double method_892() {\n return this.field_669;\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public int getMobCap()\r\n/* 24: */ {\r\n/* 25:41 */ return this.f;\r\n/* 26: */ }", "public boolean method_218() {\r\n return false;\r\n }", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "private static byte[] m17790a(Bitmap bitmap) {\n int i;\n int i2;\n int i3;\n int width = bitmap.getWidth();\n int height = bitmap.getHeight();\n OutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n for (i = 0; i < 32; i++) {\n byteArrayOutputStream.write(0);\n }\n int[] iArr = new int[(width - 2)];\n bitmap.getPixels(iArr, 0, width, 1, 0, width - 2, 1);\n Object obj = iArr[0] == -16777216 ? 1 : null;\n Object obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n int length = iArr.length;\n width = 0;\n int i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n int i5 = i4;\n int i6 = i5 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i3 = i - 1;\n } else {\n i3 = i;\n }\n iArr = new int[(height - 2)];\n bitmap.getPixels(iArr, 0, 1, 0, 1, 1, height - 2);\n obj = iArr[0] == -16777216 ? 1 : null;\n obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n length = iArr.length;\n width = 0;\n i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n i6 = i4 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i--;\n }\n for (i6 = 0; i6 < i3 * i; i6++) {\n C5225r.m17788a(byteArrayOutputStream, 1);\n }\n byte[] toByteArray = byteArrayOutputStream.toByteArray();\n toByteArray[0] = (byte) 1;\n toByteArray[1] = (byte) i5;\n toByteArray[2] = (byte) i4;\n toByteArray[3] = (byte) (i * i3);\n C5225r.m17787a(bitmap, toByteArray);\n return toByteArray;\n }", "public boolean method_210() {\r\n return false;\r\n }", "int method20()\n {\n return 579190;\n }", "synchronized byte getCurrentValueLo()\n {\n return (byte)getCurrentValue();\n }", "private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }", "@Override\n public double getCost() {\n\t return 13;\n }", "public double method_874() {\n return this.field_659;\n }", "public boolean method_2434() {\r\n return false;\r\n }", "public abstract long mo13679a();", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "protected Item func_146068_u() { return Item.func_150899_d(0); }", "protected void method_4157() {\r\n super.method_4157();\r\n this.method_4211(class_1840.field_9390).method_390(200.0D);\r\n }", "public int mo1534c() {\n return 2;\n }", "long getQuantite();", "public abstract int selfExplodingKittenDrawn();", "@Override\n\tpublic long javaMethodBaseWithLongRet() {\n\t\treturn 0;\n\t}", "public static String solution() {\r\n\t\treturn \"73162890\";\r\n\t}", "public abstract int mo9797a();" ]
[ "0.58330387", "0.5584521", "0.535216", "0.5306416", "0.5137288", "0.51054376", "0.5081359", "0.50786555", "0.5072553", "0.50588167", "0.50447345", "0.5012034", "0.498294", "0.49649078", "0.49612778", "0.49596012", "0.49591622", "0.49202543", "0.49138168", "0.49108902", "0.4907694", "0.4876848", "0.48767966", "0.48748305", "0.48598692", "0.4858744", "0.4856972", "0.48518586", "0.48425722", "0.48420876", "0.48351207", "0.48350063", "0.48336175", "0.4831192", "0.48282385", "0.48228794", "0.4808981", "0.48069617", "0.48033407", "0.48030293", "0.48029745", "0.48015586", "0.47990113", "0.47981536", "0.47968972", "0.47924224", "0.4791175", "0.47807473", "0.4779569", "0.47725627", "0.47651216", "0.47620028", "0.4751668", "0.47515982", "0.4741755", "0.47408855", "0.47406876", "0.47375375", "0.4736018", "0.47353387", "0.47349644", "0.4733692", "0.4731327", "0.4728277", "0.47242093", "0.47213563", "0.47201836", "0.47153836", "0.47146592", "0.47123238", "0.47046876", "0.47020644", "0.46997005", "0.46997005", "0.4694777", "0.4693185", "0.4687194", "0.46868074", "0.46854866", "0.46843666", "0.4683838", "0.4683521", "0.46788657", "0.46777156", "0.46758944", "0.4675281", "0.46733716", "0.46706492", "0.46683496", "0.46662843", "0.46620658", "0.4646384", "0.46444148", "0.46360135", "0.4635636", "0.46346205", "0.46344504", "0.46289", "0.46284732", "0.4626718", "0.46262497" ]
0.0
-1
44 is the size because its the amount of notes the amount of beat the amount of dot, 114 2 currently removed dot
public static ArrayList genStates(){ ArrayList states = new ArrayList(44); List<String> notes = new ArrayList<String>(Arrays.asList("A","B","C","D","E","F","G","H","I","J","K")); List<String> beat = new ArrayList<String>(Arrays.asList("1","2","3","4")); //List<String> dot = new ArrayList<String>(Arrays.asList("1","0")); for(int n = 0; n<=10; n++){ for(int b = 0; b<=3; b++){ //for(int d = 0; d<=1; d++){ String state = ""; state += notes.get(n); state += beat.get(b); //state += dot.get(d); states.add(state); //} } } return states; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int totalSize_infos_noise() {\n return (48 / 8);\n }", "@Override\n\tpublic int getTotalDots() {\n\t\treturn 0;\n\t}", "public static int elementSize_infos_noise() {\n return (16 / 8);\n }", "public static int totalSizeBits_infos_noise() {\n return 48;\n }", "public double drawLength() { return drawLength; }", "public double getWidth() {\n return this.size * 2.0; \n }", "@Override\r\n\tpublic int size() {\n\t\treturn 27;\r\n\t}", "@Override\n\tpublic int computeSize() {\n\t\treturn 36;\n\t}", "public static int elementSizeBits_infos_noise() {\n return 16;\n }", "public double numberDots(LocationSet dot){\n\t\treturn -(dot.size()*10)/250;\n\t}", "double getSize();", "@Override\r\n protected int sizeOf(String key, Bitmap b) {\n return b.getHeight() * b.getWidth() * 4;\r\n }", "public int getIconHeight()\r\n/* 55: */ {\r\n/* 56:100 */ return SIZE;\r\n/* 57: */ }", "private int calcSize(int size)\n {\n return (((size - 1) / 9) + 1) * 9;\n }", "protected int getElementSize () {\n return 1;\n }", "public static float getSize() {\n return STAFF_LEN + FLAG_DEL_Y;\n }", "@Override\n public double getTrackWidth() {\n return 0.79872077;\n }", "public int getDotsNumber ()\r\n {\r\n return dotsNumber;\r\n }", "int getTribeSize();", "public int getThickness ()\r\n {\r\n return glyph.getBounds().height;\r\n }", "private static int getSize(int type) {\n switch (type) {\n case 0:\n return 65535;\n case 1:\n return 78513;\n case 2:\n return 101597;//getModelCount();\n case 3:\n return 3696;\n case 4:\n return 4193;\n case 5:\n return 6827;\n case 6:\n return 8487;\n case 7:\n return 645;//midiIndices.length;\n /*case 8:\n return 0;//getAnimCount();\n case 9:\n return 0;//getMapAmount();\n case 10:\n return 34026;\n case 11:\n return 3159;\n case 12:\n return 1956;*/\n }\n return 0;\n }", "public double getSize() \n {\n return size;\n }", "@Override\r\n\tpublic String getSize() {\n\t\treturn \"A4\";\r\n\t}", "protected String sizeString()\n {\n return (\" (\" + map.getSizeX() + \" x \" + map.getSizeY() + \")\");\n }", "public float sizeMultiplier();", "public static String getLoadingDotsSize(){\n DriverManager.waitForElement(Constans.LOADING_DOTS_LOCATOR);\n return DriverManager.driver.findElement(Constans.LOADING_DOTS_LOCATOR).getSize().toString();\n }", "public short getFontHeightInPoints()\n {\n return ( short ) (font.getFontHeight() / 20);\n }", "@Override\n\tpublic void measures() {\n\t\t\n\t\tsetTempo(240);\n\t\t\n\t\tkey = \"G\";\n\t\t\n\t\tmeasure(0);\n\t\t\n\t\taddNote(\"D5q\",A,T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(1);\n\t\t\n\t\taddNotes(\"G5q G5i A5i G5i F5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"B3q G4q\",B);\n\t\t\n\t\tmeasure(2);\n\t\t\n\t\taddNotes(\"E5q E5q E5q\",T);\n\t\t\n\t\taddNotes(\"C4h+E4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(3);\n\t\t\n\t\taddNotes(\"A5q A5i B5i A5i G5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"C#4q A4q\",B);\n\t\t\n\t\tmeasure(4);\n\t\t\n\t\taddNotes(\"F5q D5q D5q\",T);\n\t\t\n\t\taddNotes(\"D4h+F4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(5);\n\t\t\n\t\taddNotes(\"B5q B5i C6i B5i A5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"G4q D5q\",B);\n\t\t\n\t\tmeasure(6);\n\t\t\n\t\taddNotes(\"G5q E5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"C5h+E5h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(7);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(8);\n\t\t\n\t\taddNotes(\"G5h D5q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(9);\n\t\t\n\t\taddNotes(\"G5q G5q G5q\",T);\n\t\t\n\t\taddNote(\"B4h.\",A,B);\n\t\t\n\t\tmeasure(10);\n\t\t\n\t\taddNotes(\"F5h F5q\",T);\n\t\t\n\t\taddNotes(\"A4h A4q\",B);\n\t\t\n\t\tmeasure(11);\n\t\t\n\t\taddNotes(\"G5q F5q E5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(12);\n\t\t\n\t\taddNotes(\"D5h A5q\",T);\n\t\t\n\t\taddNotes(\"F4h A4q\",B);\n\t\t\n\t\tmeasure(13);\n\t\t\n\t\taddNotes(\"B5q A5q G5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(14);\n\t\t\n\t\taddNotes(\"D6q D5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"D5q D4q\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(15);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(16);\n\t\t\n\t\taddNote(\"G5h\",A,T);\n\t\taddRest(\"q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(17);\n\t}", "protected int bytesPerLine() {\n return (48);\n }", "protected int bytesPerLine() {\n return (48);\n }", "@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}", "public void copiedMeasureDecoder(Integer chordNote,Integer[]previousChord, Integer[] playedChord){\n /* int c=0;\n int a=0;\n int b=0;\n int x0=0;\n int x1=0;*/\n int d1=0;\n int d2=0;\n\n\n\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==chordNote)\n d1=i;\n }\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==melody.get(melodyCounter))\n d2=i;\n /* if(melodyNotes[i]==playedChord[1])\n a=i;\n if(melodyNotes[i]==previousChord[1])\n b=i;*/\n }\n /*if(a<b){\n x0=a-b;\n x1=7+x1;\n }else{\n x0=a-b;\n x1=x0-7;\n }*/\n if(d1>d2) {\n binaryOutput += \"0\";\n }else {\n binaryOutput += \"1\";\n }\n for(int i = 0;i<4;i++){\n for(int j =0; j < rhytm.get(beatCounter).length;j++){\n if(rhytm.get(beatCounter)[j]!=null)\n if ((!rhytm.get(beatCounter)[j].equals(\"Ri\")) && (!rhytm.get(beatCounter)[j].equals(\"Rs\"))) {\n melodyCounter++;\n }\n }\n beatCounter++;\n }\n\n\n}", "@Override\n public int getSize() {\n\treturn 0;\n }", "public double discSize() {\n return discSize;\n }", "public int taille() {\n\t\treturn getSize();\n\t}", "private void m13085a() {\n DisplayMetrics displayMetrics = getResources().getDisplayMetrics();\n this.f12281d = new Paint();\n this.f12281d.setColor(this.f12278a);\n this.f12281d.setAntiAlias(true);\n this.f12281d.setTextSize(displayMetrics.scaledDensity * ((float) this.f12279b));\n }", "public int getPatchSize() {\n return patchSize;\n }", "@Override\r\n\tprotected Point getInitialSize() {\r\n\t\treturn new Point(320, 204);\r\n\t}", "@Override\n\tpublic void showSize() {\n\t\tSystem.out.print(\"This pen is small.\");\n\t}", "public double getPixelSize() {\n\t\treturn 0;\n\t}", "public float getThickness(){\n return thickness;\n }", "@Override\n\tpublic String paperSize() {\n\t\treturn \"B5ֽ\";\n\t}", "protected float measurePrefix() {\n return measureLineNumber() + mDividerMargin * 2 + mDividerWidth;\n }", "private void checkPaintMeasures() {\r\n\t\t\r\n\t\t//Check from change\r\n\t\tint sizeNow = fontSize;\r\n\t\tif(sizeNow == sizeThen)return;\r\n\t\tsizeThen = sizeNow;\r\n\t\t\r\n\t\t//Set units\r\n\t\tmarkWidth = (double) sizeNow / 15;\r\n\t\tsizePaintLength = p.textLength(text, surface, sizeNow, bold, italic);\r\n\t\tif (viewPaintLength != viewPaintLength) viewPaintLength = sizePaintLength;\r\n\t}", "public float getSizeY(){return sy;}", "public int getIconWidth()\r\n/* 50: */ {\r\n/* 51: 99 */ return SIZE;\r\n/* 52: */ }", "public int getLength ()\r\n {\r\n return glyph.getBounds().width;\r\n }", "public float getSize()\n {\n return size;\n }", "public static int totalSize_infos_metadata() {\n return (16 / 8);\n }", "@Override\n public int getSize() {\n return 1;\n }", "private void loveYourz()\n {\n Song loveYourz = new Song();\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS3, 0));\n loveYourz.add(new Note(noteC2, 0));\n loveYourz.add(new Note(noteC1, WHOLE_NOTE/2));\n\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS3, 0));\n loveYourz.add(new Note(noteC2, 0));\n loveYourz.add(new Note(noteC1, WHOLE_NOTE/4));\n\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS2, 0));\n loveYourz.add(new Note(noteDS1, WHOLE_NOTE/4));\n\n\n loveYourz.add(new Note(noteG4, 0));\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteC4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/2));\n\n loveYourz.add(new Note(noteG4, 0));\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteC4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/8));\n\n loveYourz.add(new Note(noteF4, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/8));\n\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/8));\n\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/8));\n\n\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS3, 0));\n loveYourz.add(new Note(noteC2, 0));\n loveYourz.add(new Note(noteC1, WHOLE_NOTE/2));\n\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS3, 0));\n loveYourz.add(new Note(noteC2, 0));\n loveYourz.add(new Note(noteC1, WHOLE_NOTE/4));\n\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS2, 0));\n loveYourz.add(new Note(noteDS1, WHOLE_NOTE/4));\n\n\n loveYourz.add(new Note(noteG4, 0));\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteC4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/2));\n\n loveYourz.add(new Note(noteG4, 0));\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteC4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/4));\n\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/4));\n playSong(loveYourz);\n playSong(loveYourz);\n }", "public double getNewickLength()\n {\n return newicklength; \n }", "public int getSize() {\n\t\treturn width + length;\n\t}", "@Override\n\t\t\tpublic void onStopTrackingTouch(SeekBar seekBar) {\n\t\t\t\tint thickness = min_Thickness + (step_Thickness*seekBar.getProgress());\n\t\t\t\tt_Thickness.setTextSize(thickness);\n\t\t Toast.makeText(getApplicationContext(), String.valueOf(thickness),Toast.LENGTH_SHORT).show();\n\t\t \n\t\t seismicImage.setThickness(thickness);\n\t\t\t}", "@FXML\r\n private void updateNumDotsLabel() {\r\n numDotsLabel.setText(\"Number of Dots: \" + picture.getNumDots());\r\n }", "private void updateDimensions() {\r\n width = gui.getWidth();\r\n height = gui.getHeight();\r\n yLabelsMargin = (int) gui.getLabelWidth(Integer.toString(((int) maximumDB / 10) * 10), true) + 2;\r\n if (track != null)\r\n scaleXpx = ((float) width - yLabelsMargin) / track.getBufferCapacity();\r\n else\r\n scaleXpx = 1;\r\n scaleYpx = (float) ((height - 1) / (maximumDB - minimumDB));\r\n if (scaleYpx == 0)\r\n scaleYpx = 1;\r\n }", "public int getIconWidth()\r\n/* 154: */ {\r\n/* 155:194 */ return SIZE;\r\n/* 156: */ }", "private static void test3() {\n for (int noteNumber = 0; noteNumber < 128; noteNumber++) {\n double frequency = 440 * Math.pow(2, (noteNumber - 69) / 12.0);\n \n boolean clipMax = false;\n int block = 0;\n \n if (frequency <= 48.503) {\n block = 0;\n }\n else if (frequency <= 97.006) {\n block = 1;\n }\n else if (frequency <= 194.013) {\n block = 2;\n }\n else if (frequency <= 388.026) {\n block = 3;\n }\n else if (frequency <= 776.053) {\n block = 4;\n }\n else if (frequency <= 1552.107) {\n block = 5;\n }\n else if (frequency <= 3104.215) {\n block = 6;\n }\n else if (frequency <= 6208.431) {\n block = 7;\n \n }\n else {\n //throw new RuntimeException(\"invalid frequency !\");\n //System.out.println(\"unsupported frequency \" + frequency + \" !\");\n //System.exit(-1);\n block = 7;\n clipMax = true;\n }\n \n double f_num = frequency * Math.pow(2, (20 - block)) / 49716;\n if (clipMax) {\n f_num = 1023;\n }\n String f_num_hex = \"0000\" + Integer.toHexString((int) f_num);\n f_num_hex = f_num_hex.substring(f_num_hex.length() - 4, f_num_hex.length());\n //System.out.println(noteNumber + \" = \" + frequency + \" ---> block: \" + block + \" f_num_hex = \" + f_num_hex);\n //System.out.println(noteNumber + \" = \" + frequency);\n \n String block_hex = \"000\" + Integer.toHexString(block);\n block_hex = block_hex.substring(block_hex.length() - 3, block_hex.length());\n\n if (noteNumber % 4 == 0) {\n System.out.print(\"\\r\\n\\t\\t\\tdb \");\n }\n System.out.print(block_hex + \"h, 000h, 0\" + f_num_hex.subSequence(2, 4) + \"h, 0\" + f_num_hex.substring(0, 2) + \"h\" + ((noteNumber % 4 != 3) ? \", \" : \"\"));\n \n }\n System.out.println(\"\");\n }", "public short getFontHeightInPoints() {\n\t\treturn fontHeightInPoints;\n\t}", "public float getSizeX(){return sx;}", "public float getPointSize()\n {\n return myPointSize;\n }", "public int getFootprintLength() {\n return 1;\n }", "@Override\n public int getSize() {\n return 64;\n }", "@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }", "public int getPatchNameLength() \n {\n return 16; \n }", "public double getSize()\n\t{\n\t\treturn size;\n\t}", "public void addLength() {\n\t\tBodyPart b1 = snake.getBodyPart(snake.getSize()-1), b2 = snake.getBodyPart(snake.getSize()-2);\n\t\tif(b1.getX() > b2.getX())\n\t\t\tsnake.addBodyPart(b1.getX()+GameObject.SIZE, b1.getY());\n\t\telse if(b1.getX() < b2.getX())\n\t\t\tsnake.addBodyPart(b1.getX()-GameObject.SIZE, b1.getY());\n\t\telse if(b1.getY() >= b2.getY())\n\t\t\tsnake.addBodyPart(b1.getX(), b1.getY()+GameObject.SIZE);\n\t\telse if(b1.getY() >= b2.getY())\n\t\t\tsnake.addBodyPart(b1.getX(), b1.getY()-GameObject.SIZE);\n\t}", "public int numberOfBlocksToRemove() {\r\n return 105;\r\n }", "public static int size_infos_valid_noise_samples() {\n return (8 / 8);\n }", "public static int numElements_infos_noise() {\n return 3;\n }", "public int getSnakeStartLength();", "@Override\r\n\tprotected Point getInitialSize() {\r\n\t\treturn new Point(706, 307);\r\n\t}", "public float getSize() {\n return size;\n }", "public int grHeight() { return height; }", "public int getIconHeight()\r\n/* 159: */ {\r\n/* 160:195 */ return SIZE;\r\n/* 161: */ }", "public static int elementSize_infos_metadata() {\n return (8 / 8);\n }", "godot.wire.Wire.Vector2 getSize();", "private String countFileSize(long length) {\n\n if (length < UNIT) {\n return length + \" B\";\n }\n int exp = (int) (Math.log(length) / Math.log(UNIT));\n String pre = \"KMGTPE\".charAt(exp - 1) + \"i\";\n\n return String.format(\"%.1f %sB\", length / Math.pow(UNIT, exp), pre);\n\n }", "public static void determineSizes(){\n maxPieceSize = 65536*8;\n if(pieceSize > maxPieceSize){\n \t//make pieceSize equal to the max\n \tpieceSize = maxPieceSize - 1; //minus one because we want a buffer space\n }\n\n windowSize = fileSize/10 ;\n\t}", "int getCurrentSize();", "int getTickLength();", "@Override\n public int estimateSize() {\n return 8 + 8 + 1 + 32 + 64;\n }", "@Override\n\tpublic int getMaxSizeZ()\n\t{\n\t\treturn 200;\n\t}", "public long estimateSize() {\n/* 1448 */ return this.est;\n/* */ }", "private void drawVolumes(Graphics g , int contentHeight) {\n //\n }", "public final /* synthetic */ void mo99828e() {\n int measuredWidth = this.f104232v.getMeasuredWidth();\n this.f104233w.setMaxWidth((C23482j.m77098b(this) - (measuredWidth * 2)) - ((int) C9738o.m28708b((Context) this, 60.0f)));\n this.f104232v.setVisibility(8);\n this.f104232v.setTextSize(1, 17.0f);\n }", "@Override\r\n\tpublic int getWidth() {\n\t\treturn 0;\r\n\t}", "@FXML\r\n void btnSizeMiuns(ActionEvent event) {\r\n \tdrawSize--;\r\n \tif(drawSize <= 1){\r\n \t\tdrawSize = 1;\r\n \t}\r\n }", "@Override\n\tpublic double getSize() {\n\t\treturn Math.sqrt(getMySize())/2;\n\t}", "@Override\n public int width()\n {\n return widthCent; //Charlie Gao helped me debug the issue here\n }", "@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(450, 270);\n\t}", "public int getSize() {\n\treturn sizeNumber;\r\n}", "public int getLabelSize()\n {\n return myLabelSize;\n }", "short getPaperSize();", "public static int totalSize_data() {\n return (480 / 8);\n }", "@Override\n\tpublic void setSize(float size) {\n\t\tthis.size = size;\n\t\trxs = new int [ Math.max(Math.round(size/calibration[0]), Math.round(size/calibration[1])) + 1 ];\t\t\n\t\treset();\n\t}", "public int grWidth() { return width; }", "@Override\n\tpublic int getWidth() {\n\t\treturn 0;\n\t}", "@Override\n protected Point getInitialSize() {\n return new Point(930, 614);\n }", "public static int offset_infos_size_data() {\n return (80 / 8);\n }", "@Override\n public int getSize() { return size; }" ]
[ "0.65788037", "0.644136", "0.63696444", "0.6220887", "0.60164094", "0.59474486", "0.58867514", "0.5855479", "0.58524543", "0.57237476", "0.57180727", "0.5675844", "0.56555575", "0.5650885", "0.5623442", "0.5606204", "0.56054854", "0.5600239", "0.559669", "0.5576472", "0.5570401", "0.5557287", "0.5546218", "0.553414", "0.5533299", "0.5520214", "0.5518741", "0.55154794", "0.5512457", "0.5512457", "0.5509012", "0.5506003", "0.54942274", "0.54782724", "0.54760224", "0.5460686", "0.5455268", "0.54493463", "0.54488003", "0.5447232", "0.54449904", "0.5432586", "0.5431378", "0.5427809", "0.5426063", "0.5413203", "0.54112756", "0.54107535", "0.5409597", "0.5409063", "0.54073435", "0.53981036", "0.5397014", "0.53922313", "0.5386739", "0.5384704", "0.53847027", "0.53748393", "0.53697973", "0.53685147", "0.5364686", "0.5354247", "0.53535414", "0.5353015", "0.535116", "0.53462416", "0.53398097", "0.53386647", "0.53377867", "0.5330956", "0.53223777", "0.53219616", "0.53219557", "0.5320332", "0.5317846", "0.5315564", "0.53130084", "0.5311993", "0.5305914", "0.5304522", "0.53025943", "0.53011966", "0.5299984", "0.52980137", "0.5293546", "0.5288587", "0.52870136", "0.52850103", "0.52824706", "0.5282024", "0.5269026", "0.526795", "0.52656645", "0.5263054", "0.5262918", "0.5251352", "0.52453804", "0.52447253", "0.5243351", "0.52415514", "0.5237701" ]
0.0
-1
44 is the size because its the amount of notes the amount of beat the amount of dot, 114 2 currently removed dot
public ArrayList genStates2(){ ArrayList states = new ArrayList(44); List<String> notes = new ArrayList<String>(Arrays.asList("A","B","C","D","E","F","G","H","I","J","K")); List<String> beat = new ArrayList<String>(Arrays.asList("1","2","3","4")); //List<String> dot = new ArrayList<String>(Arrays.asList("1","0")); for(String s : notes){ for(String d : beat){ //for(int d = 0; d<=1; d++){ String state = ""; state += s; state += d; //state += dot.get(d); states.add(state); //} } } return states; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int totalSize_infos_noise() {\n return (48 / 8);\n }", "@Override\n\tpublic int getTotalDots() {\n\t\treturn 0;\n\t}", "public static int elementSize_infos_noise() {\n return (16 / 8);\n }", "public static int totalSizeBits_infos_noise() {\n return 48;\n }", "public double drawLength() { return drawLength; }", "public double getWidth() {\n return this.size * 2.0; \n }", "@Override\r\n\tpublic int size() {\n\t\treturn 27;\r\n\t}", "@Override\n\tpublic int computeSize() {\n\t\treturn 36;\n\t}", "public static int elementSizeBits_infos_noise() {\n return 16;\n }", "public double numberDots(LocationSet dot){\n\t\treturn -(dot.size()*10)/250;\n\t}", "double getSize();", "@Override\r\n protected int sizeOf(String key, Bitmap b) {\n return b.getHeight() * b.getWidth() * 4;\r\n }", "public int getIconHeight()\r\n/* 55: */ {\r\n/* 56:100 */ return SIZE;\r\n/* 57: */ }", "private int calcSize(int size)\n {\n return (((size - 1) / 9) + 1) * 9;\n }", "protected int getElementSize () {\n return 1;\n }", "public static float getSize() {\n return STAFF_LEN + FLAG_DEL_Y;\n }", "@Override\n public double getTrackWidth() {\n return 0.79872077;\n }", "public int getDotsNumber ()\r\n {\r\n return dotsNumber;\r\n }", "int getTribeSize();", "public int getThickness ()\r\n {\r\n return glyph.getBounds().height;\r\n }", "private static int getSize(int type) {\n switch (type) {\n case 0:\n return 65535;\n case 1:\n return 78513;\n case 2:\n return 101597;//getModelCount();\n case 3:\n return 3696;\n case 4:\n return 4193;\n case 5:\n return 6827;\n case 6:\n return 8487;\n case 7:\n return 645;//midiIndices.length;\n /*case 8:\n return 0;//getAnimCount();\n case 9:\n return 0;//getMapAmount();\n case 10:\n return 34026;\n case 11:\n return 3159;\n case 12:\n return 1956;*/\n }\n return 0;\n }", "public double getSize() \n {\n return size;\n }", "@Override\r\n\tpublic String getSize() {\n\t\treturn \"A4\";\r\n\t}", "protected String sizeString()\n {\n return (\" (\" + map.getSizeX() + \" x \" + map.getSizeY() + \")\");\n }", "public float sizeMultiplier();", "public static String getLoadingDotsSize(){\n DriverManager.waitForElement(Constans.LOADING_DOTS_LOCATOR);\n return DriverManager.driver.findElement(Constans.LOADING_DOTS_LOCATOR).getSize().toString();\n }", "public short getFontHeightInPoints()\n {\n return ( short ) (font.getFontHeight() / 20);\n }", "@Override\n\tpublic void measures() {\n\t\t\n\t\tsetTempo(240);\n\t\t\n\t\tkey = \"G\";\n\t\t\n\t\tmeasure(0);\n\t\t\n\t\taddNote(\"D5q\",A,T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(1);\n\t\t\n\t\taddNotes(\"G5q G5i A5i G5i F5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"B3q G4q\",B);\n\t\t\n\t\tmeasure(2);\n\t\t\n\t\taddNotes(\"E5q E5q E5q\",T);\n\t\t\n\t\taddNotes(\"C4h+E4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(3);\n\t\t\n\t\taddNotes(\"A5q A5i B5i A5i G5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"C#4q A4q\",B);\n\t\t\n\t\tmeasure(4);\n\t\t\n\t\taddNotes(\"F5q D5q D5q\",T);\n\t\t\n\t\taddNotes(\"D4h+F4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(5);\n\t\t\n\t\taddNotes(\"B5q B5i C6i B5i A5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"G4q D5q\",B);\n\t\t\n\t\tmeasure(6);\n\t\t\n\t\taddNotes(\"G5q E5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"C5h+E5h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(7);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(8);\n\t\t\n\t\taddNotes(\"G5h D5q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(9);\n\t\t\n\t\taddNotes(\"G5q G5q G5q\",T);\n\t\t\n\t\taddNote(\"B4h.\",A,B);\n\t\t\n\t\tmeasure(10);\n\t\t\n\t\taddNotes(\"F5h F5q\",T);\n\t\t\n\t\taddNotes(\"A4h A4q\",B);\n\t\t\n\t\tmeasure(11);\n\t\t\n\t\taddNotes(\"G5q F5q E5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(12);\n\t\t\n\t\taddNotes(\"D5h A5q\",T);\n\t\t\n\t\taddNotes(\"F4h A4q\",B);\n\t\t\n\t\tmeasure(13);\n\t\t\n\t\taddNotes(\"B5q A5q G5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(14);\n\t\t\n\t\taddNotes(\"D6q D5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"D5q D4q\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(15);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(16);\n\t\t\n\t\taddNote(\"G5h\",A,T);\n\t\taddRest(\"q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(17);\n\t}", "protected int bytesPerLine() {\n return (48);\n }", "protected int bytesPerLine() {\n return (48);\n }", "@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}", "public void copiedMeasureDecoder(Integer chordNote,Integer[]previousChord, Integer[] playedChord){\n /* int c=0;\n int a=0;\n int b=0;\n int x0=0;\n int x1=0;*/\n int d1=0;\n int d2=0;\n\n\n\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==chordNote)\n d1=i;\n }\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==melody.get(melodyCounter))\n d2=i;\n /* if(melodyNotes[i]==playedChord[1])\n a=i;\n if(melodyNotes[i]==previousChord[1])\n b=i;*/\n }\n /*if(a<b){\n x0=a-b;\n x1=7+x1;\n }else{\n x0=a-b;\n x1=x0-7;\n }*/\n if(d1>d2) {\n binaryOutput += \"0\";\n }else {\n binaryOutput += \"1\";\n }\n for(int i = 0;i<4;i++){\n for(int j =0; j < rhytm.get(beatCounter).length;j++){\n if(rhytm.get(beatCounter)[j]!=null)\n if ((!rhytm.get(beatCounter)[j].equals(\"Ri\")) && (!rhytm.get(beatCounter)[j].equals(\"Rs\"))) {\n melodyCounter++;\n }\n }\n beatCounter++;\n }\n\n\n}", "@Override\n public int getSize() {\n\treturn 0;\n }", "public double discSize() {\n return discSize;\n }", "public int taille() {\n\t\treturn getSize();\n\t}", "private void m13085a() {\n DisplayMetrics displayMetrics = getResources().getDisplayMetrics();\n this.f12281d = new Paint();\n this.f12281d.setColor(this.f12278a);\n this.f12281d.setAntiAlias(true);\n this.f12281d.setTextSize(displayMetrics.scaledDensity * ((float) this.f12279b));\n }", "public int getPatchSize() {\n return patchSize;\n }", "@Override\r\n\tprotected Point getInitialSize() {\r\n\t\treturn new Point(320, 204);\r\n\t}", "public double getPixelSize() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void showSize() {\n\t\tSystem.out.print(\"This pen is small.\");\n\t}", "public float getThickness(){\n return thickness;\n }", "@Override\n\tpublic String paperSize() {\n\t\treturn \"B5ֽ\";\n\t}", "protected float measurePrefix() {\n return measureLineNumber() + mDividerMargin * 2 + mDividerWidth;\n }", "private void checkPaintMeasures() {\r\n\t\t\r\n\t\t//Check from change\r\n\t\tint sizeNow = fontSize;\r\n\t\tif(sizeNow == sizeThen)return;\r\n\t\tsizeThen = sizeNow;\r\n\t\t\r\n\t\t//Set units\r\n\t\tmarkWidth = (double) sizeNow / 15;\r\n\t\tsizePaintLength = p.textLength(text, surface, sizeNow, bold, italic);\r\n\t\tif (viewPaintLength != viewPaintLength) viewPaintLength = sizePaintLength;\r\n\t}", "public float getSizeY(){return sy;}", "public int getIconWidth()\r\n/* 50: */ {\r\n/* 51: 99 */ return SIZE;\r\n/* 52: */ }", "public int getLength ()\r\n {\r\n return glyph.getBounds().width;\r\n }", "public float getSize()\n {\n return size;\n }", "public static int totalSize_infos_metadata() {\n return (16 / 8);\n }", "@Override\n public int getSize() {\n return 1;\n }", "private void loveYourz()\n {\n Song loveYourz = new Song();\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS3, 0));\n loveYourz.add(new Note(noteC2, 0));\n loveYourz.add(new Note(noteC1, WHOLE_NOTE/2));\n\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS3, 0));\n loveYourz.add(new Note(noteC2, 0));\n loveYourz.add(new Note(noteC1, WHOLE_NOTE/4));\n\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS2, 0));\n loveYourz.add(new Note(noteDS1, WHOLE_NOTE/4));\n\n\n loveYourz.add(new Note(noteG4, 0));\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteC4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/2));\n\n loveYourz.add(new Note(noteG4, 0));\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteC4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/8));\n\n loveYourz.add(new Note(noteF4, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/8));\n\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/8));\n\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/8));\n\n\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS3, 0));\n loveYourz.add(new Note(noteC2, 0));\n loveYourz.add(new Note(noteC1, WHOLE_NOTE/2));\n\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS3, 0));\n loveYourz.add(new Note(noteC2, 0));\n loveYourz.add(new Note(noteC1, WHOLE_NOTE/4));\n\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS2, 0));\n loveYourz.add(new Note(noteDS1, WHOLE_NOTE/4));\n\n\n loveYourz.add(new Note(noteG4, 0));\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteC4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/2));\n\n loveYourz.add(new Note(noteG4, 0));\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteC4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/4));\n\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/4));\n playSong(loveYourz);\n playSong(loveYourz);\n }", "public double getNewickLength()\n {\n return newicklength; \n }", "public int getSize() {\n\t\treturn width + length;\n\t}", "@Override\n\t\t\tpublic void onStopTrackingTouch(SeekBar seekBar) {\n\t\t\t\tint thickness = min_Thickness + (step_Thickness*seekBar.getProgress());\n\t\t\t\tt_Thickness.setTextSize(thickness);\n\t\t Toast.makeText(getApplicationContext(), String.valueOf(thickness),Toast.LENGTH_SHORT).show();\n\t\t \n\t\t seismicImage.setThickness(thickness);\n\t\t\t}", "@FXML\r\n private void updateNumDotsLabel() {\r\n numDotsLabel.setText(\"Number of Dots: \" + picture.getNumDots());\r\n }", "private void updateDimensions() {\r\n width = gui.getWidth();\r\n height = gui.getHeight();\r\n yLabelsMargin = (int) gui.getLabelWidth(Integer.toString(((int) maximumDB / 10) * 10), true) + 2;\r\n if (track != null)\r\n scaleXpx = ((float) width - yLabelsMargin) / track.getBufferCapacity();\r\n else\r\n scaleXpx = 1;\r\n scaleYpx = (float) ((height - 1) / (maximumDB - minimumDB));\r\n if (scaleYpx == 0)\r\n scaleYpx = 1;\r\n }", "public int getIconWidth()\r\n/* 154: */ {\r\n/* 155:194 */ return SIZE;\r\n/* 156: */ }", "private static void test3() {\n for (int noteNumber = 0; noteNumber < 128; noteNumber++) {\n double frequency = 440 * Math.pow(2, (noteNumber - 69) / 12.0);\n \n boolean clipMax = false;\n int block = 0;\n \n if (frequency <= 48.503) {\n block = 0;\n }\n else if (frequency <= 97.006) {\n block = 1;\n }\n else if (frequency <= 194.013) {\n block = 2;\n }\n else if (frequency <= 388.026) {\n block = 3;\n }\n else if (frequency <= 776.053) {\n block = 4;\n }\n else if (frequency <= 1552.107) {\n block = 5;\n }\n else if (frequency <= 3104.215) {\n block = 6;\n }\n else if (frequency <= 6208.431) {\n block = 7;\n \n }\n else {\n //throw new RuntimeException(\"invalid frequency !\");\n //System.out.println(\"unsupported frequency \" + frequency + \" !\");\n //System.exit(-1);\n block = 7;\n clipMax = true;\n }\n \n double f_num = frequency * Math.pow(2, (20 - block)) / 49716;\n if (clipMax) {\n f_num = 1023;\n }\n String f_num_hex = \"0000\" + Integer.toHexString((int) f_num);\n f_num_hex = f_num_hex.substring(f_num_hex.length() - 4, f_num_hex.length());\n //System.out.println(noteNumber + \" = \" + frequency + \" ---> block: \" + block + \" f_num_hex = \" + f_num_hex);\n //System.out.println(noteNumber + \" = \" + frequency);\n \n String block_hex = \"000\" + Integer.toHexString(block);\n block_hex = block_hex.substring(block_hex.length() - 3, block_hex.length());\n\n if (noteNumber % 4 == 0) {\n System.out.print(\"\\r\\n\\t\\t\\tdb \");\n }\n System.out.print(block_hex + \"h, 000h, 0\" + f_num_hex.subSequence(2, 4) + \"h, 0\" + f_num_hex.substring(0, 2) + \"h\" + ((noteNumber % 4 != 3) ? \", \" : \"\"));\n \n }\n System.out.println(\"\");\n }", "public short getFontHeightInPoints() {\n\t\treturn fontHeightInPoints;\n\t}", "public float getSizeX(){return sx;}", "public float getPointSize()\n {\n return myPointSize;\n }", "public int getFootprintLength() {\n return 1;\n }", "@Override\n public int getSize() {\n return 64;\n }", "@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }", "public int getPatchNameLength() \n {\n return 16; \n }", "public double getSize()\n\t{\n\t\treturn size;\n\t}", "public int numberOfBlocksToRemove() {\r\n return 105;\r\n }", "public void addLength() {\n\t\tBodyPart b1 = snake.getBodyPart(snake.getSize()-1), b2 = snake.getBodyPart(snake.getSize()-2);\n\t\tif(b1.getX() > b2.getX())\n\t\t\tsnake.addBodyPart(b1.getX()+GameObject.SIZE, b1.getY());\n\t\telse if(b1.getX() < b2.getX())\n\t\t\tsnake.addBodyPart(b1.getX()-GameObject.SIZE, b1.getY());\n\t\telse if(b1.getY() >= b2.getY())\n\t\t\tsnake.addBodyPart(b1.getX(), b1.getY()+GameObject.SIZE);\n\t\telse if(b1.getY() >= b2.getY())\n\t\t\tsnake.addBodyPart(b1.getX(), b1.getY()-GameObject.SIZE);\n\t}", "public static int size_infos_valid_noise_samples() {\n return (8 / 8);\n }", "public static int numElements_infos_noise() {\n return 3;\n }", "@Override\r\n\tprotected Point getInitialSize() {\r\n\t\treturn new Point(706, 307);\r\n\t}", "public int getSnakeStartLength();", "public float getSize() {\n return size;\n }", "public int grHeight() { return height; }", "public int getIconHeight()\r\n/* 159: */ {\r\n/* 160:195 */ return SIZE;\r\n/* 161: */ }", "public static int elementSize_infos_metadata() {\n return (8 / 8);\n }", "godot.wire.Wire.Vector2 getSize();", "private String countFileSize(long length) {\n\n if (length < UNIT) {\n return length + \" B\";\n }\n int exp = (int) (Math.log(length) / Math.log(UNIT));\n String pre = \"KMGTPE\".charAt(exp - 1) + \"i\";\n\n return String.format(\"%.1f %sB\", length / Math.pow(UNIT, exp), pre);\n\n }", "public static void determineSizes(){\n maxPieceSize = 65536*8;\n if(pieceSize > maxPieceSize){\n \t//make pieceSize equal to the max\n \tpieceSize = maxPieceSize - 1; //minus one because we want a buffer space\n }\n\n windowSize = fileSize/10 ;\n\t}", "int getCurrentSize();", "int getTickLength();", "@Override\n public int estimateSize() {\n return 8 + 8 + 1 + 32 + 64;\n }", "@Override\n\tpublic int getMaxSizeZ()\n\t{\n\t\treturn 200;\n\t}", "public long estimateSize() {\n/* 1448 */ return this.est;\n/* */ }", "private void drawVolumes(Graphics g , int contentHeight) {\n //\n }", "public final /* synthetic */ void mo99828e() {\n int measuredWidth = this.f104232v.getMeasuredWidth();\n this.f104233w.setMaxWidth((C23482j.m77098b(this) - (measuredWidth * 2)) - ((int) C9738o.m28708b((Context) this, 60.0f)));\n this.f104232v.setVisibility(8);\n this.f104232v.setTextSize(1, 17.0f);\n }", "@Override\r\n\tpublic int getWidth() {\n\t\treturn 0;\r\n\t}", "@FXML\r\n void btnSizeMiuns(ActionEvent event) {\r\n \tdrawSize--;\r\n \tif(drawSize <= 1){\r\n \t\tdrawSize = 1;\r\n \t}\r\n }", "@Override\n public int width()\n {\n return widthCent; //Charlie Gao helped me debug the issue here\n }", "@Override\n\tpublic double getSize() {\n\t\treturn Math.sqrt(getMySize())/2;\n\t}", "@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(450, 270);\n\t}", "public int getSize() {\n\treturn sizeNumber;\r\n}", "public int getLabelSize()\n {\n return myLabelSize;\n }", "public static int totalSize_data() {\n return (480 / 8);\n }", "short getPaperSize();", "@Override\n\tpublic void setSize(float size) {\n\t\tthis.size = size;\n\t\trxs = new int [ Math.max(Math.round(size/calibration[0]), Math.round(size/calibration[1])) + 1 ];\t\t\n\t\treset();\n\t}", "@Override\n\tpublic int getWidth() {\n\t\treturn 0;\n\t}", "public int grWidth() { return width; }", "@Override\n protected Point getInitialSize() {\n return new Point(930, 614);\n }", "public static int offset_infos_size_data() {\n return (80 / 8);\n }", "public void mo75192a() {\n AppMethodBeat.m2504i(65565);\n this.f17955a.setLength(0);\n this.f17956b.setText(\"\");\n this.f17957c.setText(\"\");\n AppMethodBeat.m2505o(65565);\n }" ]
[ "0.6579831", "0.6441723", "0.63706106", "0.62218434", "0.601569", "0.59471214", "0.58870643", "0.58557427", "0.58532536", "0.5723253", "0.571719", "0.5674391", "0.56556004", "0.5651182", "0.5624039", "0.56062704", "0.5604896", "0.55996853", "0.5597115", "0.55765706", "0.55700606", "0.5556364", "0.55458635", "0.55336773", "0.55332214", "0.55198586", "0.55197376", "0.55148906", "0.55131716", "0.55131716", "0.55091107", "0.5506145", "0.5494505", "0.54780763", "0.5476147", "0.5461328", "0.5454806", "0.54499835", "0.54485124", "0.5448089", "0.5444699", "0.54330367", "0.5431799", "0.5428114", "0.5426532", "0.5412918", "0.54109985", "0.5409633", "0.54093087", "0.54084724", "0.5405704", "0.53977203", "0.53966963", "0.53915775", "0.5384922", "0.53845686", "0.53844446", "0.53751415", "0.53705275", "0.5369025", "0.53638303", "0.53541726", "0.53532296", "0.5351945", "0.5351275", "0.534547", "0.53405094", "0.5339237", "0.53385776", "0.5331862", "0.532269", "0.5322142", "0.5320852", "0.5320137", "0.5317722", "0.5315282", "0.5312175", "0.5311313", "0.53065753", "0.5304315", "0.5301659", "0.5301452", "0.5300041", "0.5298022", "0.5293707", "0.5290397", "0.5288123", "0.5285026", "0.528283", "0.528242", "0.52693224", "0.5266993", "0.52648795", "0.52635753", "0.5263046", "0.5251138", "0.52458364", "0.52455074", "0.5243992", "0.52416205", "0.52382845" ]
0.0
-1
Total of the Sumation
public double entropyCalc(String stateSigS,String stateS){ double total= 0; //Probability of the stateSigS occuring double pSigSP; //Probability of stateS occuring double pSigS; //Given stateS whats the chance of sigP double pCond; //lg10 of pSigSP/pCond*pSigS double lgP; //Used for concating pSigSP so that we get pSigS0 and pSigS1 String sigP; for(int cnt = 0;cnt<states.size();cnt++){ sigP = states.get(cnt); pSigSP = getCumlProbs(stateSigS.concat(sigP)); pSigS = getCumlProbs(stateSigS); pCond = condProb(stateS, sigP); lgP = Math.log10(pSigSP/(pCond*pSigS)); if(Double.isInfinite(lgP)){ lgP = 0; } if(Double.isNaN(lgP)){ lgP = 0; } total = total + pSigSP*lgP; } //System.out.println(total); if(Double.isInfinite(total)){ return 0; } return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void total() {\n\t\t\n\t}", "double getSum();", "double getSum();", "public double getTotal (){ \r\n return total;\r\n }", "@Override\n public double getTotal() {\n return total;\n }", "public double total(){\n\tdouble total=0;\n\tfor(Map.Entry<String, Integer> pro:proScan.getProducts().entrySet()){\n\t\tString proName=pro.getKey();\n\t\tint quantity=pro.getValue();\n\t\tProductCalculator proCal=priceRule.get(proName);\n\t\tif(proCal==null)\n\t\t\tthrow new MissingProduct(proName);\n\t\t\n\t\tProductCalculator cal=priceRule.get(proName);\n\t\tdouble subtotal=cal.getTotal(quantity);\n\t\ttotal+=subtotal;\n\t\t//System.out.println(total);\n\t}\n\t//round the total price to two digit\n\treturn round(total, 2);\n}", "double getTotal();", "public double sum() {\n double resultat = 0;\n for (int i = 0; i < tab.size(); i++) {\n resultat += CalculatorArray.sum(tab.get(i));\n }\n System.out.println(\"Sum colonne:\" + resultat);\n return resultat;\n }", "public double calTotalAmount(){\n\t\tdouble result=0;\n\t\tfor (int i = 0; i < this.cd.size(); i++) {\n\t\t\tresult += this.cd.get(i).getPrice();\n\t\t}\n\t\treturn result;\n\t}", "BigDecimal getTotal();", "BigDecimal getTotal();", "public double getTotal(){\n\t\tBigDecimal total =BigDecimal.valueOf(0);\n\t\tfor(CartItem cartItem : map.values()){\n\t\t\ttotal = total.add(BigDecimal.valueOf(cartItem.getSubtotal())) ;\n\t\t}\t\t\n\t\treturn total.doubleValue();\n\t}", "public int total() {\n int summation = 0;\n for ( int value : map.values() ) {\n summation += value;\n }\n return summation;\n }", "public double getTotal(){\n\t\tdouble Total = 0;\n\t\t\n\t\tfor(LineItem lineItem : lineItems){\n\t\t\tTotal += lineItem.getTotal();\t\n\t\t}\n\t\treturn Total;\n\t}", "public int getTotal() {\r\n\r\n\t\treturn getAmount() + getPrice();\r\n\r\n\t}", "public double getTotal() {\n return Total;\n }", "public double getTotal(){\n return total;\n }", "public double getTotal() {\r\n\t\treturn total;\r\n\t}", "private double prixTotal() \r\n\t{\r\n\t\tdouble pt = getPrix() ; \r\n\t\t\r\n\t\tfor(Option o : option) \r\n\t\t\tpt += o.getPrix();\t\r\n\t\treturn pt;\r\n\t}", "public double getTotal() {\n\t\treturn total;\n\t}", "Integer total();", "public BigDecimal getTotal() {\n return total;\n }", "public BigDecimal getTotal() {\n return total;\n }", "public float getTotal(){\r\n\t\treturn Total;\r\n\t}", "private double calculateTotal(){\r\n double total = 0;\r\n\r\n for(Restaurant restaurant: restaurantMap.getRestaurantMap().values()){\r\n total += restaurant.getRevenue();\r\n }\r\n\r\n return total;\r\n }", "public Double getTotal();", "public double getSUM() {\n return sum;\n }", "public int calcSum() {\n\t\tint sum = 0;\n\t\tfor (int count = 0; count < data.size(); count++)\n\t\t\tsum += (int)data.get(count);\n\t\treturn sum;\n\t}", "public int getSum() {\n\t\t\treturn 0;\r\n\t\t}", "public Double getTotal() {\n return total;\n }", "public Double getTotal() {\n return total;\n }", "public Double getTotal() {\n return total;\n }", "@Override\n\tpublic int sum() {\n\t\treturn this.first + this.second + this.third;\n\t}", "public Integer calculateSum() {\n logger.debug(\"Calculating and returning the sum of expenses.\");\n return listOfTargets.stream().map(T::getAmount).reduce(0, Integer::sum);\n }", "private void calcTotalAmount(){\n\t totalAmount = 0;\n\t\tfor(FlightTicket ft : tickets)\n\t\t{\n\t\t\ttotalAmount += ft.getClassType().getFee() * getFlight().getFlightCost();\n\t\t}\n\t\tsetTotalAmount(totalAmount);\n\t}", "public double sumMoney(){\n\t\tdouble result = 0;\n\t\tfor(DetailOrder detail : m_DetailOrder){\n\t\t\tresult += detail.calMoney();\n\t\t}\n\t\tif(exportOrder == true){\n\t\t\tresult = result * 1.1;\n\t\t}\n\t\treturn result;\n\t}", "public Double darTiempoTotal(){\n\t\treturn tiempoComputacionalGrasp+tiempoComputacionalSetCovering;\n\t}", "private double calculateTotal(){\r\n double total = 0;\r\n for(int i = 0; i < orderList.size(); i++){\r\n total += orderList.getOrder(i).calculatePrice();\r\n }\r\n return total;\r\n }", "public static float getTotal() {\n return total;\r\n }", "public java.lang.Double getTotal () {\r\n\t\treturn total;\r\n\t}", "public int totalValue() {\r\n\t\tint total = 0;\r\n\t\tfor(Item item: items) {\r\n\t\t\ttotal = total + item.getValue();\r\n\t\t}\r\n\t\treturn total;\r\n\t}", "public double obtener_total(){\r\n double total_ventas = precio*unidades;\r\n return total_ventas;\r\n }", "public long getTotal() { return total; }", "public long getTotal() { return total; }", "private double totalPrice(){\n\n double sum = 0;\n\n for (CarComponent carComponent : componentsCart) {\n sum += (carComponent.getCompPrice() * carComponent.getCompQuantity()) ;\n }\n return sum;\n }", "public String getSum();", "public double getTotal() {\r\n\r\n return getSubtotal() + getTax();\r\n }", "void calculateTotalPrice(){\n totalPrice = 0;\n cartContents.forEach(Product-> this.totalPrice = totalPrice + Product.getSellPrice());\n }", "public double getTotalValue(){\r\n return this.quantity * this.price;\r\n }", "private double calculateTotal() {\n Log.d(\"Method\", \"calculateTotal()\");\n\n double extras = 0;\n CheckBox cb = (CheckBox) findViewById(R.id.whipped_checkbox_view);\n\n if (cb.isChecked()) {\n extras = coffeeCount * 0.75;\n }\n return (coffeeCount * coffeePrice) + extras;\n }", "public int getTotal () {\n return total;\n }", "public int getTotalValue() {\n\t\tint totalValue = 0;\n\t\tfor(Items temp : this.getAnchors()) {\n\t\t\tif (temp == null)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\ttotalValue = totalValue + temp.getTotalValue();\n\t\t}\n\t\treturn totalValue;\n\t}", "public void generarTotal(){\n\n\t\tfloat total = 0;\n\n\t\tfor (int con = 0; con < modelo.getRowCount(); con++) {\n\n\t\t\ttotal += (float) tabla.getValueAt(con, 3);\n\t\t\t\n\t\t}\n\n\t\tcampoTotal.setText(formato.format(total));\n\n\t\tlimpiarCampos();\n\n\t}", "private int sum(AFormula o1){\n\t\t\t\t\n\t\t\t\treturn o1.calculate(customerType, weekdayCount, weekendCount);\n\t\t\t\t\n\t\t\t}", "public int getTotal () {\r\n\t\treturn total;\r\n\t}", "public int getTotal () {\r\n\t\treturn total;\r\n\t}", "public Integer getSum() {\n return sum;\n }", "public double calcTotalEarnings() {\n double total = 0;\n for (int i = 0; i < numRegions; i++) {\n total += regionList[i].calcEarnings();\n }\n return total;\n }", "public int total() {\n return _total;\n }", "public BigDecimal getTotal() {\n BigDecimal total = new BigDecimal(0);\n for (Item item : items){\n int quantity = item.getQuantity();\n BigDecimal subtotal = item.getPrice().multiply(new BigDecimal(quantity));\n total = total.add(subtotal);\n }\n return total;\n }", "@Override\n\tpublic double sumMoney() {\n\t\treturn ob.sumMoney();\n\t}", "public static void calculateTotal(){\n int i=0;\n total=0;\n while(i<CustomAdapter.selecteditems.size()){\n total+= CustomAdapter.selecteditems.get(i).getPrice() * CustomAdapter.selecteditems.get(i).getQuantity();\n i++;\n }\n String s=\"Rs \"+String.valueOf(total);\n tv_total.setText(s);\n }", "public BigInteger getTotal()\n\t{\n\t\treturn total;\n\t}", "public void incrementTotal() {\n\t\t\ttotal++;\n\t\t}", "public int getTotal()\n\t{\n\t\treturn total;\n\t\t\n\t}", "public BigDecimal getValorTotal() {\n\t\treturn itens.stream()\n\t\t\t\t.map(ItemDieta::getValorTotal)\n\t\t\t\t.reduce(BigDecimal::add)\n\t\t\t\t.orElse(BigDecimal.ZERO);\n\t}", "public int getTotal() {\n return total;\n }", "public Total getTotal() {\r\n\t\treturn total;\r\n\t}", "public long getTotal() {\n return total;\n }", "public long getTotal() {\n return total;\n }", "public int getTotalRecaudado()\n {\n return maquina1.getTotal() + maquina2.getTotal();\n }", "public double sum() {\n/* 196 */ return this.mean * this.count;\n/* */ }", "private void getSum() {\n\t\tint sum =0;\r\n\t\t\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i] != null)\r\n\t\t\t\tsum += products[i].getPrice();\r\n\t\t}\r\n\t\tSystem.out.println(sum);\r\n\t}", "public int getTotal () {\n\t\treturn total;\n\t}", "public int getTotal() {\n return total;\n }", "public int getTotal() {\n return total;\n }", "public BigInteger getTotal () {\n\t return total;\n\t }", "public synchronized double getTotal(){\n double totalPrice=0;\n \n for(ShoppingCartItem item : getItems()){\n totalPrice += item.getTotal();\n }\n \n return totalPrice;\n }", "public double getTotal(){\n double total = 0;\n for(int i=0;i<array.length; i++){\n total += array[i].doubleValue();\n }\n return total;\n }", "public int getSueldoTotal() {\n return sueldoTotal;\n }", "public void addTotal() {\n for (int i = 0; i < itemsInOrder.size(); i++) {\n this.dblTotal += itemsInOrder.get(i).getPrice();\n }\n }", "public float getTotal() {\n return this.total;\n }", "public double getTotal() {\n double amount = 0;\n amount = (this.getQuantity() * product.getPrice().doubleValue());\n return amount;\n }", "public int calcTotalPrice(){\r\n\t\tint flightPrice = flight.getFlightPrice();\r\n\t\tint bagPrice = nrBag*LUGGAGE_PRICE;\r\n\t\tthis.totalPrice = bagPrice + nrAdult*flightPrice + nrChildren*1/2*flightPrice;\r\n\t\treturn this.totalPrice;\r\n\t}", "@Override\r\n\tpublic int precioTotal() {\n\t\treturn this.precio;\r\n\t}", "public BigInteger getTotal() {\n return total;\n }", "public int getTotalAmount();", "public String getSum() {\n return sum;\n }", "public int getSum() {\n int result = 0;\n\n for (Map.Entry<Integer, Integer> entry : this.entrySet()) {\n result += entry.getKey() * entry.getValue();\n }\n\n return result;\n }", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "public BigDecimal total() {\n return executor.calculateTotal(basket);\n }", "public boolean calcularTotal() {\r\n double dou_debe = 0;\r\n double dou_haber = 0;\r\n for (int i = 0; i < tab_tabla2.getTotalFilas(); i++) {\r\n try {\r\n if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_debe)) {\r\n dou_debe += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n } else if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_haber)) {\r\n dou_haber += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n }\r\n } catch (Exception e) {\r\n }\r\n }\r\n eti_suma_debe.setValue(\"TOTAL DEBE : \" + utilitario.getFormatoNumero(dou_debe));\r\n eti_suma_haber.setValue(\"TOTAL HABER : \" + utilitario.getFormatoNumero(dou_haber));\r\n\r\n double dou_diferencia = Double.parseDouble(utilitario.getFormatoNumero(dou_debe)) - Double.parseDouble(utilitario.getFormatoNumero(dou_haber));\r\n eti_suma_diferencia.setValue(\"DIFERENCIA : \" + utilitario.getFormatoNumero(dou_diferencia));\r\n if (dou_diferencia != 0.0) {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold;color:red\");\r\n } else {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold\");\r\n return true;\r\n }\r\n return false;\r\n }", "public Integer total() {\n return this.total;\n }", "private double getOrderTotal() {\n double d = 0;\n\n for (Pizza p : pizzas) {\n d += p.calcTotalCost();\n }\n\n return d;\n }", "public double sumTransactions() {\n\t\treturn checkIfTransactionsExist(true);\n\t}", "public int sumar(){\n return this.a+this.b;\n }", "public int total() {\n return this.total;\n }", "public int sum()\n {\n return sum(0,0,size);\n }", "@Override\r\n\tpublic long getTotal() {\n\t\treturn 0;\r\n\t}", "public int getTotal() {\n int value = 0;\n for (Map.Entry<Integer, Integer> entry : gramma.entrySet()) {\n value += entry.getKey() * entry.getValue();\n }\n return value;\n }", "public void calcularTotal() {\n double valor = 0;\n String servico = (String)consultaSelecionada.getSelectedItem().toString();\n switch(servico) {\n case \"Consulta\":\n valor += 100;\n break;\n case \"Limpeza\":\n valor += 130;\n break;\n case \"Clareamento\":\n valor += 450;\n break;\n case \"Aparelho\":\n valor += 100;\n break;\n case \"Raio-x\":\n valor += 80;\n break;\n case \"Cirurgia\":\n valor += 70;\n break;\n }\n Total.setText(String.valueOf(valor));\n }" ]
[ "0.765476", "0.76365155", "0.76365155", "0.7513383", "0.7503411", "0.7487252", "0.7445155", "0.7423424", "0.74069095", "0.7399973", "0.7399973", "0.739078", "0.73753417", "0.7353493", "0.7344267", "0.7333355", "0.7323534", "0.7305597", "0.7282832", "0.7282065", "0.7261937", "0.72605336", "0.72605336", "0.72455746", "0.72356784", "0.7232145", "0.72315484", "0.72149235", "0.71994215", "0.71707004", "0.71707004", "0.71707004", "0.71151", "0.710802", "0.710164", "0.7082987", "0.7070138", "0.7061934", "0.70549685", "0.7039113", "0.70386916", "0.70291525", "0.69943076", "0.69943076", "0.6988498", "0.69878834", "0.6976378", "0.6975178", "0.69726616", "0.6971376", "0.69687843", "0.6965802", "0.69489896", "0.69438803", "0.69262576", "0.69262576", "0.6925348", "0.69204724", "0.69200516", "0.69101524", "0.6907686", "0.6905345", "0.6903666", "0.6901092", "0.68988025", "0.68822145", "0.6880698", "0.68722785", "0.6867159", "0.6867159", "0.6865019", "0.6861024", "0.6860611", "0.68568015", "0.6853388", "0.6853388", "0.68522674", "0.6847752", "0.68452644", "0.6845177", "0.68423367", "0.68348885", "0.681005", "0.6808602", "0.6807427", "0.6805464", "0.6804172", "0.680345", "0.68011737", "0.67996967", "0.6795427", "0.6793204", "0.6790825", "0.6785483", "0.67850405", "0.6782049", "0.67783344", "0.6772637", "0.67665184", "0.6763917", "0.6763796" ]
0.0
-1
Cond Prob is simple uses the pattern matcher to find out the probability
private double condProb(String stateGiven, String stateFind){ HashMap probs = genAllProb(stateGiven); return (double) probs.get(stateFind); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double getMatchScore(char[] pattern, Motif motif) {\n double score=0;\n for (int i=0;i<pattern.length;i++) {\n score+=motif.getBaseFrequency(i, pattern[i]);\n }\n double[] minmax=getMinAndMaxScore(motif);\n return (score-minmax[0])/(minmax[1]-minmax[0]);\n }", "static double probabilityValue(String str, String findStr) {\n\t\tdouble val = count(str, findStr) / count(str, str.substring(str.length() - 1));\n\t\treturn val;\n\t}", "public void testScorePattern() {\n System.out.println(\"scorePattern\");\n \n Pattern pattern = new Pattern(\"for a 5-1 (originally 7-2) term\");\n PatternMetric instance = PatternMetricFactory.getPatternMetric(PatternMetricFactory.PSEUDO_FM,\n corpus, tps);\n \n double result = instance.scorePattern(pattern);\n assertTrue(result >= 0);\n assertTrue(result <= 1);\n assertFalse(Double.isNaN(result));\n assertFalse(Double.isInfinite(result));\n }", "public void calculateProbabilities(){\n\t}", "public abstract float getProbability(String[] tokens);", "private void evaluateProbabilities()\n\t{\n\t}", "private double condProb(RelStruc A,Hashtable atomhasht,OneStrucData inst,long[] timers)\n\t\t\tthrows RBNCompatibilityException\n\t\t\t{\n\t\tdouble result = probform.evalSample(A,atomhasht,inst,timers);\n\t\t//System.out.print(\" cP: \" + result);\n\t\treturn result;\n\t\t\t}", "public abstract float getProbability(String singleToken);", "float genChance();", "@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }", "float getSpecialProb();", "public void test2 (List<List<String>> sentences) {\n double totalLogProb = 0;\n double totalNumTokens = 0;\n for (List<String> sentence : sentences) {\n totalNumTokens += sentence.size();\n double sentenceLogProb = sentenceLogProb2(sentence);\n totalLogProb += sentenceLogProb;\n }\n double perplexity = Math.exp(-totalLogProb / totalNumTokens);\n System.out.println(\"Word Perplexity = \" + perplexity );\n }", "public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "@Test\n\tpublic void priorsAreReasonable() {\n\t\tdouble tot = 0;\n\t\tboolean zeroPrior = false;\n\t\tfor(NewsGroup g: groups) {\n\t\t\tdouble p = g.getPrior();\n\t\t\ttot+=p;\n\t\t\tif(p == 0.0) {\n\t\t\t\tzeroPrior = true;\n\t\t\t}\n\t\t}\n\t\tassertTrue((tot == 1) && !zeroPrior);\n\t}", "public double getCandProbability(String candidate){\n\t\tString[] candTerms = candidate.split(\"\\\\s+\");\n\t\t\n\t\t// Total Tokens\n\t\tdouble totTokens = (double)unigramDict.termCount();\n\t\t//P(w1) in log\n\t\tString w1 = candTerms[0];\n\t\tdouble probW1 = Math.log10((double)unigramDict.count(w1, wordToId)/totTokens);\n\t\t\n\t\t//P (w1, w2, ..., wn)\n\t\tdouble probCandidate = probW1;\n\t\t\n\t\t\n\t\tfor( int i =0; i < candTerms.length-1; i++){\n\t\t\t//Pint(w2|w1) = Pmle(w2) + (1 )Pmle(w2|w1)\n\t\t\tString currentTerm = candTerms[i];\n\t\t\tString nextTerm = candTerms[i+1];\n\t\t\tString bigram = currentTerm + \" \" + nextTerm;\n\t\t\tint freqBigram = bigramDict.count(bigram, wordToId);\n\t\t\t\n\t\t\t//this term should be in dictionary\n\t\t\tint freqFirstTerm = unigramDict.count(currentTerm, wordToId);\n\t\t\t\n\t\t\tdouble PmleW2W1 = (double)freqBigram/(double)freqFirstTerm;\n\t\t\t\n\t\t\t//System.out.println(\"candidate=[\" + candidate + \"]\\tbigram=[\" + bigram + \"]\\tterms=\" + Arrays.toString(terms));\n\t\t\tdouble PmleW2 = (double)unigramDict.count(nextTerm, wordToId) / totTokens;\n\t\t\t//double lamda= 0.1;\n\t\t\tdouble PintW2W1 = lamda*PmleW2 + (1-lamda)*PmleW2W1;\n\t\t\tprobCandidate = probCandidate + Math.log10(PintW2W1);\n\t\t}\n\t\treturn probCandidate;\n\t}", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "public double getSentenceProbability(List<String> sentence) {\n\tList<String> stoppedSentence = new ArrayList<String>(sentence);\n\tstoppedSentence.add(0, START);\n\tstoppedSentence.add(0, START);\n\tstoppedSentence.add(STOP);\n\tdouble probability = 1.0;\n\tfor (int index = 2; index < stoppedSentence.size(); index++) {\n\t probability *= getWordProbability(stoppedSentence, index);\n\t}\n\treturn probability;\n }", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "@Test\n public void testSegmentationGreedyness() {\n assertMetrics(\"match:0.3717\",\"a b c\",\"a x b x x x x x x x x b c\");\n assertMetrics(\"match:0.4981\",\"a b c\",\"a x z x x x x x x x x b c\");\n }", "abstract double rightProbability();", "private int getPrize(int matchingNumbersCount)\r\n\t{\r\n\t\tswitch(matchingNumbersCount)\r\n\t\t{\r\n\t\tcase 3:\r\n\t\t\treturn 25;\r\n\t\tcase 4:\r\n\t\t\treturn 100;\r\n\t\tcase 5:\r\n\t\t\treturn 1000;\r\n\t\tcase 6:\r\n\t\t\treturn 1000000;\r\n\t\tdefault:\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public float evaluate(PhraseInfo p) {\n int numChords = p.gen.prog.get(p.gen.progIndex).size();\n int tn = Math.min(phraseLen, (int)Math.round(targetNotes * ((numChords + 1) / 3.0))); // not directly proportional.\n // scores: 50, 49, 46, 41, 34, 25 etc.\n int score = Math.max(0, 50 - (int)Math.round(Math.pow(Math.abs(p.noteCount - tn), 2)));\n return (float)Math.min(1.0f, score/50.0f);\n }", "@Test\n\tpublic void testPoisson() throws Exception {\n\t\tPoissonDistribution p = new PoissonDistributionImpl(1);\n\t\tRandom random = new Random();\n\t\tint[] counts = new int[500];\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\tcounts[p.inverseCumulativeProbability(random.nextDouble()) + 1]++;\n\t\t}\n\t\tdouble delta = 0.03;\n\t\tassertEquals(0.367879, counts[0] / 10000d, delta);\n\t\tassertEquals(0.367879, counts[1] / 10000d, delta);\n\t\tassertEquals(0.183940, counts[2] / 10000d, delta);\n\t\tassertEquals(0.061313, counts[3] / 10000d, delta);\n\t\tassertEquals(0.015328, counts[4] / 10000d, delta);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.0) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.1) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.2) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.3) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.4) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.5) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.6) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.7) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.8) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.9) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.95) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.975) + 1, 0);\n\t\tassertEquals(4, p.inverseCumulativeProbability(0.99) + 1, 0);\n\n\t\t// Poisson dist with t = 0.86\n\t\tp = new PoissonDistributionImpl(0.86);\n\t\tcounts = new int[500];\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\tcounts[p.inverseCumulativeProbability(random.nextDouble()) + 1]++;\n\t\t}\n\t\tdelta = 0.03;\n\t\tassertEquals(0.423162, counts[0] / 10000d, delta);\n\t\tassertEquals(0.363919, counts[1] / 10000d, delta);\n\t\tassertEquals(0.156485, counts[2] / 10000d, delta);\n\t\tassertEquals(0.044819, counts[3] / 10000d, delta);\n\t\tassertEquals(0.009645, counts[4] / 10000d, delta);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.0) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.1) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.2) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.3) + 1, 0);\n\t\tassertEquals(0, p.inverseCumulativeProbability(0.4) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.5) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.6) + 1, 0);\n\t\tassertEquals(1, p.inverseCumulativeProbability(0.7) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.8) + 1, 0);\n\t\tassertEquals(2, p.inverseCumulativeProbability(0.9) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.95) + 1, 0);\n\t\tassertEquals(3, p.inverseCumulativeProbability(0.975) + 1, 0);\n\t\tassertEquals(4, p.inverseCumulativeProbability(0.99) + 1, 0);\n\t}", "public char[] sample(Motif motif, double min, double max) {\n minMatch=min;\n maxMatch=max;\n pwm=motif.getMatrixAsFrequencyMatrix();\n motifpattern=new char[motif.getLength()];\n if (motifpattern.length==0) return motifpattern; // this should hopefully not happpen\n if (min>0.99) { // use only the best pattern\n for (int i=0;i<motifpattern.length;i++) {\n motifpattern[i]=getBestBaseForPosition(i);\n }\n return motifpattern;\n } else { \n // sample a starting point. If min-score is relatively high then sample according to PWM distribution, else just sample randomly\n for (int i=0;i<motifpattern.length;i++) {\n if (min>0.6) motifpattern[i]=getSampledBaseForPosition(i);\n else motifpattern[i]=bases[(int)(Math.random()*4)];\n }\n minmax=getMinAndMaxScore(motif);\n score=getMatchScore(motifpattern);\n if (score>=min && score<=max) {\n return motifpattern;\n }\n // setup the transition matrix\n transitions=new double[pwm.length][pwm[0].length];\n for (int i=0;i<motifpattern.length;i++) {\n updateTransitionMatrix(i, motifpattern[i]);\n }\n char[] workingcopy=Arrays.copyOf(motifpattern, motifpattern.length);\n for (int tries=0; tries<100; tries++) {\n ArrayList<int[]> validtransitions=findTransitionsToWithinLimits(workingcopy); \n int[] trans=null;\n boolean valid=(validtransitions.size()>0);\n if (validtransitions.isEmpty()) { // no single transition can bring the pattern into score limits\n validtransitions=findSuggestedTransitions(workingcopy, 0.25); // suggest other transitions\n }\n trans=(!validtransitions.isEmpty())?validtransitions.get((int)(Math.random()*validtransitions.size())):new int[]{(int)(Math.random()*workingcopy.length),(int)(Math.random()*4)};\n int changepos=trans[0];\n int newbase=trans[1];\n switch(newbase) {\n case 0: workingcopy[changepos]='A'; break;\n case 1: workingcopy[changepos]='C'; break;\n case 2: workingcopy[changepos]='G'; break;\n case 3: workingcopy[changepos]='T'; break;\n }\n updateTransitionMatrix(changepos, bases[newbase]);\n double newscore=getMatchScore(workingcopy);\n double targetscore=minMatch+(maxMatch-minMatch)/2; // target score is midway between min and max\n if (Math.abs(newscore-targetscore)<Math.abs(score-targetscore)) { // is the new score closer to the target\n score=newscore;\n motifpattern=Arrays.copyOf(workingcopy, motifpattern.length);\n }\n if (score>=minMatch && score<=maxMatch) break; // success!\n }\n return motifpattern;\n }\n }", "@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}", "public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "@Test\n public void testMatch() {\n assertMetrics(\"match:1\", \"a\",\"a\");\n assertMetrics(\"match:0.9339\",\"a\",\"a x\");\n assertMetrics(\"match:0\", \"a\",\"x\");\n assertMetrics(\"match:0.9243\",\"a\",\"x a\");\n assertMetrics(\"match:0.9025\",\"a\",\"x a x\");\n\n assertMetrics(\"match:1\", \"a b\",\"a b\");\n assertMetrics(\"match:0.9558\",\"a b\",\"a b x\");\n assertMetrics(\"match:0.9463\",\"a b\",\"x a b\");\n assertMetrics(\"match:0.1296\",\"a b\",\"a x x x x x x x x x x x x x x x x x x x x x x b\");\n assertMetrics(\"match:0.1288\",\"a b\",\"a x x x x x x x x x x x x x x x x x x x x x x x x x x x b\");\n\n assertMetrics(\"match:0.8647\",\"a b c\",\"x x a x b x x x x x x x x a b c x x x x x x x x c x x\");\n assertMetrics(\"match:0.861\", \"a b c\",\"x x a x b x x x x x x x x x x a b c x x x x x x c x x\");\n assertMetrics(\"match:0.4869\",\"a b c\",\"a b x x x x x x x x x x x x x x x x x x x x x x c x x\");\n assertMetrics(\"match:0.4853\",\"a b c\",\"x x a x b x x x x x x x x x x b a c x x x x x x c x x\");\n assertMetrics(\"match:0.3621\",\"a b c\",\"a x b x x x x x x x x x x x x x x x x x x x x x c x x\");\n assertMetrics(\"match:0.3619\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x x x x x x c x x\");\n assertMetrics(\"match:0.3584\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x x x x x x x x c\");\n assertMetrics(\"match:0.3474\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x b x x x b x b x\");\n assertMetrics(\"match:0.3421\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x x x x x x x x x\");\n assertMetrics(\"match:0.305\" ,\"a b c\",\"x x a x b:0.7 x x x x x x x x x x x x x x x x x x x x x x\");\n assertMetrics(\"match:0.2927\",\"a b!200 c\",\"x x a x b:0.7 x x x x x x x x x x x x x x x x x x x x x x\");\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "private ArrayList<int[]> findSuggestedTransitions(char[] pattern, double allowWorseProbability) {\n ArrayList<int[]> validtransitions=new ArrayList<int[]>();\n double patternscore=getMatchScore(pattern);\n double targetscore=minMatch+(maxMatch-minMatch)/2; // target score is midway between min and max\n for (int i=0;i<pattern.length;i++) { // for each position\n for (int j=0;j<4;j++) {\n double newscore=patternscore+transitions[i][j];\n boolean isbetter=(Math.abs(newscore-targetscore)<Math.abs(patternscore -targetscore));\n if (isbetter || Math.random()<allowWorseProbability) {\n validtransitions.add(new int[]{i,j});\n }\n }\n }\n return validtransitions;\n }", "public static int getRandomTask() {\n double p = rand.nextDouble(); // required probs given in Question\n for (int i = 0; i < 6; i++) {\n if (p <= prob[i])\n return i;\n }\n return 1;\n }", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "public int searchTweetsKMP(String pattern, List<String> ans) {\n int compCost = 0;\n Assoc<Integer, Integer> holder;\n\n int[] flinks = new int[pattern.length() + 1];\n int flinkcost = StringMatch.buildKMP(pattern, flinks);\n compCost = flinkcost;\n\n for(String tweet : tweets) {\n\n //holder = StringMatch.matchKMP(pattern, tweet);\n holder = StringMatch.matchKMP(pattern.toLowerCase(), tweet.toLowerCase());\n compCost += holder.value - flinkcost;\n\n if(holder.key != -1)\n ans.add(tweet);\n }\n return compCost;\n }", "static void p(String s, int probNumber)\r\n\t{\r\n\t\tif (probNumber >= minProbNumber && probNumber <= maxProbNumber)\r\n\t\t\tSystem.out.println(probNumber + \": \" + s);\r\n\t}", "private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }", "float getMatch();", "public static double exact(double mu, double lambda, double bl, MSAPoset msa)\n { \n LinearizedAlignment linearizedMSA = new LinearizedAlignment(msa);\n PIPTreeNode root = PIPTreeNode.nextUnlabelled();\n PIPTreeNode \n n1 = PIPTreeNode.withLabel(PIPMain.ta.toString()),\n n2 = PIPTreeNode.withLabel(PIPMain.tb.toString());\n UndirectedGraph<PIPTreeNode, UnorderedPair<PIPTreeNode,PIPTreeNode>> topo = GraphUtils.newUndirectedGraph();\n topo.addVertex(n1);\n topo.addVertex(n2);\n topo.addVertex(root);\n topo.addEdge(n1, root);\n topo.addEdge(n2, root);\n Map<UnorderedPair<PIPTreeNode,PIPTreeNode>, Double> bls = Maps.newLinkedHashMap();\n bls.put(UnorderedPair.of(n1, root), fraction * bl);\n bls.put(UnorderedPair.of(n2, root), (1.0-fraction)*bl);\n \n double [][] trivialRateMtx = new double[][]{{1}};\n Indexer<Character> trivialIndex = new Indexer<Character>();\n trivialIndex.addToIndex(PIPProcess.star);\n \n PoissonParameters poissonParams = new PoissonParameters(trivialIndex, trivialRateMtx, lambda, mu);\n \n PIPLikelihoodCalculator calculator = new PIPLikelihoodCalculator(poissonParams, linearizedMSA, topo, bls, root);\n double logJoint = calculator.computeDataLogProbabilityGivenTree(); \n \n double statRate = lambda / mu;\n PoissonDistribution pd = new PoissonDistribution(statRate);\n double logPrior = Math.log(pd.probability(msa.sequences().get(PIPMain.ta).length()));\n return logJoint - logPrior;\n }", "public boolean generateFromPattern(Decision decision, int matchingMethod){\r\n \t\tboolean isCompleted = false;\r\n \t\tif(getPatternID() != -1){\r\n \t\t\tPattern pattern = new Pattern();\r\n \t\t\tpattern.fromDatabase(this.getPatternID());\r\n \t\t\tsetDescription(\"This alternative is generated on the basis of pattern \" + pattern.getName());\r\n \t\t\tsetStatus(AlternativeStatus.ATISSUE);\r\n \t\t\tsetParent(decision);\r\n \r\n \t\t\ttoDatabase(decision.getID(), RationaleElementType.DECISION);\r\n \t\t\tfromDatabase(getName());\r\n \t\t\tif(pattern.getOntEntries()!=null && pattern.getOntEntries().size() != 0){\r\n \t\t\t\tRationaleDB db = RationaleDB.getHandle();\r\n \t\t\t\tVector<Requirement> nfrs = db.getNFRs();\r\n \r\n \t\t\t\tfor(int i=0; i<pattern.getOntEntries().size(); i++){\r\n \t\t\t\t\tOntEntry oe = pattern.getOntEntries().get(i);\r\n \t\t\t\t\t//whether satisfied by this pattern\r\n \t\t\t\t\t//matchingMethod == 2 is the \"not\" matching method.\r\n \t\t\t\t\tif(matchingMethod != 2){\r\n \t\t\t\t\t\tboolean isMatched = false;\r\n \t\t\t\t\t\tArrayList<Requirement> matchedRequirements = new ArrayList<Requirement>();\r\n \t\t\t\t\t\tfor (int k=0; k<nfrs.size(); k++){\r\n \t\t\t\t\t\t\t//matchingMethod == 0 is exact matching method\r\n \t\t\t\t\t\t\tif(matchingMethod == 0){\r\n \t\t\t\t\t\t\t\tif(nfrs.get(k).getOntology().getName().equals(oe.getName())){\r\n \t\t\t\t\t\t\t\t\tisMatched = true;\r\n \t\t\t\t\t\t\t\t\tmatchedRequirements.add(nfrs.get(k));\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//matchingMethod == 1 is the contribution matching method\r\n \t\t\t\t\t\t\telse if(matchingMethod == 1){\r\n \t\t\t\t\t\t\t\tVector<OntEntry> ontList = db.getOntologyElements(oe.getName());\r\n \t\t\t\t\t\t\t\tEnumeration<OntEntry> ontChildren = ontList.elements();\r\n \t\t\t\t\t\t\t\twhile (ontChildren.hasMoreElements()){\r\n \t\t\t\t\t\t\t\t\tOntEntry ont = (OntEntry)ontChildren.nextElement();\r\n \t\t\t\t\t\t\t\t\tif(ont.getName().compareTo(nfrs.get(k).getOntology().getName()) == 0){\r\n \t\t\t\t\t\t\t\t\t\tisMatched = true;\r\n \t\t\t\t\t\t\t\t\t\tmatchedRequirements.add(nfrs.get(k));\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif(isMatched && matchedRequirements.size() != 0){\r\n \t\t\t\t\t\t\tfor(Requirement matchedR: matchedRequirements){\r\n \t\t\t\t\t\t\t\tArgument argu = new Argument();\r\n \t\t\t\t\t\t\t\tString arguName = \"\";\r\n \t\t\t\t\t\t\t\tif(pattern.getPosiOnts().contains(oe)){\r\n \t\t\t\t\t\t\t\t\targuName = \"Requirement Satisfaction - \" + oe.getName();\r\n \t\t\t\t\t\t\t\t\targu.setType(ArgType.SATISFIES);\r\n \r\n \t\t\t\t\t\t\t\t}else{\r\n \t\t\t\t\t\t\t\t\targuName = \"Requirement Violation - \" + oe.getName();\r\n \t\t\t\t\t\t\t\t\targu.setType(ArgType.VIOLATES);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\twhile(RationaleDBUtil.isExist(arguName, \"Arguments\")){\r\n \t\t\t\t\t\t\t\t\targuName = arguName + \"~\";\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\targu.setName(arguName);\r\n \t\t\t\t\t\t\t\targu.setRequirement(matchedR);\r\n \t\t\t\t\t\t\t\targu.setPlausibility(Plausibility.CERTAIN);\r\n \t\t\t\t\t\t\t\targu.setDescription(\"\");\r\n \t\t\t\t\t\t\t\targu.setAmount(10);\r\n \t\t\t\t\t\t\t\targu.setImportance(Importance.ESSENTIAL);\r\n \t\t\t\t\t\t\t\targu.setParent(this);\r\n \r\n \t\t\t\t\t\t\t\targu.toDatabase(this.getID(), RationaleElementType.ALTERNATIVE);\r\n \t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t}else{\r\n \t\t\t\t\t\t\tArgument argu = new Argument();\r\n \t\t\t\t\t\t\tClaim claim = new Claim();\r\n \t\t\t\t\t\t\tString claimName = \"\";\r\n \t\t\t\t\t\t\tif(pattern.getPosiOnts().contains(oe)){\r\n \t\t\t\t\t\t\t\tclaimName = \"Positive Quality Attribute - \" + oe.getName();\r\n \t\t\t\t\t\t\t\tclaim.setDirection(Direction.IS);\r\n \t\t\t\t\t\t\t\targu.setType(ArgType.SUPPORTS);\r\n \t\t\t\t\t\t\t}else{\r\n \t\t\t\t\t\t\t\tclaimName = \"Negative Quality Attribute - \" + oe.getName();\r\n \t\t\t\t\t\t\t\tclaim.setDirection(Direction.NOT);\r\n \t\t\t\t\t\t\t\targu.setType(ArgType.DENIES);\r\n \t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\twhile(RationaleDBUtil.isExist(claimName, \"Claims\")){\r\n \t\t\t\t\t\t\t\tclaimName = claimName + \"~\";\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tclaim.setName(claimName);\r\n \r\n \t\t\t\t\t\t\tclaim.setImportance(Importance.DEFAULT);\r\n \t\t\t\t\t\t\tclaim.setOntology(oe);\r\n \t\t\t\t\t\t\tclaim.setEnabled(true);\r\n \t\t\t\t\t\t\tclaim.toDatabase();\r\n \r\n \t\t\t\t\t\t\targu.setClaim(claim);\r\n \t\t\t\t\t\t\twhile(RationaleDBUtil.isExist(claimName, \"Arguments\")){\r\n \t\t\t\t\t\t\t\tclaimName = claimName + \"~\";\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\targu.setName(claimName);\r\n \t\t\t\t\t\t\targu.setPlausibility(Plausibility.HIGH);\r\n \t\t\t\t\t\t\targu.setDescription(\"\");\r\n \t\t\t\t\t\t\targu.setAmount(5);\r\n \t\t\t\t\t\t\targu.setImportance(Importance.DEFAULT);\r\n \t\t\t\t\t\t\targu.setParent(this);\r\n \r\n \t\t\t\t\t\t\targu.toDatabase(this.getID(), RationaleElementType.ALTERNATIVE);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}else{\r\n \t\t\t\t\t\t//no matching, arguments only\r\n \t\t\t\t\t\tArgument argu = new Argument();\r\n \t\t\t\t\t\tClaim claim = new Claim();\r\n \t\t\t\t\t\tString claimName = \"\";\r\n \t\t\t\t\t\tif(pattern.getPosiOnts().contains(oe)){\r\n \t\t\t\t\t\t\tclaimName = \"Positive Quality Attribute - \" + oe.getName();\r\n \t\t\t\t\t\t\tclaim.setDirection(Direction.IS);\r\n \t\t\t\t\t\t\targu.setType(ArgType.SUPPORTS);\r\n \t\t\t\t\t\t}else{\r\n \t\t\t\t\t\t\tclaimName = \"Negative Quality Attribute - \" + oe.getName();\r\n \t\t\t\t\t\t\tclaim.setDirection(Direction.NOT);\r\n \t\t\t\t\t\t\targu.setType(ArgType.DENIES);\r\n \t\t\t\t\t\t}\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\twhile(RationaleDBUtil.isExist(claimName, \"Claims\")){\r\n \t\t\t\t\t\t\tclaimName = claimName + \"~\";\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tclaim.setName(claimName);\r\n \r\n \t\t\t\t\t\tclaim.setImportance(Importance.ESSENTIAL);\r\n \t\t\t\t\t\tclaim.setOntology(oe);\r\n \t\t\t\t\t\tclaim.setEnabled(true);\r\n \t\t\t\t\t\tclaim.toDatabase();\r\n \r\n \t\t\t\t\t\targu.setClaim(claim);\r\n \r\n \t\t\t\t\t\twhile(RationaleDBUtil.isExist(claimName, \"Arguments\")){\r\n \t\t\t\t\t\t\tclaimName = claimName + \"~\";\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\targu.setName(claimName);\r\n \t\t\t\t\t\targu.setPlausibility(Plausibility.HIGH);\r\n \t\t\t\t\t\targu.setDescription(\"\");\r\n \t\t\t\t\t\targu.setAmount(5);\r\n \t\t\t\t\t\targu.setImportance(Importance.ESSENTIAL);\r\n \t\t\t\t\t\targu.setParent(this);\r\n \r\n \t\t\t\t\t\targu.toDatabase(this.getID(), RationaleElementType.ALTERNATIVE);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \r\n \t\t\tisCompleted = true;\r\n \t\t\tthis.fromDatabase(this.name);\r\n \t\t\tthis.evaluate(true);\r\n \t\t\tthis.fromDatabase(this.name);\r\n \t\t}\r\n \r\n \t\treturn isCompleted;\r\n \t}", "private float matchingDegree(OntologyResult match) {\n switch (match) {\n case Exact:\n return 1.0f;\n case Subsumption:\n return 0.8f;\n case PlugIn:\n return 0.6f;\n case Structural:\n return 0.5f;\n case NotMatched:\n return 0.0f;\n default:\n return 0.0f;\n }\n }", "public double outcomeGivenPathProb(char[] outcome, S[] path) {\r\n\t\t// initialize probability to 1\r\n\t\tdouble prob = 1;\r\n\t\t// loop over all emitted chars\r\n\t\tfor (int i = 0; i < outcome.length; ++i)\r\n\t\t\t// multiple probability by the emission probability of this char\r\n\t\t\tprob *= emissProb(indexOf(states, path[i]), outcome[i]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}", "public String CPUDepartProb()\r\n\t{\r\n\t\tdouble prob = Math.random();\r\n\t\t//System.out.println(\"prob: \" + prob);\r\n\t\t\r\n\t\tif(prob<=0.5) //0.5 chance\r\n\t\t{\r\n\t\t\treturn (\"Leave system\");\r\n\t\t}\r\n\t\telse if(prob>0.5 && prob<=(0.5+0.1)) //0.1 chance\r\n\t\t{\r\n\t\t\treturn (\"To Disk\");\r\n\t\t}\r\n\t\telse\t//0.4 chance\r\n\t\t{\r\n\t\t\treturn (\"To network\");\r\n\t\t}\r\n\t}", "double getCritChance();", "public int match(Phrase phrase) {\n\n\t\t/*\n\t\t * A phrase can have multiple tags to start matching from, for example:\n\t\t * \t\tOutline: {FRACTION/null} {TIME_CHANGE/null}\t\t\tExpecting: \"do something at quarter after\"\n\t\t * \t\tPhrase: \"Do half by homework at quarter after\"\n\t\t * \n\t\t * The matcher will work off of the {FRACTION/half} tag, resulting on zero confidence, as the\n\t\t * following tag is not a TIME_CHANGE tag.\n\t\t * \n\t\t * To combat this, a list is made of all tags in the phrase with the correct starting type (and value if\n\t\t * applicable). For each starting tag, a new List<Tag> is made of it and the tags following, and each of\n\t\t * them are sent to the matcher. The starting tag with the highest confidence is selected as the correct\n\t\t * one, and this confidence is returned, completing the process.\n\t\t */\n\n\t\t// tags in phrase\n\t\tList<Tag> phraseTags = phrase.getTags();\n\n\t\t// find all potential starting tags\n\t\tList<List<Tag>> potentialMatchers = new ArrayList<>();\n\t\tfor (Tag t : phraseTags) {\n\t\t\tTag outlineTag = mandatoryTags.get(0);\n\t\t\tif (tagsMatch(outlineTag, t)) {\n\t\t\t\tint startIndex = phraseTags.indexOf(t);\n\t\t\t\tint endIndex = phraseTags.size();\n\t\t\t\tList<Tag> potentialMatcher = phraseTags.subList(startIndex, endIndex);\n\t\t\t\tpotentialMatchers.add(potentialMatcher);\n\t\t\t}\n\t\t}\n\n\t\tint confidence = 0;\n\n\t\t// check each potential starting tag, keeping the one with the highest confidence\n\t\tfor (List<Tag> potentialMatcher : potentialMatchers) {\n\n\t\t\tint currentConfidence = getConfidence(potentialMatcher);\n\t\t\tif (currentConfidence > confidence)\n\t\t\t\tconfidence = currentConfidence;\n\t\t}\n\n\t\treturn confidence;\n\t}", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "public int searchTweetsBoyerMoore(String pattern, List<String> ans) {\n int compCost = 0;\n Assoc<Integer, Integer> holder;\n\n for(String tweet : tweets) {\n\n holder = StringMatch.matchBoyerMoore(pattern.toLowerCase(), tweet.toLowerCase());\n compCost += holder.value;\n\n if(holder.key != -1)\n ans.add(tweet);\n }\n return compCost;\n\n }", "@Test\n public void testSignificance() {\n assertMetrics(\"significance:1\", \"a\",\"a\");\n assertMetrics(\"significance:0\", \"a\",\"x\");\n assertMetrics(\"significance:0.3333\",\"a a a\",\"a\");\n assertMetrics(\"significance:1\", \"a\",\"a a a\");\n assertMetrics(\"significance:1\", \"a b c\",\"a b c\");\n assertMetrics(\"significance:1\", \"a b c\",\"x x a b x a x c x x a b x c c x\");\n\n assertMetrics(\"significance:0.3333\",\"a b c\",\"a\");\n assertMetrics(\"significance:0.6667\",\"a b c\",\"a b\");\n\n assertMetrics(\"significance:1\", \"a b c%0.2\",\"a b c\"); // Best\n assertMetrics(\"significance:0.75\",\"a b c%0.2\",\"b c\"); // Middle\n assertMetrics(\"significance:0.5\", \"a b c%0.2\",\"a b\"); // Worst\n\n assertMetrics(\"significance:1\",\"a%0.3 b c%0.2\",\"a b c\"); // Best too\n\n assertMetrics(\"significance:1\", \"a b c%0.05\",\"a b c\"); // Best\n assertMetrics(\"significance:0.6\",\"a b c%0.05\",\"b c\"); // Worse\n assertMetrics(\"significance:0.4\",\"a b c%0.05\",\"b\"); // Worse\n assertMetrics(\"significance:0.2\",\"a b c%0.05\",\"c\"); // Worst\n assertMetrics(\"significance:0.8\",\"a b c%0.05\",\"a b\"); // Middle\n\n assertMetrics(\"significance:1\", \"a b c%0\",\"a b c\"); // Best\n assertMetrics(\"significance:0.5\",\"a b c%0\",\"b c\"); // Worst\n assertMetrics(\"significance:1\", \"a b c%0\",\"a b\"); // As good as best\n assertMetrics(\"significance:0\", \"a b c%0\",\"c\"); // No contribution\n\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"a b\");\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"\");\n\n // The query also has other terms having a total significance of 0.3\n // so we add a significance parameter which is the sum of the significances of this query terms + 0.3\n assertMetrics(\"significance:0.25\", \"a\",\"a\",0.4f);\n assertMetrics(\"significance:0\", \"y\",\"a\",0.4f);\n assertMetrics(\"significance:0.1667\",\"a a a\",\"a\",0.6f);\n assertMetrics(\"significance:0.25\", \"a\",\"a a a\",0.4f);\n assertMetrics(\"significance:0.5\", \"a b c\",\"a b c\",0.6f);\n assertMetrics(\"significance:0.5\", \"a b c\",\"x x a b x a x c x x a b x c c x\",0.6f);\n\n assertMetrics(\"significance:0.1667\",\"a b c\",\"a\",0.6f);\n assertMetrics(\"significance:0.3333\",\"a b c\",\"a b\",0.6f);\n\n assertMetrics(\"significance:0.5714\",\"a b c%0.2\",\"a b c\",0.7f); // Best\n assertMetrics(\"significance:0.4286\",\"a b c%0.2\",\"b c\",0.7f); // Middle\n assertMetrics(\"significance:0.2857\",\"a b c%0.2\",\"a b\",0.7f); // Worst\n\n assertMetrics(\"significance:0.6667\",\"a%0.3 b c%0.2\",\"a b c\",0.9f); // Better than best\n\n assertMetrics(\"significance:0.4545\",\"a b c%0.05\",\"a b c\",0.55f); // Best\n assertMetrics(\"significance:0.2727\",\"a b c%0.05\",\"b c\",0.55f); // Worse\n assertMetrics(\"significance:0.1818\",\"a b c%0.05\",\"b\",0.55f); // Worse\n assertMetrics(\"significance:0.0909\",\"a b c%0.05\",\"c\",0.55f); // Worst\n assertMetrics(\"significance:0.3636\",\"a b c%0.05\",\"a b\",0.55f); // Middle\n\n assertMetrics(\"significance:0.4\",\"a b c%0\",\"a b c\",0.5f); // Best\n assertMetrics(\"significance:0.2\",\"a b c%0\",\"b c\",0.5f); // Worst\n assertMetrics(\"significance:0.4\",\"a b c%0\",\"a b\",0.5f); // As good as best\n assertMetrics(\"significance:0\", \"a b c%0\",\"c\",0.5f); // No contribution\n\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"a b\",0.3f);\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"\",0.3f);\n }", "private void fillConditionalProb(\tfloat[] conditionalTable,\r\n\t\t\t\t\t\t\t\t\t\tFile trainDir) \r\n\t{\r\n\t\t// Let nCharLanguage be the total number of characters (including \r\n\t\t// multiple occurrences of the same unique character, including spaces) \r\n\t\t// contained in all training documents, \r\n\t\t// For each of the 27 unique characters, ci, compute conditional prob:\r\n\t\t// P(ci | Language) = countLanguage(ci) / nCharLanguage,\r\n\t\t// where countLetter(ci) is the number of times character ci occurs \r\n\t\t// in all documents in the training set. \r\n\t\t\r\n\t\t// GET OVERALL COUNT OF ALL LETTERS IN THIS TRAINING DIRECTORY\r\n\t\tfloat nCharLanguage = (float) getTotalLetters(trainDir);\r\n\t\t\t\t\r\n\t\t// FILL IN THE CONDITIONAL TABLE\r\n\t\tfor(int i = 0; i < 26; i++){\r\n\t\t\tchar currentLetter = (char) ('a' + i);\r\n\t\t\tconditionalTable[i] = \r\n\t\t\t\t\tcountLetter(currentLetter, trainDir) / nCharLanguage;\r\n\t\t}\r\n\t\tconditionalTable[26] = \r\n\t\t\t\tcountLetter(' ', trainDir) / nCharLanguage;\r\n\t}", "private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }", "double getMissChance();", "private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}", "private static void findBigramProbTuring() {\n\t\t\t\t\n\t\tbigramProbT= new HashMap<String, Double>();\n\t\tdouble prob;\n\t\t\n\t\tfor(String s: corpusBigramCount.keySet()){\n\t\t\tint count=corpusBigramCount.get(s);\n\t\t\tif(count==0){\n\t\t\t\tprob= bucketCountT.getOrDefault(1,0.0)/corpusNumOfBigrams;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprob= bigramCountTI.get(count)/corpusNumOfBigrams;\n\t\t\tbigramProbT.put(s, prob);\n\t\t}\n\t\t\t\n\t}", "static char mutateBaseWithProb(char base, double p)\n\t{\n\t\tif(rand.nextDouble() < p)\n\t\t{\n\t\t\tint baseAsInt = baseToInt(base);\n\t\t\tchar newBase = intToBase((baseAsInt + rand.nextInt(3) + 1)%4);\n\t\t\tif(Character.isLowerCase(base))\n\t\t\t{\n\t\t\t\tnewBase += 'a' - 'A';\n\t\t\t}\n\t\t\treturn newBase;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn base;\n\t\t}\n\t}", "@Test\n public void testP() {\n System.out.println(\"p\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(0.027, instance.p(0), 1E-7);\n assertEquals(0.0567, instance.p(1), 1E-7);\n assertEquals(0.07938, instance.p(2), 1E-7);\n assertEquals(0.09261, instance.p(3), 1E-7);\n assertEquals(0.05033709, instance.p(10), 1E-7);\n }", "public static boolean chance(int prob) {\n Random random = new Random();\n return random.nextInt(prob) == 1;\n // Do I really need to explain this??\n }", "public void acquireProbabilities(final String string) {\n if(string.length() >= 2) {\n char previousChar;\n char currentchar;\n char nextChar;\n String key;\n String value;\n\n for(int i = 1 ; i < string.length() - 1 ; i++) {\n previousChar = string.charAt(i - 1);\n currentchar = string.charAt(i);\n nextChar = string.charAt(i + 1);\n\n key = String.valueOf(previousChar) + String.valueOf(currentchar);\n value = String.valueOf(nextChar);\n\n if(! sequences.contains(key)) {\n sequences.add(key);\n }\n\n if(! sequenceProbabilities.containsKey(key)) {\n sequenceProbabilities.put(key, new HashMap<>());\n }\n\n if(! sequenceProbabilities.get(key).containsKey(value)) {\n sequenceProbabilities.get(key).put(value, 1);\n } else {\n Integer probability = sequenceProbabilities.get(key).get(value);\n probability++;\n sequenceProbabilities.get(key).put(value, probability);\n }\n }\n }\n }", "@Test(timeout = TIMEOUT)\n public void boyerMoore() {\n assertEquals(ans, PatternMatching.boyerMoore(pattern, text, comparator));\n assertTrue(comparator.getComparisonCount() != 0);\n assertEquals(11, comparator.getComparisonCount());\n\n comparator.clear();\n\n /*\n pattern: aaba\n text: aabaacaadaabaaba\n */\n assertEquals(ans1, PatternMatching.boyerMoore(pattern1, text1, comparator));\n assertTrue(comparator.getComparisonCount() != 0);\n assertEquals(20, comparator.getComparisonCount());\n\n comparator.clear();\n\n /*\n No match case\n pattern: aabcaabd\n text: aabaacaadaabaaba\n */\n assertEquals(empty, PatternMatching.boyerMoore(wrong, text1, comparator));\n assertTrue(comparator.getComparisonCount() != 0);\n assertEquals(6, comparator.getComparisonCount());\n\n comparator.clear();\n\n /*\n Longer text\n */\n assertEquals(empty, PatternMatching.boyerMoore(text, pattern, comparator));\n assertEquals(0, comparator.getComparisonCount());\n }", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}", "public static double probabilityTwoSixes() {\n int count = 0;\n int amount = 0;\n for (int i = 0; i < 10000; i++) {\n amount = 0;\n for (int j = 0; j < 12; j++) {\n if ((int) (Math.random() * 6) + 1 == 6)\n amount++;\n if (amount == 2) {\n count++;\n break; }\n }\n }\n return ((double) count / (double) 10000) * 100;\n }", "public double getProb(double value) {\n checkHasParams();\n if (value < 0) {\n return 0;\n } else {\n return (lambda * Math.exp((-lambda) * value));\n }\n }", "public int patternScore(Vector concept_list, Vector all_concepts,\n Vector entity_list, Vector non_entity_list)\n {\n int score = 0;\n return score;\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.m_minWordP = (-988.56143);\n double double0 = naiveBayesMultinomialText0.getMinWordFrequency();\n assertEquals((-988.56143), double0, 0.01);\n }", "public int searchTweetsNaive(String pattern, List<String> ans) {\n int compCost = 0;\n Assoc<Integer, Integer> holder;\n\n for(String tweet : tweets) {\n\n holder = StringMatch.matchNaive(pattern.toLowerCase(), tweet.toLowerCase());\n compCost += holder.value;\n\n if(holder.key != -1)\n ans.add(tweet);\n }\n return compCost;\n }", "public float getChance()\n {\n return 1.0f;\n }", "@Test(timeout = 4000)\n public void test63() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setPeriodicPruning(4);\n StringKernel stringKernel0 = new StringKernel();\n naiveBayesMultinomialText0.m_minWordP = (double) 0;\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertEquals(4, naiveBayesMultinomialText0.getPeriodicPruning());\n }", "public void generatePriority() {\n\t\tpriority = .25 * frequency + .25 * age + .25 * links + .25 * money;\n\t}", "public boolean isHappening(int probability){\n return r.nextDouble() <= probability / 100.0;\n }", "public static double probabilityThreeSixes() {\n int count = 0;\n int amount = 0;\n for (int i = 0; i < 10000; i++) {\n amount = 0;\n for (int j = 0; j < 18; j++) {\n if ((int) (Math.random() * 6) + 1 == 6)\n amount++;\n if (amount == 3) {\n count++;\n break; }\n }\n }\n return ((double) count / (double) 10000) * 100;\n }", "private void genRegularPattern(float ratioInh, float ratioAct) {\n layoutPanel.inhNList.clear();\n layoutPanel.activeNList.clear();\n float ratio = ratioInh + ratioAct;\n if (ratio == 0) {\n return;\n }\n\n if (ratioInh == 0) {\n layoutPanel.activeNList = getRegularPointsIndex(ratioAct);\n return;\n } else if (ratioAct == 0) {\n layoutPanel.inhNList = getRegularPointsIndex(ratioInh);\n return;\n }\n\n // ratioInh != 0 && ratioAct != 0\n layoutPanel.activeNList = getRegularPointsIndex(ratioAct);\n layoutPanel.inhNList = getRegularPointsIndex(ratioInh);\n\n findLargestNNIPointsIndexPair(ratioInh, ratioAct);\n }", "public double getProbability() {\n return probability;\n }", "@Test\n public void genNeighStateProbability() {\n double[] metrics = new double[STATES.length * STATES.length];\n double sum = 0;\n Random rand = new Random();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (x == y) {\n metrics[i] = 0;\n } else {\n double d = Math.abs(rand.nextGaussian());//Math.exp(-Math.abs(STATES[x] - STATES[y]) / 3) * Math.abs(rand.nextGaussian());\n metrics[i] = d;\n sum += d;\n }\n }\n final double finalSum = sum;\n metrics = DoubleStream.of(metrics).map(d -> d / finalSum).toArray();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (metrics[i] > 0.01) {\n System.out.printf(\"%d:%d:%.4f\\n\", STATES[x], STATES[y], metrics[i]);\n }\n }\n }", "private void genProb() {\n\t\tint row;\n\t\tint column;\n\t\tint removed1;\n\t\tint removed2;\n\n\t\tfor (int i = 0; i < DIFFICULTY / 2;) {\n\t\t\trow = rand.nextInt(9);\n\t\t\tcolumn = rand.nextInt(9);\n\t\t\twhile (problem[row][column] == 0 || (row == 4 && column == 4)) {\n\t\t\t\trow = rand.nextInt(9);\n\t\t\t\tcolumn = rand.nextInt(9);\n\t\t\t}\n\n\t\t\t// Clearing random boxes.\n\t\t\tremoved1 = problem[row][column];\n\t\t\tremoved2 = problem[8 - row][8 - column];\n\t\t\tproblem[row][column] = 0;\n\t\t\tproblem[8 - row][8 - column] = 0;\n\n\t\t\tcopy(problem, comp);\n\n\t\t\tif (!solve(0, 0, 0, comp)) { // Case of unsolvable.\n\t\t\t\t// Putting back original values.\n\t\t\t\tproblem[row][column] = removed1;\n\t\t\t\tproblem[8 - row][8 - column] = removed2;\n\t\t\t} else {\n\t\t\t\tif (unique()) { // Case of solution is unique.\n\t\t\t\t\ti++;\n\t\t\t\t} else { // Case of solution is not unique.\n\t\t\t\t\t// Putting back original values.\n\t\t\t\t\tproblem[row][column] = removed1;\n\t\t\t\t\tproblem[8 - row][8 - column] = removed2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void checkUpdateProbabilityOnHORNRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r2))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t*/\r\n\t\t\t\telse\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t//if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r3))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\t\tif(new_r3 < r3)\r\n\t\t\t\t\t\t\tupdate++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "public void progressInfectionProbV2(int probability){\n int recoveryProb = 0;\n recoveryProb = daysInfected * probability;\n int recov = rand.nextInt(100);\n if (recov < recoveryProb) {\n //recover\n nextState = States.RecoveredVirus2;\n immuneV2 = true;\n } else daysInfected++;\n }", "@Test\n public void testNpara() {\n System.out.println(\"npara\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(2, instance.npara());\n }", "public int getScore(Set<Pattern> patterns) {\n\t\tint score = 0;\n\t\tfor (Pattern p : patterns) {\n\t if (p instanceof PairPattern) {\n\t \tscore += 1;\n\t \tcontinue;\n\t }\n\t if (p instanceof UnicornPattern || p instanceof FalconPattern) {\n\t \tscore += 2;\n\t }\n\t\t}\n\t\treturn score;\n\t}", "private double p_l(Label label) {\n\t\t// TODO : Implement\n\t\t// Calculate the probability for the label. No smoothing here.\n\t\t// Just the number of label counts divided by the number of documents.\n\t\tint total = docCount.get(Label.POSITIVE)+docCount.get(Label.NEGATIVE);\n\t\t\n\t\t\n\t\tif(label.equals(Label.POSITIVE))\n\t\t\treturn ((double)(docCount.get(Label.POSITIVE)))/((double)(total));\n\t\telse\n\t\t\treturn ((double)(docCount.get(Label.NEGATIVE)))/((double)(total));\n\t}", "public double compare(Pattern p) {\n\t\tdouble[][] dtwMatrix = new double[length][p.length];\n\n\t\tfor (int i=0; i<length; i++) {\n\t\t\tfor (int j=0; j<p.length; j++) {\n\t\t\t\tdouble[] scores = new double[3];\n\n\t\t\t\tdouble cost = compareFrames(i, p, j)[0];\n\t\t\t\t\n\t\t\t\tif (i > 0 && j > 0)\n\t\t\t\t\tscores[0] = cost + dtwMatrix[i-1][j-1];\n\t\t\t\telse\n\t\t\t\t\tscores[0] = -1;\n\n\t\t\t\tif (i > 0)\n\t\t\t\t\tscores[1] = cost + dtwMatrix[i-1][j];\n\t\t\t\telse\n\t\t\t\t\tscores[1] = -1;\n\n\t\t\t\tif (j > 0)\n\t\t\t\t\tscores[2] = cost + dtwMatrix[i][j-1];\n\t\t\t\telse\n\t\t\t\t\tscores[2] = -1;\n\n\t\t\t\tdouble min = dtwMin(scores);\n\n\t\t\t\tif (min == -1) //must be top left cell\n\t\t\t\t\tdtwMatrix[i][j] = cost;\n\t\t\t\telse\n\t\t\t\t\tdtwMatrix[i][j] = min;\n\t\t\t}\n\t\t}\n\n\t\treturn dtwMatrix[length - 1][p.length - 1];\n\t}", "public static double probabilityOneSix() {\n int count = 0;\n for (int j = 0; j < 10000; j++) {\n for (int i = 0; i < 6; i++) {\n if ((int) (Math.random() * 6) + 1 == 6) {\n count++;\n break; } }\n }\n return ((double) count / (double) 10000) * 100;\n }", "public int fetchDisplacementValue(Problem prob)\n\t\t{\n\t\t\tdouble moveSample = rng.nextDouble();\n\t\t\tint displacement = 1;\n\t\t\tdouble totalProb = 0;\n\n\t\t\tfor (int p = 0; p <= prob.moveProbs.length; p++) {\n\t\t\t\ttotalProb += prob.moveProbs[p];\n\t\t\t\tif (moveSample <= totalProb) {\n\t\t\t\t\tdisplacement = p+1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn displacement;\n\t\t}", "double match(CodeBlock elemento,MatchingProfile perfil) {\n double max = 0,diff = 0,uno,dos,val;\n int i;\n for (i = 43;--i >= 0;) {\n //for (i = 0;i < 43;++i) {\n val = perfil.atributos[i];\n uno = atributos[i]*val;\n dos = elemento.atributos[i]*val;\n if (uno>dos) {\n max += uno;\n diff += (uno-dos);\n }\n else {\n max += dos;\n diff += (dos-uno);\n }\n //System.out.println(campos[i]+\" \"+(maxact-diffact)+\"/\"+maxact);\n \n }\n if (max != 0)\n max = (max-diff)/max;\n //System.out.println(\"EMPAREJADO CON VALOR \"+match);\n //ArrayList<SCoincidencia> a = new ArrayList<SCoincidencia>();\n //a.add(new SCoincidencia(this,elemento,max,0));\n //return a;\n return max;\n //System.out.println(\"BLOQUE!\");\n }", "@Override\n\tpublic int predict(int[] ex) {\n\t\tdouble sum = 0.0; \n\t\tint prediction;\n\t\tfor (int currentRound = 0; currentRound < this.numberRounds; currentRound++){\n\t\t\tif (this.dSC[this.hypothesis[currentRound]].predict(ex) == 0)\n\t\t\t\tprediction = -1;\n\t\t\telse \n\t\t\t\tprediction = 1;\n\t\t\tsum += this.alpha[currentRound] * prediction; \n\t\t}\n\t\tif (sum > 0)\n\t\t\treturn 1;\n\t\treturn 0;\n\t}", "double getBranchProbability();", "public double tProbability(String f, String e){\n\t\tPair fe = new Pair(f,e);\n\t\t\n\t\tint V = 163303;\n\t\tif (t_table.containsKey(fe)){\n\t\t\t\n\t\t\treturn t_table.get(fe);\n\t\t}\n\t\telse{\n\t\t\tif (e.equals(\"null\"))\n\t\t\t\treturn nullEmissionProb;\n\t\t\telse\n\t\t\t\treturn 1.0/V;\n\t\t} \n\t}", "public double measurementProb(float[] measurement) {\r\n double prob = 1.0;\r\n for(int i=0;i<landmarks.length;i++) {\r\n float dist = (float) MathX.distance(x, y, landmarks[i].x, landmarks[i].y); \r\n prob *= MathX.Gaussian(dist, senseNoise, measurement[i]); \r\n } \r\n \r\n probability = prob;\r\n \r\n return prob;\r\n }", "public static ResultModel search(String text, String pattern) {\n long startTime = System.nanoTime();\n ResultModel Result = new ResultModel();\n String positionText = \"\";\n int Count = 0;\n // Write your code here\n int M = pattern.length(); \n int N = text.length(); \n int i, j; \n int p = 0; // hash value for pattern \n int t = 0; // hash value for txt \n int h = 1; \n \n // The value of h would be \"pow(d, M-1)%q\" \n for (i = 0; i < M-1; i++) {\n h = (h*d)%q; \n }\n // Calculate the hash value of pattern and first \n // window of text \n for (i = 0; i < M; i++) \n { \n p = (d*p + pattern.charAt(i))%q; \n t = (d*t + text.charAt(i))%q; \n\n\n } \n \n \n // Slide the pattern over text one by one \n for (i = 0; i <= N - M; i++) \n { \n \n // Check the hash values of current window of text \n // and pattern. If the hash values match then only \n // check for characters on by one \n if ( p == t ) \n { \n /* Check for characters one by one */\n for (j = 0; j < M; j++) \n { \n if (text.charAt(i+j) != pattern.charAt(j)) \n break; \n } \n \n // if p == t and pat[0...M-1] = txt[i, i+1, ...i+M-1] \n if (j == M) { \n \tCount ++;\n\t // return i\n\t if(positionText == \"\") {\n\t positionText += (i+ 1) + \"th\";\n\t }else {\n\t positionText = positionText + \", \" + (i+1) + \"th\";\n\t }\n }\n } \n \n // Calculate hash value for next window of text: Remove \n // leading digit, add trailing digit \n if ( i < N-M ) \n { \n\n t = (d*(t - text.charAt(i)*h) + text.charAt(i+M))%q; \n \n // We might get negative value of t, converting it \n // to positive \n if (t < 0) {\n\n t = (t + q); \n }\n \n } \n \n } \n\n //End of code\n\n long endTime = System.nanoTime();\n long totalTime = endTime - startTime;\n\n Result.setExecutionTime(TimeUnit.NANOSECONDS.toMillis(totalTime));\n Result.setFoundCount(Count);\n Result.setPosition(positionText);\n return Result;\n }", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "private void genProbes(int numProbes) {\n if (numProbes == 0) {\n return;\n }\n Dimension dim = layoutPanel.getLayoutSize();\n int height = dim.height;\n int width = dim.width;\n int size = height * width;\n float ratio = (float) numProbes / size;\n\n layoutPanel.probedNList = getRegularPointsIndex(ratio);\n }", "abstract double leftProbability();", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(\"The independent probability of a class\\n--------------------------------------\\nclass1\\t6.0\\nclass2\\t6.0\\nclass3\\t6.0\\nclass4\\t6.0\\n\\nThe probability of a word given the class\\n-----------------------------------------\\n\\tclass1\\tclass2\\tclass3\\tclass4\\t\\nover\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nthe\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nThe\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nquick\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nlazy\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\njumps\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nbrown\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t\\ndog\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nfox\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\n\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "public static void TestRegex()\n\t{\n\t String line = \" if( aaa&&(ypbreg))\";\n\t String pattern = \"(&&)\\\\s*\\\\(*\\\\s*!?ypbreg\\\\)*\";\n\t // Create a Pattern object\n\t Pattern r = Pattern.compile(pattern);\n\t System.out.println(line.contains(pattern));\n\t // Now create matcher object.\n\t Matcher m = r.matcher(line);\n\t if (m.find( )) {\n\t // System.out.println(\"Found value: \" + m.group(0) );\n\t int count = m.groupCount();\n\t System.out.println(\"group count is \"+count);\n\t for(int i=0;i<count;i++){\n\t System.out.println(m.group(i));\n\t }\n\t // System.out.println(line.replaceFirst(BregPattern.pEqualTrue1, \"!$1\"));\n\n\t } else {\n\t System.out.println(\"NO MATCH\");\n\t }\n\t}", "double getTransProb();", "public static void main(String[] args) {\n Pattern p = Pattern.compile(\"2*5?$\");\n Matcher m = p.matcher(regex1);\n if (m.matches()) {\n System.out.println(\"YES ¦ \");\n } else {\n System.out.println(\"NO\");\n }\n\n }", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats, String property,\n Comparator comp, PropertyValue value) {\n if (comp != EQ && comp != NEQ) {\n return 0.;\n }\n long overallCount = 0L;\n boolean found = false;\n for (TemporalElementStats stat : relevantStats) {\n overallCount += stat.getElementCount();\n if (stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n found = true;\n }\n }\n // property not sampled or not considered\n if (!found) {\n // not relevant/considered => simply return 0.5\n if (!isPropertyRelevant(property)) {\n return 0.5;\n } else {\n // not sampled => very rare or not even there => return very small value\n return 0.0001;\n }\n }\n\n double prob = 0.;\n for (TemporalElementStats stat : relevantStats) {\n if (!stat.getCategoricalSelectivityEstimation().containsKey(property)) {\n // not sampled ? ....\n double factor = 0.0001;\n // ...or just excluded/not relevant?\n if (!isPropertyRelevant(property)) {\n factor = 0.5;\n }\n prob += factor * ((double) stat.getElementCount() / overallCount);\n continue;\n }\n prob += stat.getCategoricalSelectivityEstimation()\n .get(property)\n .getOrDefault(value, 0.0001) *\n ((double) stat.getElementCount() / overallCount);\n }\n if (comp == EQ) {\n return prob;\n } else {\n //NEQ\n return 1 - prob;\n }\n }", "public boolean checkProbability(int N){\n\t\tboolean isProb = true;\n\t\tfor (int i = 1; i < a.length; i++){\n\t\t\tdouble sum = 0.0;\n\t\t\tfor (int j = 1; j < a[0].length; j++){\n\t\t\t\tsum += a[i][j][N];\n\t\t\t}\n\t\t\tSystem.out.println(\"sum \" + sum);\n\t\t\tif (sum != 1){\n\t\t\t\tSystem.out.println(\"not a probability\");\n\t\t\t\tisProb = false;\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Yessss\");\n\t\t\t}\n\t\t}\n\t\treturn isProb;\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testRECIPELP() {\n CuteNetlibCase.doTest(\"RECIPELP.SIF\", \"-266.616\", \"-104.818\", NumberContext.of(7, 4));\n }" ]
[ "0.633306", "0.6041309", "0.60172695", "0.5934357", "0.59096426", "0.584157", "0.5814425", "0.5604365", "0.55889493", "0.5583396", "0.5580006", "0.5543511", "0.5528656", "0.54956293", "0.5385844", "0.53711927", "0.5355374", "0.52905285", "0.5255228", "0.5247128", "0.5237424", "0.52342284", "0.52217346", "0.52039593", "0.5201052", "0.5179762", "0.517315", "0.5166549", "0.51279056", "0.5105073", "0.51008654", "0.5098835", "0.5087614", "0.50553674", "0.5053571", "0.5052114", "0.50379133", "0.50330615", "0.50318795", "0.5025834", "0.502298", "0.5021119", "0.5012605", "0.4999787", "0.49802554", "0.49719173", "0.49698883", "0.4969359", "0.4969319", "0.49634767", "0.49527872", "0.4951971", "0.49491793", "0.4940896", "0.49342895", "0.4931558", "0.4930618", "0.49299887", "0.49089405", "0.49089205", "0.490772", "0.49024662", "0.49019843", "0.4898622", "0.48972723", "0.48898977", "0.48814514", "0.48766837", "0.48613653", "0.48609737", "0.48575908", "0.48527926", "0.4841107", "0.48264253", "0.4814209", "0.48104393", "0.48017356", "0.47961897", "0.47922012", "0.47914755", "0.4775899", "0.4759893", "0.47567618", "0.47553375", "0.47550243", "0.47529018", "0.47467256", "0.47423142", "0.47396582", "0.47236922", "0.4723373", "0.4717246", "0.4715085", "0.47144967", "0.47058457", "0.47031873", "0.46932358", "0.46889696", "0.4685231", "0.46812624" ]
0.6129425
1
Train model by training both forward and backward models
public void train (List<List<String>> sentences) { // sentence structure: <S>A B C</S> bigramModel.train(sentences, bigramModel.start_symbol, bigramModel.end_symbol); // sentence structure: </S>C B A<S> backwardBigramModel.train(sentences, backwardBigramModel.end_symbol, backwardBigramModel.start_symbol); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void train() {\n\t\tfor (int i = 0; i < numberOfIterations; i++) {\n\t\t\t// for each training record\n\t\t\tfor (int j = 0; j < numberOfRecords; j++) {\n\t\t\t\t// calculate inputs and outputs\n\t\t\t\tforwardCalculation(records.get(j).input);\n\t\t\t\t// compute errors, update weights and thetas\n\t\t\t\tbackwardCalculation(records.get(j).output);\n\t\t\t}\n//\t\t\tpostprocessOutputs();\n\t\t}\n\t}", "public void train()\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n System.out.println(\"Start Training ..\");\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Training Text %..\");\n\t\t\ttrainText();\n\n\t\t\tSystem.out.println(\"Training Complex %..\");\n\t\t\ttrainCombined();\n\n\t\t\tSystem.out.println(\"Training Feature %..\");\n\t\t\ttrainFeatures();\n\n\t\t\tSystem.out.println(\"Training Lexicon %..\");\n\t\t\t//trainLexicon();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n\tpublic void trainLocal() throws Exception {\n\t\tdouble [][] input = parameters.getInput();\n\t\tdouble [][] result = ann.getResults(parameters);\n\t\tif (state == preTraining) {//in this case, it is running in the pre-training mode.\n\t\t\tinput = newInput;\n\t\t\tresult = newInput;\n\t\t}\n\t\terr = 0; \n\t\tfor (int i = 0; i < mb; i++) {\t\n\t\t\tif (pos > input.length - 1) {\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\terr = err + ann.runEpoch(input[pos], pos, result[pos], parameters);\n\t\t\tpos++;\n\t\t}\n\t}", "@Override\n public void train() {\n actual = observations.toArray();\n min_val_error = Double.MAX_VALUE;\n if (findDecayConstant)\n for (float alpha = 0f; alpha <= 1f; alpha += 0.01f)\n initializeAndTrainModel(alpha);\n else\n initializeAndTrainModel(optAlpha);\n }", "public void train() {\n\n int w;\n double sum = 0, avg;\n double forecast;\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n actual = observations.toArray();\n\n for (int i = 0; i < step * slices; i++)\n sum += actual[i];\n\n avg = sum / slices;\n\n for (int pos = 0; pos < trainPoints; pos++) {\n sum = 0;\n w = 0;\n\n if (pos >= step * slices) {\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n } else forecast = avg;\n\n trainMatrix[pos][0] = actual[pos];\n trainMatrix[pos][1] = forecast;\n }\n\n for (int pos = actual.length - validationPoints, j = 0; pos < actual.length; pos++) {\n sum = 0;\n w = 0;\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n valMatrix[j][0] = actual[pos];\n valMatrix[j][1] = forecast;\n j++;\n }\n double biasness = BiasnessHandler.handleOffset(valMatrix);\n accuracyIndicators.setBias(biasness);\n ModelUtil.computeAccuracyIndicators(accuracyIndicators, trainMatrix, valMatrix, dof);\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n }", "@Override\n\tpublic void train(DataSet data) {\n\t\tArrayList<Example> examples = data.getCopyWithBias().getData();\n\t\t// initialize both weight vectors with random values between -0.1 ad 0.1\n\t\tinitWeights(examples.size());\n\n\t\t// store outputs from forward calculation for each example\n\t\t// array will have size # examples.\n\t\tArrayList<Double> nodeOutputs = calculateForward(examples);\n\n\t\t// now take error and back-propagate from output to hidden nodes\n\n\t\tfor (int j = 0; j < examples.size(); j++) {\n\t\t\tExample ex = examples.get(j);\n\n\t\t\t// get hidden node outputs for single example\n\t\t\tfor (int num = 0; num < numHidden; num++) {\n\t\t\t\tArrayList<Double> h_outputs = hiddenOutputs.get(num);\n\t\t\t\tdouble vDotH = dotProduct(h_outputs, layerTwoWeights); // calculate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// v dot\n\t\t\t\t// h for\n\t\t\t\t// this node\n\n\t\t\t\tfor (int i = 0; i < numHidden - 1; i++) {\n\t\t\t\t\tdouble oldV = layerTwoWeights.get(i);\n\t\t\t\t\tdouble hk = h_outputs.get(i);\n\t\t\t\t\t// Equation describing line below:\n\t\t\t\t\t// v_k = v_k + eta*h_k(y-f(v dot h)) f'(v dot h)\n\t\t\t\t\tlayerTwoWeights.set(i, oldV + eta * hk * (ex.getLabel() - Math.tanh(vDotH)) * derivative(vDotH));\n\t\t\t\t}\n\n\t\t\t\tSet<Integer> features = ex.getFeatureSet();\n\t\t\t\tIterator<Integer> iter = features.iterator();\n\t\t\t\tArrayList<Double> featureVals = new ArrayList<Double>();\n\t\t\t\tfor (int f : features) {\n\t\t\t\t\tfeatureVals.add((double) f);\n\t\t\t\t}\n\n\t\t\t\t// take that error and back-propagate one more time\n\t\t\t\tfor (int x = 0; x < numHidden; x++) {\n\t\t\t\t\tArrayList<Double> initWeights = hiddenWeights.get(x);\n\t\t\t\t\t// List<Object> features =\n\t\t\t\t\t// Arrays.asList(ex.getFeatureSet().toArray());\n\n\t\t\t\t\t// for (int i = 0; i < featureVals.size()-1; i++) {\n\t\t\t\t\tdouble oldWeight = initWeights.get(j);\n\t\t\t\t\tdouble thisInput = ex.getFeature(featureVals.get(x).intValue());\n\t\t\t\t\t// w_kj = w_kj + eta*xj(input)*f'(w_k dot x)*v_k*f'(v dot\n\t\t\t\t\t// h)(y-f(v dot h))\n\t\t\t\t\tdouble updateWeight = oldWeight + eta * thisInput * derivative(dotProduct(featureVals, initWeights))\n\t\t\t\t\t\t\t* layerTwoWeights.get(x) * derivative(vDotH) * (ex.getLabel() - Math.tanh(vDotH));\n\t\t\t\t\tinitWeights.set(j, updateWeight);\n\t\t\t\t\t// }\n\t\t\t\t\thiddenWeights.set(x, initWeights); // update weights for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// example\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "private void train(int[] trainingData, int[] trainingLabel) {\n\t\t// forward Propagation\n\t\tdouble[] activationsOfHiddenLayer = new double[SIZE_HIDDEN_LAYER];\n\t\tdouble[] outputActivations = new double[SIZE_OUTPUT_LAYER];\n\t\tforwardPropagation(trainingData, activationsOfHiddenLayer, outputActivations);\n\t\t// backward Propagation\n\t\tbackwardPropagation(trainingData, trainingLabel, outputActivations, activationsOfHiddenLayer);\n\t}", "public void train(){\r\n\t\tdouble output = 0.0;\r\n\t\tList<Integer> teacher = null;\r\n\t\tdouble adjustedWeight = 0.0;\r\n\t\tdouble error = 0.0;\r\n\t\tdouble deltaK = 0.0;\r\n\r\n\t\tfor(int counter = 0; counter < maxEpoch; counter++){\r\n\t\t\tfor(Instance inst : trainingSet){\r\n\t\t\t\tcalculateOutputForInstance(inst);\r\n\t\t\t\tteacher = inst.classValues;\r\n\t\t\t\t//jk weight\r\n\t\t\t\tfor(int i = 0; i < outputNodes.size(); i++){\r\n\t\t\t\t\tNode kNode = outputNodes.get(i);\r\n\t\t\t\t\toutput = kNode.getOutput();\r\n\t\t\t\t\terror = teacher.get(i) - output;\r\n\t\t\t\t\tdeltaK = error*getReLU(kNode.getSum());\r\n\t\t\t\t\tfor(int j = 0; j < kNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair jkWeight = kNode.parents.get(j);\r\n\t\t\t\t\t\tNode jNode = jkWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getJK(jNode, deltaK);\r\n\t\t\t\t\t\tjkWeight.weight += adjustedWeight;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//ij weight\r\n\t\t\t\tfor(int i = 0; i < hiddenNodes.size(); i++){\r\n\t\t\t\t\tNode jNode = hiddenNodes.get(i);\r\n\t\t\t\t\tif(jNode.parents == null) continue;\r\n\t\t\t\t\tfor(int j = 0; j < jNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair ijWeight = jNode.parents.get(j);\r\n\t\t\t\t\t\tNode iNode = ijWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getIJ(iNode, jNode, teacher, i);\r\n\t\t\t\t\t\tijWeight.weight += adjustedWeight;\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}", "private void train() throws IOException {\r\n\r\n // Set Listeners, to see results of evaluation during training process and testing\r\n vgg16Transfer.setListeners(new ScoreIterationListener(100));\r\n trainWriter.write(\"\\n Train model....\");\r\n System.out.println(\"\\n Train model....\");\r\n int iterationsCounter = 0;\r\n // Go through all data \"epochs\" - number of times\r\n for(int n = 0; n < epochs; n++) {\r\n System.out.println(String.format(\"Epoch %d started training\", n + 1));\r\n trainWriter.write(String.format(\"Epoch %d started training\", n + 1));\r\n\r\n //Reset training iterator to the new epoch\r\n trainIterator.reset();\r\n // Go through all data once, till it's end\r\n while (trainIterator.hasNext()) {\r\n iterationsCounter++;\r\n trainingData = trainIterator.next();\r\n normalizer.fit(trainingData);\r\n vgg16Transfer.fit(trainingData);\r\n System.out.println(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n\r\n }\r\n System.out.println(String.format(\"Epoch %d finished training\", n + 1));\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n // Get results and check them\r\n Evaluation eval = new Evaluation(numLabels);\r\n testIterator.reset();\r\n while(testIterator.hasNext()) {\r\n testData = testIterator.next();\r\n normalizer.fit(testData);\r\n INDArray features = testData.getFeatures();\r\n INDArray labels = testData.getLabels();\r\n INDArray predicted = vgg16Transfer.outputSingle(features);\r\n eval.eval(labels, predicted);\r\n }\r\n System.out.println(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n System.out.println(eval.stats());\r\n System.out.println(eval.confusionToString());\r\n trainWriter.write(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n trainWriter.write(eval.stats());\r\n trainWriter.write(eval.confusionToString());\r\n }\r\n System.out.println(\"\\n *** Training finished! *** \");\r\n trainWriter.write(\"\\n *** Training finished! *** \");\r\n }", "public void train(){\n recoApp.training(idsToTest);\n }", "public void train() throws Exception;", "public void startTrainingMode() {\n\t\t\r\n\t}", "public void trainingPreprocessing() {\n neuralNetAndDataSet = new NeuralNetAndDataSet(neuralNetwork, trainingSet);\n trainingController = new TrainingController(neuralNetAndDataSet);\n neuralNetwork.getLearningRule().addListener(this);\n trainingController.setLmsParams(0.7, 0.01, 0);\n LMS learningRule = (LMS) this.neuralNetAndDataSet.getNetwork().getLearningRule();\n if (learningRule instanceof MomentumBackpropagation) {\n ((MomentumBackpropagation) learningRule).setMomentum(0.2);\n }\n }", "public void trainNet() {\t\t\n\t\t// Synapses contain the weights for each layer, these are randomised to begin with\n\t\tsynapse0 = new double[X[0].length][hiddenNeurons];\n\t\tpopulateRandom(synapse0, minRandomWeight, maxRandomWeight);\n\t\t\n\t\tsynapse1 = new double[hiddenNeurons][y[0].length];\n\t\tpopulateRandom(synapse1, minRandomWeight, maxRandomWeight);\n\t\t\n\t\t// The layers are the output values of each layer.\n\t\t// They are initialised to nothing to begin with, created properly in the training loop\n\t\tlayer1 = new double[0][0];\n\t\tlayer2 = new double[0][0];\n\t\t\n\t\t// Printing the initial state of the system\n\t\tm.printMatrix(\"X:\", X);\n\t\tm.printMatrix(\"y:\", y);\n\t\t\n\t\t// The training loop\n\t\tfor (int i = 0; i < trainingCycles; i++) {\n\t\t\t// calculate the values of each layer given the inputs and the weights\n\t\t\tlayer1 = forwardPropogate(X, synapse0);\n\t\t\tlayer2 = forwardPropogate(layer1, synapse1);\n\t\t\t\n\t\t\t// Calculate the delta error for each output layer, starting\n\t\t\t// with the bottom working up.\n\t\t\t// This is the difference between the expected values and actual values\n\t\t\t// times the derivative (gradient) of the sigmoid activation function\n\t\t\t// The 1st error comes from y - output\n\t\t\tdouble[][] layer2Delta = m.subtract(y, layer2);\n\t\t\tlayer2Delta = delta(layer2Delta, layer2);\n\t\t\t// subsequent layers come from the delta of the lower layer divided by the weights\n\t\t\tdouble[][] layer1Delta = m.dot(layer2Delta, m.t(synapse1));\n\t\t\tlayer1Delta = delta(layer1Delta, layer1);\n\t\t\t\n\t\t\t// Apply the error gradients to each weight, this moves the value closer to the expected\n\t\t\t// or reduces the error\n\t\t\tsynapse1 = m.add(synapse1, m.scale(m.dot(m.t(layer1), layer2Delta), trainingRate));\n\t\t\tsynapse0 = m.add(synapse0, m.scale(m.dot(m.t(X), layer1Delta), trainingRate));\n\t\t}\n\t\t// Run the input matrix through the net to get outputs for each training value on layer 2\n\t\tdouble[][] testNet = runData(X);\n\t\t// Show the results\n\t\tm.printMatrix(\"Output for X after training:\", testNet);\n\t\tm.printMatrixInts(\"Output for X after training (out of 100:\", testNet);\n\t}", "private void trainNetwork(long iterations) {\n\t\ttrainer.startTraining(network, iterations);\r\n\r\n\t}", "public void train() {\r\n // For each epoch, call setInputValue on input nodes\r\n for (int i = 0; i < maxEpoch; i++) {\r\n Collections.shuffle(trainingSet, random);\r\n\r\n // get each training instance\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n\r\n Instance instance = trainingSet.get(k);\r\n\r\n // set the input value in the input nodes from the training instance\r\n for (int j = 0; j < instance.attributes.size(); j++) {\r\n inputNodes.get(j).setInput(instance.attributes.get(j));\r\n }\r\n\r\n //set the target value in output nodes\r\n for (int j = 0; j < instance.classValues.size(); j++) {\r\n outputNodes.get(j).setTargetValue((double) instance.classValues.get(j));\r\n }\r\n\r\n // calculate values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n // for each hidden node\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateOutput();\r\n }\r\n\r\n //calculate values for output nodes\r\n double sumOfExponents = 0.0;\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n // for each output node\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateOutput();\r\n sumOfExponents += outputNode.getOutput();\r\n }\r\n\r\n //update output values of output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateOutputValue(sumOfExponents);\r\n }\r\n\r\n // calculate delta values for output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateDelta();\r\n }\r\n\r\n // calculate delta values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateDelta();\r\n hiddenNode.resetSumOfPartialDelta();\r\n }\r\n\r\n // update weights going from input layer to hidden layer\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.updateWeight(learningRate);\r\n }\r\n\r\n // update weights going from hidden layer to output layer\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateWeight(learningRate);\r\n }\r\n\r\n /*if (k == 0 && i==0) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n\r\n if (k == 0 && i == 0) {\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n if (hiddenNode.parents != null) {\r\n for (NodeWeightPair pair : hiddenNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n }*/\r\n }\r\n\r\n /* if (i==29) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }*/\r\n\r\n double totalLoss = 0.0;\r\n // Calculate loss and sum for each training instance, and then take average\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n Instance instance = trainingSet.get(k);\r\n totalLoss += loss(instance);\r\n }\r\n totalLoss /= trainingSet.size();\r\n System.out.println(\"Epoch: \" + i + \", \" + \"Loss: \" + String.format(\"%.3e\", totalLoss));\r\n }\r\n }", "public void train ()\t{\t}", "private void train(float[] inputs, int desired) {\r\n int guess = feedforward(inputs);\r\n float error = desired - guess;\r\n for (int i = 0; i < weights.length; i++) {\r\n weights[i] += c * error * inputs[i];\r\n }\r\n }", "abstract void train(Matrix features, Matrix labels);", "private void train(NeuralDataSet input) {\n\n\tfinal NeuralDataSet theInput = input;\n\tfinal VirtualLibraryButler that = this;\n\n\ttraining = new Thread() {\n\t public void run() {\n\n\t\torg.encog.util.logging.Logging.setConsoleLevel(Level.OFF);\n\n\t\tfinal Train train = new CompetitiveTraining(brain, 0.7,\n\t\t\ttheInput, new NeighborhoodGaussian(\n\t\t\t\tnew GaussianFunction(0.0, 5.0, 1.5)));\n\t\tStrategy smartLearn = new SmartLearningRate();\n\n\t\tsmartLearn.init(train);\n\t\ttrain.addStrategy(smartLearn);\n\n\t\tint epoch = 0;\n\t\tint errorSize = 250;\n\n\t\tdouble[] lastErrors = new double[errorSize];\n\n\t\t// training loop\n\t\tdo {\n\t\t train.iteration();\n\t\t // System.out.println(\"Epoch #\" + epoch + \" Error:\" +\n\t\t // train.getError()); // + \" MovingAvg:\" + movingAvg);\n\t\t lastErrors[epoch % errorSize] = train.getError();\n\n\t\t double avg = 0;\n\t\t for (int i = 0; (i < epoch) && (i < errorSize); ++i)\n\t\t\tavg = (avg * i + lastErrors[i]) / (i + 1);\n\n\t\t if (Math.abs(avg - train.getError()) < 0.01)\n\t\t\ttrain.setError(0.001);\n\n\t\t epoch++;\n\t\t} while (train.getError() > 0.01);\n\n\t\t// System.out.println(\"training complete.\");\n\n\t\tthat.initialized = true;\n\t }\n\t};\n\n\ttraining.start();\n }", "public void train(SieveDocuments trainingInfo) {\r\n\t\t// no training\r\n\t}", "@Procedure(value = \"mlp.train\", mode = WRITE)\n @Description(\"Backward pass through NN\")\n public void train(@Name(value = \"no. of passes\") long nPasses) {\n\n DataLogger logger = new DataLogger(\"proto1\", \"error\");\n\n for (int i = 0; i < nPasses; i++) {\n updateTrainRate(i + 1);\n forwardPass();\n\n double error = calculateError();\n\n double reward = 1.0 - error;\n\n// if (Math.random() > 0.9) reward = error;\n\n backwardPass(reward);\n moveNext();\n\n\n// System.out.println(String.format(\"Error: %f\", error));\n// if (i % 100 == 0 && i > 0) {\n// double meanError = errors.stream().reduce(0.0, Double::sum) / 100;\n// System.out.println(String.format(\n// \"Mean error: %f, eta: %f\", meanError, eta));\n// errors.clear();\n// }\n// errors.add(error);\n logger.append(error);\n\n\n }\n\n forwardPass();\n logger.close();\n }", "public void train(int n_epochs) {\n TrainModel train_model = null;\n\n int lenW = vocabulary.length;\n int W = 3 * lenW + 3;\n\n // randomly initialize U_Ot, values are randomly selected between -0.1 to 0.1;\n double[][] U_Ot = new double[D][W];\n\n // randomly initialize U_R, values are randomly selected between -0.1 and 0.1\n double[][] U_R = new double[D][W];\n\n double prev_err = 0D;\n for (int epoch = 0; epoch < n_epochs; epoch++) {\n double total_error = 0D;\n int n_wrong = 0;\n\n for (int i = 0; i < train_lines.size(); i++) {\n Instance line = train_lines.get(i);\n if (\"q\".equals(line.type)) { // indicates question\n List<Integer> refs = line.refs; // Indexing from 1\n List<Integer> f = refs.stream()\n .map(ref -> ref-1)\n .collect(Collectors.toList()); // Indexing from 0\n int id = line.ID - 1; // Indexing from 0\n\n // all indices from\n List<Integer> indices = range(i-id, i+1);\n List<double[]> memory_list = indices.stream()\n .map(idx -> L_train[idx])\n .collect(Collectors.toList());\n\n\n if (train_model == null) {\n train_model = new TrainModel(lenW, f.size());\n }\n\n List<Integer> m = f;\n // TODO\n List<Integer> mm = new ArrayList<>(); //TODO\n for (int j = 0; j < f.size(); j++) {\n mm.add(O_t(\n newM,\n memory_list\n ));\n }\n\n double err = train_model(H.get(\"answer\"),\n gamma, memory_list, V, id, ???)[0];\n total_error += err;\n System.out.println(\"epoch: \" + epoch + \"\\terr: \" + (total_error / train_lines.size()));\n }\n }\n }\n }", "private String train(float[][][] features, float[] label, int epochs){\n org.tensorflow.Tensor x_train = Tensor.create(features);\n Tensor y_train = Tensor.create(label);\n int ctr = 0;\n while (ctr < epochs) {\n sess.runner().feed(\"input\", x_train).feed(\"target\", y_train).addTarget(\"train_op\").run();\n ctr++;\n }\n return \"Model Trained\";\n }", "public void train()\r\n\t{\r\n\t\tfor(int i=0; i < this.maxEpoch; i++)\r\n\t\t{\r\n\t\t\tfor(Instance temp_example: this.trainingSet)\r\n\t\t\t{\r\n\t\t\t\tdouble O = calculateOutputForInstance(temp_example);\r\n\t\t\t\tdouble T = temp_example.output;\r\n\t\t\t\tdouble err = T - O;\r\n\r\n\t\t\t\t//w_jk (hidden to output)\r\n\t\t\t\tdouble g_p_out = (outputNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(this.learningRate*\r\n\t\t\t\t\t\t\thiddenNode.node.getOutput()*err*g_p_out);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//w_ij (input to hidden)\r\n\t\t\t\tint hid_count =0;\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tdouble g_p_hid = (hiddenNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\t\tif(hiddenNode.getType()==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tdouble a_i = inputNode.node.getOutput();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\tthis.learningRate*\r\n\t\t\t\t\t\t\t\t\ta_i*g_p_hid*(err*\r\n\t\t\t\t\t\t\t\t\toutputNode.parents.get(hid_count).weight*\r\n\t\t\t\t\t\t\t\t\tg_p_out)\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\thid_count++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// for all w_pq, update weights\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tif(hiddenNode.getType()==2){\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tinputNode.weight += inputNode.get_deltaw_pq();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.weight += hiddenNode.get_deltaw_pq();\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t}\r\n\r\n\t\t\t} // end of an instance \r\n\t\t} // end of an epoch\r\n\t}", "public void train(Corpus[] trainingData) {\n\t\tSet<String> vocabulary = super.mergeVocabulary(trainingData);\n\t\ttrainingData[0].setVocabulary(vocabulary);\n\t\ttrainingData[1].setVocabulary(vocabulary);\n\t\tposMatrix = new TransitionMatrix(trainingData[0]);\n\t\tnegMatrix = new TransitionMatrix(trainingData[1]);\n\t}", "private void initializeAndTrainModel(float alpha) {\n\n double forecast;\n double lastValue = actual[0];\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n\n for (int i = 1; i < trainPoints; i++) {\n forecast = lastValue;\n\n trainMatrix[i][0] = actual[i];\n trainMatrix[i][1] = forecast;\n lastValue = (alpha * actual[i]) + ((1 - alpha) * lastValue);\n }\n\n for (int t = 1; t <= validationPoints; t++) {\n valMatrix[t - 1][1] = lastValue;\n valMatrix[t - 1][0] = actual[trainPoints + t - 1];\n }\n\n\n double biasness = BiasnessHandler.handle(valMatrix);\n AccuracyIndicators AI = new AccuracyIndicators();\n ModelUtil.computeAccuracyIndicators(AI, trainMatrix, valMatrix, dof);\n AI.setBias(biasness);\n if (min_val_error >= AI.getMAPE()) {\n min_val_error = AI.getMAPE();\n optAlpha = alpha;\n accuracyIndicators = AI;\n }\n }", "public void train(Collection<TrainingEntry<Login>> trainingDataSet) throws TrainingException {\n if (trainingDataSet.isEmpty()) return;\n try {\n final DataSet dataSet = toDataSet(trainingDataSet);\n normalizer = new NormalizerStandardize();\n normalizer.fit(dataSet);\n normalizer.transform(dataSet);\n final DataSetIterator dataSetIterator = new ExistingDataSetIterator(dataSet);\n final MultiLayerConfiguration configuration = new NeuralNetConfiguration.Builder()\n .seed(6)\n .iterations(1)\n .activation(\"tanh\")\n .weightInit(WeightInit.XAVIER)\n .learningRate(0.1)\n .regularization(true).l2(1e-4)\n .list()\n .layer(0, new DenseLayer.Builder()\n .nIn(getNumberOfInputFeatures(trainingDataSet))\n .nOut(9)\n .build())\n .layer(1, new DenseLayer.Builder()\n .nIn(9)\n .nOut(9)\n .build())\n .layer(2, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)\n .activation(\"softmax\")\n .nIn(9)\n .nOut(NUM_CATEGORIES).build())\n .backprop(true).pretrain(false)\n .build();\n network = new MultiLayerNetwork(configuration);\n final EarlyStoppingConfiguration esConf = new EarlyStoppingConfiguration.Builder()\n .epochTerminationConditions(new MaxEpochsTerminationCondition(20))\n .iterationTerminationConditions(new MaxTimeIterationTerminationCondition(20, TimeUnit.MINUTES))\n .scoreCalculator(new DataSetLossCalculator(dataSetIterator, true))\n .evaluateEveryNEpochs(1)\n .modelSaver(new InMemoryModelSaver())\n .build();\n final EarlyStoppingTrainer trainer = new EarlyStoppingTrainer(esConf, network, dataSetIterator);\n final EarlyStoppingResult<MultiLayerNetwork> result = trainer.fit();\n network = result.getBestModel();\n } catch (final Exception e) {\n throw new TrainingException(e);\n }\n }", "public void trainOnInstance(Instance inst) {\n\t\t\t\t\t\t\n\t\t\ttry{\t\t\t\t\n\t\t\t\tinstancesSeen++;\n\t\t\t\tupdateStats(inst);\n\t\t\t\t\n\t\t\t\tDoubleVector normaliezedExtendedInstance = PrepareExtendedFeatureVector(inst) ;\n\t\t\t\tdouble normaliezedTargetValue= NormalizeTarget(inst) ;\n\t\t\t\tResultSummary resultSummary = getMemberships (normaliezedExtendedInstance,normaliezedTargetValue) ;\n\t\t\t\t\n\t\t\t\tdouble error = resultSummary.getNormaliezedTargetValue() - resultSummary.getFinalPrediction() ;\n\t\t\t\tthis.CurModSSE += Math.pow(error, 2) ;\n\t\t\t\t\n\t\t\t\t// checking a possible drift\n//\t\t\t\tboolean drift =checkChangeDetection() ;\n//\t\t\t\tif (drift)\n//\t\t\t\t\tthis.countChangeDetected++ ;\n\t\t\t\tboolean drift = false ;\n\t\t\t\tif ((this.instancesSeen % graceperiod)==0){\n\t\t\t\t\tdrift =checkChangeDetection() ;\n\t\t\t\t\tif (drift){\n\t\t\t\t\t\tthis.countChangeDetected++ ;\n//\t\t\t\t\t\tthis.clearAllStats();\n\t\t\t\t\t\tthis.currentValidCandidates.clear() ;\n\t\t\t\t\t\tthis.currentNonReadyCandidates.clear() ;\n\t\t\t\t\t\tcurrentSystemVersion++ ;\n\t\t\t\t\t\tSystem.out.println(\"########After a drift################\");\n\t\t\t\t\t\tSystem.out.println(this);\n\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n// \t\tVarianceRationREduction\n\t\t\t\tif (learningCriteriaOption.getChosenIndex()==1) {\n\t\t\t\t\t// checking a possible extension\n//\t\t\t\t\tif (this.instancesSeen > graceperiod && !drift ) {\n\t\t\t\t\tif (!drift ) {\n\t\t\t\t\t\tboolean systemChanged = false ;\n\t\t\t\t\t\tVector <RuleVR> removeRules= new Vector<RuleVR>() ;\n\t\t\t\t\t\tVector <RuleVR> newRules= new Vector<RuleVR>() ;\n\t\t\t\t\t\tfor (FuzzyRule rule : rs){\n\t\t\t\t\t\t\tVector <RuleVR> expansions = ((RuleVR)rule).tryToExpand(confidence, tau) ;\n\t\t\t\t\t\t\tif (expansions != null) {\n\t\t\t\t\t\t\t\tsystemChanged = true ;\n\t\t\t\t\t\t\t\tif (chooseSingleRuleOption.isSet()) {\n\t\t\t\t\t\t\t\t\tif (expansions.get(0).getInitialMerit() > expansions.get(1).getInitialMerit()) {\n\t\t\t\t\t\t\t\t\t\tnewRules.add(expansions.get(0)) ;\n\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\tnewRules.add(expansions.get(1)) ;\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\tif (rule !=defaultRule)\n\t\t\t\t\t\t\t\t\t\tremoveRules.add((RuleVR)rule) ;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\tremoveRules.add((RuleVR)rule) ;\n\t\t\t\t\t\t\t\t\tnewRules.addAll(expansions) ;\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 (systemChanged) {\n\t\t\t\t\t\t\trs.removeAll(removeRules) ;\n\t\t\t\t\t\t\trs.addAll(newRules) ;\n\t\t\t\t\t\t\tthis.clearAllStats();\n\t\t\t\t\t\t\tcurrentSystemVersion++ ;\n\t\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t\t\tSystem.out.println(this);\n\t\t\t\t\t\t\tSystem.out.println(\"########################\");\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}//RMSEReduction\n\t\t\t\telse{\n\t\t\t\t\t// checking a possible extension\n\t\t\t\t\tif (this.instancesSeen > graceperiod && !drift ) {\n\t\t\t\t\t\tExtendedCandidateErrR bestExtension = this.checkValidExpansion();\n\t\t\t\t\t\tif ((bestExtension != null)) {\n\t\t\t\t\t\t\tif (chooseSingleRuleOption.isSet()) {\n\t\t\n\t\t\t\t\t\t\t\tVector<RuleErrR> newRules = bestExtension.CreateRuleFromExtension() ;\n\t\t\t\t\t\t\t\tif (bestExtension.getParentRule()!=defaultRule)\n\t\t\t\t\t\t\t\t\trs.remove(bestExtension.getParentRule()) ;\n\t\t\t\t\t\t\t\t\n\t\t//\t\t\t\t\t\tWe must choose the best candidate here!\n\t\t\t\t\t\t\t\tdouble [] SSESingleExtenstions = bestExtension.getMeanSSESingleExension() ;\n\t\t\t\t\t\t\t\tif (SSESingleExtenstions[0]<SSESingleExtenstions[1])\n\t\t\t\t\t\t\t\t\trs.add(newRules.get(0)) ;\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\trs.add(newRules.get(1)) ;\t\n\t\t\t\t\t\t\t\t\t\n\t\t//\t\t\t\t\t\trs.addAll(newRules) ;\n\t\t\t\t\t\t\t\tif (bestExtension.getParentRule()==defaultRule)\n\t\t\t\t\t\t\t\t\tdefaultRule.buildExtendedCandidates(bestExtension.getAttributeIndex());\n\t\t\n\t\t\t\t\t\t\t\tthis.clearAllStats();\n\t\t\t\t\t\t\t\tthis.currentValidCandidates.clear() ;\n\t\t\t\t\t\t\t\tthis.currentNonReadyCandidates.clear() ;\n\t\t\t\t\t\t\t\tcurrentSystemVersion++ ;\n\t\t\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t\t\t\tSystem.out.println(this);\n\t\t\t\t\t\t\t\tSystem.out.println(\"########################\");\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\tExtendedCandidateErrR cbestExtension = this.checkValidExpansion();\n\n\t\t\t\t\t\t\t\tVector<RuleErrR> newRules = bestExtension.CreateRuleFromExtension() ;\n\t\t\t\t\t\t\t\trs.remove(bestExtension.getParentRule()) ;\n\t\t\t\t\t\t\t\trs.addAll(newRules) ;\n\t\t\t\t\t\t\t\tthis.clearAllStats();\n\t\t\t\t\t\t\t\tthis.currentValidCandidates.clear() ;\n\t\t\t\t\t\t\t\tthis.currentNonReadyCandidates.clear() ;\n\t\t\t\t\t\t\t\tcurrentSystemVersion++ ;\n\t\t\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t\t\t\tSystem.out.println(this);\n\t\t\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\tif (chooseSingleRuleOption.isSet()) {\n\t\t\t\t\tdouble maxMembership = 0 ;\n\t\t\t\t\tfor (ResultSummary.ResultPair resultPair: resultSummary.getResultPairs()) {\n\t\t\t\t\t\tresultPair.getRule().trainOnInstance(resultSummary, resultPair);\n\t\t\t\t\t\tmaxMembership = Math.max(maxMembership, resultPair.getMembership()) ;\n\t\t\t\t\t}\n\t\t\t\t\tif (maxMembership < max_Membership_For_Choosing_Single_Rule)\n\t\t\t\t\t\tdefaultRule.trainOnInstance(resultSummary, resultSummary.getResultPairDefaultRule()) ;\n\t\t\t\t}else{\n\t\t\t\t\tfor (ResultSummary.ResultPair resultPair: resultSummary.getResultPairs()) {\n\t\t\t\t\t\tresultPair.getRule().trainOnInstance(resultSummary, resultPair);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch (Exception ex){\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}", "private void trainOnSamples() {\n for (Sample sample : samples) {\n double sum = 0;\n \n for (int i = 0; i < weights.length; i++) { //calculating w1.x1 + w2.x2 + ... \n sum += weights[i] * sample.getP()[i];\n }\n sum += bias; //adding bias to the sum\n\n if (!compareOutput(sum, sample)) { //compare network & target output\n //updating the weights\n for (int i = 0; i < weights.length; i++) {\n weights[i] += sample.getTarget() * sample.getP()[i];\n }\n //updating the bias\n bias += sample.getTarget();\n sample.setValidation(false);\n } else {\n sample.setValidation(true);\n }\n }\n }", "public void trainTest() throws Exception\n\t{\n\t\tSystem.out.println(\"Preprocessing Testset ..\");\n\t\t//String[] dir = new String[]{ Test+\"negative\" , Test+\"positive\"};\n\t\t//FileIterator iterator = new FileIterator(dir,FileIterator.LAST_DIRECTORY);\n\t\tInstanceList instances = new InstanceList(getTextPipe());\n\t\t//instances.addThruPipe(iterator);\n\n\t\tCSVParser parser = new CSVParser(new FileReader(\n\t\t\t\t\"resources/datasets/sentimentanalysis/mallet_test/Sentiment140/sentiment140.csv\"),\n\t\t\t\tCSVFormat.EXCEL.withFirstRecordAsHeader());\n\n\t\tTextPreprocessor preprocessor = new TextPreprocessor(\"resources/datasets/sentimentanalysis/\");\n\t\tint count = 0;\n\t\tfor (CSVRecord record: parser.getRecords())\n\t\t{\n\t\t\tString target;\n\t\t\tif (record.get(\"target\").equals(\"0\"))\n\t\t\t\ttarget = \"negative\";\n\t\t\telse\n\t\t\t\ttarget = \"positive\";\n\t\t\tinstances.addThruPipe(new Instance(preprocessor.getProcessed(record.get(\"tweet\")),target,\n\t\t\t\t\t\"Instance\"+count++,null));\n\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t\tSystem.out.println(instances.targetLabelDistribution());\n\t\tSystem.out.println(\"Start Training Testset ..\");\n\t\tClassifier nb = new NaiveBayesTrainer().train(instances);\n\t\tSystem.out.println(\"Saving Test Model ..\");\n\t\tsaveModel(nb,Test+\"Model.bin\");\n\t\tsaveinstances(instances,Test+\"Model-Instances.bin\");\n\t\tinstances.getDataAlphabet().dump(new PrintWriter(new File(Test+\"Model-alphabet.dat\")));\n\t}", "void setTrainData(DataModel trainData);", "public void train(int iterations) {\n\t\tNeuron n = new NeuronSigmoid();\n\t\t\n\t\tfor (int i = 0; i < iterations; i++) {\n\t\t\tSystem.out.print(\"Epoch: \" +(i+1));\n\t\t\tdouble[][] localOutput = n.think(this.input,this.weights);\n\n\t\t\tdouble[][] error = Matrix2d.subtract(output, localOutput);\n\t\t\tSystem.out.print(\" Error: \"+calcOverallError(error));\n\t\t\tdouble[][] sigDeriv = Matrix2d.sigmoidDerivative(localOutput);\n\t\t\tdouble[][] prod = Matrix2d.multiply(error, sigDeriv);\n\t\t\tdouble[][] transInput = Matrix2d.transposeMatrix(input);\n\t\t\tdouble[][] adjustment = Matrix2d.dot(transInput, prod);\n\n\t\t\tweights = Matrix2d.add(adjustment, weights);\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public void train(int[] inputs, int[] outputs) {\n\t\tsaveInputs(inputs, outputs);\n\t\tint l = inputs.length;\n\t\tfor(int i = 0 ; i < l ; i++)\n\t\t\tfor(int j = 0 ; j < l ; j++)\n\t\t\t\tsynapses[i*l+j] = (inputs[i] & outputs[j]) | synapses[i*l+j];\n\t}", "@Override\n\tpublic void trainOnline(TLongList timestamps, Collection<Instance> instances) {\n\t\ttrainOnline(instances);\n\t}", "private void readModelAndTrain(boolean readExistingModel,\n\t\t\tbyte[] trainingDataFile) {\n\t\tInputStream dataIn = null;\n\t\ttry {\n\t\t\tObjectStream<DocumentSample> sampleStream = new DocumentSampleStream(\n\t\t\t\t\tnew PlainTextByLineStream(new FileInputStream(\n\t\t\t\t\t\t\tcreateModelInput(INPUT_TWEETS_ORIG_TXT)), \"UTF-8\"));\n\t\t\tsetModel(DocumentCategorizerME.train(\"en\", sampleStream,\n\t\t\t\t\tCUTOFF_FREQ, TRAINING_ITERATIONS));\n\t\t\tserialize(model);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (dataIn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tdataIn.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "protected void trainModuleNN(ExperienceReplay<TransitionMemory> experienceReplay, T outputOfInterest,\n\t\t\tRelationManager<T> relMngr, int[] numHidden, int epochs, double lRate, double mRate, double sRate) {\n\n\t\tint outKey = getVectorKey(outputOfInterest);\n\t\tint[] inKeys = getInKeys(outputOfInterest, relMngr);\n\t\t\n\t\tfor(int i = 0; i < epochs; i++) {\n\t\t\tIterator<TransitionMemory> iter = experienceReplay.getBatch().iterator();\n\t\t\tdouble inActivations[] = new double[inKeys.length];\n//\t\t\tdouble err = 0;\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tTransitionMemory tm = iter.next();\n\t\t\t\tdouble[] preStateAndAction = tm.getPreStateAndAction();\n\t\t\t\tdouble[] postState = tm.getPostState();\n\t\t\t\tint j = 0;\n\t\t\t\tfor (int k : inKeys) inActivations[j++] = k >= 0 ? preStateAndAction[k] : 0;\n\t\t\t\tif (neuralNet == null) neuralNet = new FFNeuralNetwork(ActivationFunction.SIGMOID0p5,\n\t\t\t\t\t\tinActivations.length, 1, numHidden);\n\t\t\t\tFFNeuralNetwork.feedForward(neuralNet.getInputNodes(), inActivations);\n\t\t\t\tFFNeuralNetwork.backPropagate(neuralNet.getOutputNodes(), lRate, mRate, sRate, postState[outKey]);\n//\t\t\t\terr += FFNeuralNetwork.getError(new double[] {postState[outKey]}, neuralNet.getOutputNodes());\n\t\t\t}\n//\t\t\tSystem.out.println(i + \"\t\" + err / experienceReplay.getSize());\n\t\t}\n//\t\tSystem.out.println();\n\t\tif (rel2ModuleInput.isEmpty()) {\n\t\t\tArrayList<? extends Node> inputNodes = neuralNet.getInputNodes();\n\t\t\tint j = 0;\n\t\t\tfor (IndirectInput rel : relations) rel2ModuleInput.put(rel, inputNodes.get(j++));\n\t\t}\n\t}", "private void trainFeatures() throws Exception\n\t{\n\t\tdbiterator.setDataSource(DBInstanceIterator.DBSource.FEATURE);\n\t\tSystem.out.println(\"Starting reading Feature Trainingset ..\");\n\t\tPipe serialpipe = getFeaturePipe();\n\t\tInstanceList feature_instances = new InstanceList(serialpipe);\n\t\tSystem.out.println(\"Preprocessing on Feature Trainingset ..\");\n\t\tfeature_instances.addThruPipe(dbiterator);\n\t\tSystem.out.println(\"Feature Training set : \" + feature_instances.size());\n\t\tSystem.out.println(\"Saving preprocessed data ..\");\n\t\tsaveinstances(feature_instances, Train + \"F.bin\");\n\t\tSystem.out.println(\"Saving Features data ..\");\n\t\tfeature_instances.getDataAlphabet().dump(new PrintWriter(new File(Attributes + \"feature.dat\")));\n\t\tClassifierTrainer trainer = new NaiveBayesTrainer();\n\t\tSystem.out.println(\"NaiveBayes Starts Training on Feature training set ..\");\n\t\tClassifier classifier = trainer.train(feature_instances);\n\t\tSystem.out.println(\"Targets labels : \\t\"+classifier.getLabelAlphabet());\n\t\tSystem.out.println(\"Saving Naive Bayes Classifier ..\");\n\t\tsaveModel(classifier, Feature_Train);\n\t\tSystem.out.println(\"Feature classifier saved to : \" + Feature_Train);\n\t}", "public static void train(MultiLayerPerceptron mlp, int epochs){\n for(int i = 0; i < epochs; i++){\n /**\n * Randomize the order of the samples.\n */\n trainingSet.shuffle();\n for(int j = 0; j < trainingSet.getTests().size(); j++){\n ArrayList<Float> actualOutput = mlp.calculateOutput(trainingSet.getInput(j));\n ArrayList<Float> expectedOutput = trainingSet.getOutput(j);\n\n mlp.modifyWeights(actualOutput,expectedOutput);\n }\n }\n }", "public void trainModel(List<BugReport> brs){\r\n\t\t\r\n\t\tdouble startTime = System.currentTimeMillis();\r\n\t\tthis.initializeModel(brs);\r\n\t\tthis.inferenceModel(brs);\r\n\t\tdouble endTime = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"LDA training time cost: \"+(endTime-startTime)/1000.0);\r\n\t\t\r\n\t}", "public MM_DriveTrain(LinearOpMode opMode){\n this.opMode = opMode;\n flMotor = opMode.hardwareMap.get(DcMotor.class, \"flMotor\");\n frMotor = opMode.hardwareMap.get(DcMotor.class, \"frMotor\");\n blMotor = opMode.hardwareMap.get(DcMotor.class, \"blMotor\");\n brMotor = opMode.hardwareMap.get(DcMotor.class, \"brMotor\");\n\n flMotor.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n frMotor.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n blMotor.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n brMotor.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n\n setMotorPowerSame(0);\n\n initializeGyro();\n initHardware();\n }", "public void train() {\n while (!environment.inTerminalState()) {\n\n Action action = policy.chooseAction(environment);\n List<Double> stateAction = environment.getStateAction(action);\n\n double knownReward = environment.immediateReward(action);\n double totalReward = environment.performAction(action);\n double unknownReward = totalReward - knownReward;\n\n // Next state of environment is implicitly passed.\n backup(stateAction, unknownReward);\n }\n }", "protected void trainModuleNN(Map<DiscreteState, Double> out1f, int[] numHidden,\n\t\t\tint epochs, double lRate, double mRate, double sRate) {\n\t\tfor(int i = 0; i < epochs; i++) {\n//\t\t\tdouble err = 0;\n\t\t\tfor (Map.Entry<DiscreteState, Double> entry : out1f.entrySet()) {\n\t\t\t\tdouble[] input = entry.getKey().getRawState();\n\t\t\t\tif (neuralNet == null) neuralNet = new FFNeuralNetwork(ActivationFunction.SIGMOID0p5,\n\t\t\t\t\t\tinput.length, 1, numHidden);\n\t\t\t\tFFNeuralNetwork.feedForward(neuralNet.getInputNodes(), input);\n\t\t\t\tFFNeuralNetwork.backPropagate(neuralNet.getOutputNodes(), lRate, mRate, sRate, entry.getValue());\n//\t\t\t\terr += FFNeuralNetwork.getError(new double[] {entry.getValue()}, neuralNet.getOutputNodes());\n\t\t\t}\n//\t\t\tSystem.out.println(i + \"\t\" + err / out1f.size());\n\t\t}\n//\t\tfor (Map.Entry<DiscreteState, Double> entry : out1f.entrySet()) {\n//\t\t\tFFNeuralNetwork.feedForward(neuralNet.getInputNodes(), entry.getKey().getRawState());\n//\t\t\tSystem.out.println(entry.getValue() + \"\tvs\t\" + neuralNet.getOutputNodes().get(0).getActivation());\n//\t\t}\n\t\tif (rel2ModuleInput.isEmpty()) {\n\t\t\tArrayList<? extends Node> inputNodes = neuralNet.getInputNodes();\n\t\t\tint j = 0;\n\t\t\tfor (IndirectInput rel : relations) rel2ModuleInput.put(rel, inputNodes.get(j++));\n\t\t}\n\t}", "public void TrainDataset(){\n\t\ttry{\n\t\t\t//Testing delegate method\n\t\t\tMessageController.logToConsole(\"Hey, I'm from train button\");\n\t\t\t\n\t\t\t//Pass in the real training dataset\n\t\t\tfindSuitableK(new String[]{\"Hello\", \"World\"});\n\t\t\t\n\t\t\t//Pass in the 'k' and 'query string'\n\t\t\tfindKNN(2, \"anything\");\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tthrow ex;\n\t\t}\n\t\tfinally{\n\t\t\t\n\t\t}\n\t}", "public abstract void setTrainParams(ClassificationMethod method,URL model,Map<String,Object> args) throws ClassificationException;", "public void fit(ArrayList trainData) {\n this.trainingData = trainData;\n }", "@Override\r\n\tpublic void train(Documents trainingDocs) {\r\n\t\t// Convert the training documents to data.\r\n\t\tdata = convertDocumentsToData(trainingDocs);\r\n\t\t// Also add the words from the source domains into the featureIndexer.\r\n\t\tfor (String featureStr : knowledge.wordCountInPerClass\r\n\t\t\t\t.keySet()) {\r\n\t\t\tfeatureIndexerAllDomains\r\n\t\t\t\t\t.addFeatureStrIfNotExistStartingFrom0(featureStr);\r\n\t\t}\r\n\r\n\t\t// Initialize array from data.\r\n\t\tclassInstanceCount = new double[2];\r\n\t\tclassInstanceCount[0] = trainingDocs.getNoOfPositiveLabels();\r\n\t\tclassInstanceCount[1] = trainingDocs.getNoOfNegativeLabels();\r\n\t\t// Initialize array from knowledge.\r\n\t\tV = featureIndexerAllDomains.size();\r\n\t\tx = new double[V][];\r\n\t\tfor (int v = 0; v < V; ++v) {\r\n\t\t\tString featureStr = featureIndexerAllDomains\r\n\t\t\t\t\t.getFeatureStrGivenFeatureId(v);\r\n\t\t\tif (knowledge.wordCountInPerClass\r\n\t\t\t\t\t.containsKey(featureStr)) {\r\n\t\t\t\tx[v] = knowledge.wordCountInPerClass\r\n\t\t\t\t\t\t.get(featureStr);\r\n\t\t\t} else {\r\n\t\t\t\t// The word only appears in the target domain.\r\n\t\t\t\tx[v] = new double[] { 0.0, 0.0 };\r\n\t\t\t}\r\n\t\t}\r\n\t\tsum_x = knowledge.countTotalWordsInPerClass;\r\n\r\n\t\tif (param.convergenceDifference != Double.MAX_VALUE) {\r\n\t\t\t// Stochastic gradient descent.\r\n\t\t\tSGDEntry();\r\n\t\t}\r\n\r\n\t\t// Check if any value in x is nan or infinity.\r\n\t\tfor (int i = 0; i < x.length; ++i) {\r\n\t\t\tExceptionUtility\r\n\t\t\t\t\t.assertAsException(!Double.isNaN(x[i][0]), \"Is Nan\");\r\n\t\t\tExceptionUtility\r\n\t\t\t\t\t.assertAsException(!Double.isNaN(x[i][1]), \"Is Nan\");\r\n\t\t\tExceptionUtility.assertAsException(!Double.isInfinite(x[i][0]),\r\n\t\t\t\t\t\"Is Infinite\");\r\n\t\t\tExceptionUtility.assertAsException(!Double.isInfinite(x[i][1]),\r\n\t\t\t\t\t\"Is Infinite\");\r\n\t\t}\r\n\r\n\t\t// Update classification knowledge.\r\n\t\tknowledge = new ClassificationKnowledge();\r\n\t\t// knowledge.countDocsInPerClass = mCaseCounts;\r\n\t\t// knowledge.wordCountInPerClass =\r\n\t\t// mFeatureStrToCountsMap;\r\n\t\t// knowledge.countTotalWordsInPerClass =\r\n\t\t// mTotalCountsPerCategory;\r\n\t}", "public void train() {\n\n\t\tint D = Os.length;\n\t\tint T_n = 0;\n\t\tdouble log_likelihood = 0;\n\t\tdouble log_likelihood_new = 0;\n\t\tdouble epsilon = this.epsilon;\n\t\tint maxIter = this.maxIter;\n\n\t\t// Initialization\n\n\t\tclearVector(pi);\n\t\tclearMatrix(A);\n\t\tclearMatrix(B);\n\n\t\tdouble[] a = allocateVector(N);\n\t\tdouble[] b = allocateVector(N);\n\n\t\tint[] Q_n = null;\n\t\tint[] O_n = null;\n\t\t\n\t\tif (Qs == null) {\n\t\t\t\n\t\t\tpi = initializePi();\n\t\t\tA = initializeA();\n\t\t\tB = initializeB();\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tfor (int n = 0; n < D; n++) {\n\t\t\t\tQ_n = Qs[n];\n\t\t\t\tO_n = Os[n];\n\t\t\t\tT_n = Os[n].length;\n\t\t\t\tfor (int t = 0; t < T_n; t++) {\n\t\t\t\t\tif (t < T_n - 1) {\n\t\t\t\t\t\tA[Q_n[t]][Q_n[t + 1]] += 1;\n\t\t\t\t\t\ta[Q_n[t]] += 1;\n\t\t\t\t\t\tif (t == 0) {\n\t\t\t\t\t\t\tpi[Q_n[0]] += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tB[Q_n[t]][O_n[t]] += 1;\n\t\t\t\t\tb[Q_n[t]] += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdivideAssign(pi, D);\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tdivideAssign(A[i], a[i]);\n\t\t\t\tdivideAssign(B[i], b[i]);\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\tint s = 0;\n\t\tdouble[] pi_new = allocateVector(N);\n\t\tdouble[][] A_new = allocateMatrix(N, N);\n\t\tdouble[][] B_new = allocateMatrix(N, M);\n\t\tdouble[] temp_pi = null;\n\t\tdouble[][] temp_A = null;\n\t\tdouble[][] temp_B = null;\n\t\tdouble[][] alpha_hat = null;\n\t\tdouble[][] beta_hat = null;\n\t\tdouble[] c_n = null;\n\t\tdouble[][] xi = allocateMatrix(N, N);\n\t\tdouble[] gamma = allocateVector(N);\n\t\tdo {\n\n\t\t\t// Clearance\n\t\t\tclearVector(pi_new);\n\t\t\tclearMatrix(A_new);\n\t\t\tclearMatrix(B_new);\n\t\t\tclearVector(a);\n\t\t\tclearVector(b);\n\t\t\t/*clearMatrix(xi);\n\t\t\tclearVector(gamma);*/\n\t\t\tlog_likelihood_new = 0;\n\n\t\t\tfor (int n = 0; n < D; n++) {\n\n\t\t\t\t// Q_n = Qs[n];\n\t\t\t\tO_n = Os[n];\n\t\t\t\tT_n = Os[n].length;\n\t\t\t\tc_n = allocateVector(T_n);\n\t\t\t\talpha_hat = allocateMatrix(T_n, N);\n\t\t\t\tbeta_hat = allocateMatrix(T_n, N);\n\n\t\t\t\t// Forward Recursion with Scaling\t\t\t\n\n\t\t\t\tfor (int t = 0; t <= T_n - 1; t++) {\n\t\t\t\t\tif (t == 0) {\n\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\talpha_hat[0][i] = pi[i] * B[i][O_n[0]];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\t\talpha_hat[t][j] += alpha_hat[t - 1][i] * A[i][j] * B[j][O_n[t]];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tc_n[t] = 1.0 / sum(alpha_hat[t]);\n\t\t\t\t\ttimesAssign(alpha_hat[t], c_n[t]);\n\t\t\t\t}\n\n\t\t\t\t// Backward Recursion with Scaling\n\n\t\t\t\tfor (int t = T_n + 1; t >= 2; t--) {\n\t\t\t\t\tif (t == T_n + 1) {\n\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\tbeta_hat[t - 2][i] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (t <= T_n) {\n\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\t\t\t\tbeta_hat[t - 2][i] += A[i][j] * B[j][O_n[t - 1]] * beta_hat[t - 1][j];\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\ttimesAssign(beta_hat[t - 2], c_n[t - 2]);\n\t\t\t\t}\n\n\t\t\t\t// Expectation Variables and Updating Model Parameters\n\n\t\t\t\tfor (int t = 0; t <= T_n - 1; t++) {\n\t\t\t\t\tif (t < T_n - 1) {\n\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\t\t\t\txi[i][j] = alpha_hat[t][i] * A[i][j] * B[j][O_n[t + 1]] * beta_hat[t + 1][j];\n\t\t\t\t\t\t\t\t// A_new[i][j] += xi[i][j];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tplusAssign(A_new[i], xi[i]);\n\t\t\t\t\t\t\tgamma[i] = sum(xi[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (t == 0) {\n\t\t\t\t\t\t\tplusAssign(pi_new, gamma);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplusAssign(a, gamma);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassignVector(gamma, alpha_hat[t]);\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\t\tB_new[j][O_n[t]] += gamma[j];\n\t\t\t\t\t}\n\t\t\t\t\tplusAssign(b, gamma);\n\t\t\t\t\tlog_likelihood_new += -Math.log(c_n[t]);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Normalization (Sum to One)\n\n\t\t\tsum2one(pi_new);\n\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tdivideAssign(A_new[i], a[i]);\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\tdivideAssign(B_new[j], b[j]);\n\t\t\t}\n\n\t\t\ttemp_pi = pi;\n\t\t\tpi = pi_new;\n\t\t\tpi_new = temp_pi;\n\n\t\t\ttemp_A = A;\n\t\t\tA = A_new;\n\t\t\tA_new = temp_A;\n\n\t\t\ttemp_B = B;\n\t\t\tB = B_new;\n\t\t\tB_new = temp_B;\n\t\t\t// display(B);\n\n\t\t\ts = s + 1;\n\n\t\t\tif (s > 1) {\n\t\t\t\tif (Math.abs((log_likelihood_new - log_likelihood) / log_likelihood) < epsilon) {\n\t\t\t\t\tfprintf(\"log[P(O|Theta)] does not increase.\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlog_likelihood = log_likelihood_new;\n\t\t\tfprintf(\"Iter: %d, log[P(O|Theta)]: %f\\n\", s, log_likelihood);\n\n\t\t} while (s < maxIter);\n\n\t}", "public void trainModel(String input) {\n\n String[] words = input.split(\" \");\n String currentWord = \"\";\n\n for (int i = 0; i < words.length; i++) {\n\n if (i == 0 || words[i-1].contains(\".\")) {\n model.get(\"_begin\").add(words[i]);\n } else if (i == words.length - 1 || words[i].contains(\".\")) {\n model.get(\"_end\").add(words[i]);\n } else {\n model.putIfAbsent(currentWord, new ArrayList<String>());\n model.get(currentWord).add(words[i]);\n }\n\n currentWord = words[i];\n\n }\n }", "private void trainPerceptrons(){\n double activationValues[] = new double[4];\n for(Image image:asciiReader.getTrainingImages()){\n for (int j = 0 ; j < activationValues.length; j++){\n activationValues[j] = activationFunction\n .apply(sumWeights(j,image));\n }\n adjustWeights(activationValues,image);\n }\n }", "public Train(Car... cars) {\n\t\tthis.cars = new CopyOnWriteArrayList<Car>();\n\t\tfor (Car car : cars)\n\t\t{\n\t\t\tthis.cars.add(car);\n\t\t\tcar.setTrain(this);\n\t\t}\n\t}", "private static native boolean train_0(long nativeObj, long trainData_nativeObj, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long params_nativeObj);", "public void FeedForward() {\r\n\t\tfor (int i = 0; i < Node.length; i++) {\r\n\t\t\tNet = Node[i].Threshold;\r\n\r\n\t\t\tfor (int j = 0; j < Node[i].Weight.length; j++)\r\n\t\t\t\tNet = Net + Input[j] * Node[i].Weight[j];\r\n\r\n\t\t\tNode[i].Output = Sigmoid(Net);\r\n\t\t}\r\n\t}", "private void trainLexicon() throws Exception\n\t{\n\t\tSystem.out.println(\"Starting reading Lexicon Training set ..\");\n\t\tInstanceList lexicon_instance = dbiterator.getInstancesFromAlphabets(DBInstanceIterator.DBSource.LEXICON);\n\t\tSystem.out.println(\"Lexicon Training set : \" + lexicon_instance.size());\n\t\t/*svm_parameter param = new svm_parameter();\n\t\tparam.gamma = 0.0;\n\t\tparam.C = 100.0;*/\n\t\tSVMClassifierTrainer trainer = new SVMClassifierTrainer(new LinearKernel(), true);\n\t\tSystem.out.println(\"SVM Starts Training on lexicon training set ..\");\n\t\tSVMClassifier classifier = trainer.train(lexicon_instance);\n\t\tSystem.out.println(\"Saving SVM Classifier ..\");\n\t\tSystem.out.println(lexicon_instance.targetLabelDistribution());\n\t\tsaveModel(classifier, Lexicon_Train);\n\t\tSystem.out.println(\"Lexicon classifier saved to : \" + Lexicon_Train);\n\t}", "public void train() throws RankingException {\n\t\tif (this.listener != null) this.classifier.setLearningListener(this);\n\t\t\n\t\ttry {\n\t\t\tthis.classifier.train(set);\n\t\t\tthis.accuracy = this.classifier.accuracy(set);\n\t\t}\n\t\tcatch (ClassifierException e) {\n\t\t\tthrow new RankingException(\"Error training using Boosting algorithm: \"+e.getMessage(), e);\n\t\t}\n\t}", "public boolean train(Mat trainData, Mat responses)\r\n {\r\n\r\n boolean retVal = train_1(nativeObj, trainData.nativeObj, responses.nativeObj);\r\n\r\n return retVal;\r\n }", "@Override\n public void train(DataSet examples) {\n // check\n Example first = examples.getExample(0);\n if (!(first.get(\"INPUT\").getValue() instanceof Double[])) {\n throw new RuntimeException(\"NeuralNetworkLearner inputs must be passed as a Double[] in the \\\"INPUT\\\" attribute\");\n }\n if (!(first.getOutput() instanceof Double[])) {\n throw new RuntimeException(\"NeuralNetworkLearner output must be set to a Double[]\");\n }\n // convert example set\n DataList[] inputs = new DataList[examples.size()];\n DataList[] outputs = new DataList[examples.size()];\n for (int i = 0; i < examples.size(); i++) {\n inputs[i] = new DataList((Double[]) examples.getExample(i).get(\"INPUT\").getValue());\n outputs[i] = new DataList((Double[]) examples.getExample(i).getOutput());\n }\n // train\n try {\n this.network.train(inputs, outputs, this.target_error_rate);\n } catch (SizeDifferenceException e) {\n throw new RuntimeException(e);\n } catch (WrongSizeException e) {\n throw new RuntimeException(e);\n }\n }", "public IObserver train(IContext context) throws ThinklabException;", "public Drivetrain(){\r\n LeftSlave.follow(LeftMaster);\r\n RightSlave.follow(RightMaster);\r\n\r\n RightMaster.setInverted(true);\r\n LeftMaster.setInverted(true);\r\n\r\n gyro.reset();\r\n}", "void storeTraining(Training training);", "void pretrain(DataSetIterator iterator);", "public Train(List<Car> tab)\n\t{\n\t\tthis.cars = new CopyOnWriteArrayList<Car>();\n\t\tfor (Car car : tab)\n\t\t{\n\t\t\tthis.cars.add(car);\n\t\t\tcar.setTrain(this);\n\t\t} \n\t}", "public ArrayList<Double> calculateForward(ArrayList<Example> data) {\n\t\t// store outputs from hidden layer for each example\n\t\t// array will have size # examples.\n\t\tArrayList<Double> nodeOutputs = new ArrayList<Double>();\n\n\t\t// randomly shuffle training data\n\t\tCollections.shuffle(data);\n\n\t\t// go through each example and calculate forwards\n\t\tfor (Example ex : data) {\n\t\t\t// get associated weight in hiddenWeights & calculate dot product,\n\t\t\t// run through tanh function\n\t\t\tdouble bias = ex.getFeature(ex.getFeatureSet().size() - 1);\n\t\t\tArrayList<Double> thisNodeOutputs = new ArrayList<Double>();\n\t\t\t// loop through features, and the weight vector for each feature\n\t\t\tfor (int n = 0; n < numHidden; n++) {\n\t\t\t\tdouble thisNode = 0.0; // get dot product of f & h for each node\n\t\t\t\tArrayList<Double> weightVec = hiddenWeights.get(n);\n\t\t\t\tSet<Integer> features = ex.getFeatureSet();\n\t\t\t\tIterator<Integer> iter = features.iterator();\n\t\t\t\tfor (int i = 0; i < features.size(); i++) {\n\t\t\t\t\tdouble featureVal = ex.getFeature(iter.next());\n\t\t\t\t\tdouble weight = weightVec.get(i);\n\t\t\t\t\tthisNode += weight * featureVal;\n\t\t\t\t}\n\t\t\t\tthisNodeOutputs.add(Math.tanh(thisNode * bias));\n\t\t\t}\n\t\t\thiddenOutputs.add(thisNodeOutputs);\n\t\t\t// now do same for output layer\n\t\t\tdouble outSum = 0.0;\n\t\t\tfor (int i = 0; i < numHidden; i++) {\n\t\t\t\tdouble w = layerTwoWeights.get(i);\n\t\t\t\tdouble output = thisNodeOutputs.get(i);\n\t\t\t\toutSum += w * output;\n\t\t\t}\n\t\t\tnodeOutputs.add(Math.tanh(outSum * bias));\n\t\t}\n\t\treturn nodeOutputs;\n\t}", "TrainingTest createTrainingTest();", "public void buildModel() {\n double loss_pre = Double.MAX_VALUE;\n for (int iter = 0; iter < maxIter; iter ++) {\n Long start = System.currentTimeMillis();\n if (showProgress)\n System.out.println(\"Iteration \"+(iter+1)+\" started\");\n // Update user latent vectors\n IntStream.range(0,userCount).parallel().peek(i->update_user(i)).forEach(j->{});\n /*\n for (int u = 0; u < userCount; u ++) {\n update_user(u);\n }\n */\n if (showProgress) {\n System.out.println(\"Users updated for \" + (System.currentTimeMillis() - start) + \"millis\");\n start = System.currentTimeMillis();\n }\n\n IntStream.range(0,itemCount).parallel().peek(i->update_item(i)).forEach(j->{});\n // Update item latent vectors\n /*\n for (int i = 0; i < itemCount; i ++) {\n update_item(i);\n }\n */\n if (showProgress) {\n System.out.println(\"Items updated for \" + (System.currentTimeMillis() - start) + \"millis\");\n start = System.currentTimeMillis();\n }\n\n // Show loss\n if (showLoss)\n loss_pre = showLoss(iter, start, loss_pre);\n\n\n } // end for iter\n\n }", "public abstract void fit(BinaryData trainingData);", "public Results train(Network network, List<Example> examples) {\n //double thresh;\n Results res = null;\n if (Global.isCheckback()) {\n if (Global.getGrounding() == Global.groundingSet.avg) {\n Learner s = new Learner();\n res = s.checkbackAvg(network, examples);\n } else {\n Learner s = new Learner();\n res = s.checkback(network, examples);\n }\n } else if (Global.getBatch() == Global.batch.YES) {\n BatchLearner bs = new BatchLearner();\n res = bs.solve(network, examples);\n } else if (Global.isCumulativeRestarts()) {\n if (Global.getGrounding() == Global.groundingSet.avg) {\n Learner s = new Learner();\n res = s.solveAvgIterative(network, examples);\n } else if (Global.getGrounding() == Global.groundingSet.max) {\n Learner s = new Learner();\n res = s.solveMaxIterative(network, examples);\n }\n } else {\n if (Global.getGrounding() == Global.groundingSet.avg) {\n Learner s = new Learner();\n res = s.solveAvg(network, examples);\n } else if (Global.getGrounding() == Global.groundingSet.max) {\n Learner s = new Learner();\n res = s.solveMax(network, examples);\n }\n }\n\n return res;\n }", "public void train(Collection<List<String>> sentences) {\n\tUnigram.train(sentences);\n\tBigram.train(sentences);\n\tTrigram.train(sentences);\n\t\n\tdouble[] newW = {0.0, 0.0, 0.0};\n\tdouble PMax = 0.0;\n\tfor(double i = 0.05; i < 0.95; i+=0.05){\n\t for(double j = 0.05; j < 0.95; j+=0.05){\n\t\tdouble k = 1 - i - j;\n\t\tif(k > 0){\n\t\t Weights[0] = i;\n\t\t Weights[1] = j;\n\t\t Weights[2] = k;\n\t\t double P = 0.0;\n\t\t for(List<String> sentence : sentences){\n\t\t\tP+= getSentenceProbability(sentence);\n\t\t }\n\t\t if(P > PMax){\n\t\t\tSystem.out.println(\"New: \"+i+\",\"+j+\",\"+k+\" = \" + P);\n\t\t\tnewW[0] = i;\n\t\t\tnewW[1] = j;\n\t\t\tnewW[2] = k;\n\t\t\tPMax = P;\n\t\t }\n\t\t}\n\t }\n\t}\n\tSystem.out.println(\"New WIGHTS: \"+newW[0]+\",\"+newW[1]+\",\"+newW[2]);\n\tWeights = newW;\n }", "private void trainCombined() throws Exception\n\t{\n\t\tdbiterator.setDataSource(DBInstanceIterator.DBSource.COMPLEX);\n\t\tSystem.out.println(\"Starting reading Complex Trainingset ..\");\n\t\tPipe serialpipe = getComplexPipe(); //as reference unigram best than unigram in POS\n\t\tInstanceList complex_instances = new InstanceList(serialpipe);\n\t\tSystem.out.println(\"Preprocessing on Complex Trainingset ..\");\n\t\tcomplex_instances.addThruPipe(dbiterator);\n\t\tSystem.out.println(\"Complex Training set : \" + complex_instances.size());\n\t\tSystem.out.println(\"Saving preprocessed data ..\");\n\t\tsaveinstances(complex_instances, Train + \"C.bin\");\n\t\tSystem.out.println(\"Saving Complex data ..\");\n\t\tcomplex_instances.getDataAlphabet().dump(new PrintWriter(new File(Attributes + \"complex.dat\")));\n\n\t\tClassifierTrainer trainer = new NaiveBayesTrainer();\n\t\tSystem.out.println(\"NaiveBayes Starts Training on Complex training set ..\");\n\t\tClassifier classifier = trainer.train(complex_instances);\n\t\tSystem.out.println(\"Targets labels : \\t\"+classifier.getLabelAlphabet());\n\t\tSystem.out.println(\"Saving Naive Bayes Classifier ..\");\n\t\tsaveModel(classifier, Complex_Train);\n\t\tSystem.out.println(\"Complex classifier saved to : \" + Complex_Train);\n\t}", "private void backwardPropagation(int[] trainingData, int[] trainingLabel, double[] outputActivations, double[] hiddenActiv) {\n\t\tdouble[] delta = new double[SIZE_OUTPUT_LAYER];\n\t\t// Update OutputLayer weights\n\t\tfor(int indexOutput = 0; indexOutput < SIZE_OUTPUT_LAYER; indexOutput++) {\n\t\t\t// We define delta as the difference between the real label and the softmax probability\n\t\t\tdelta[indexOutput] = trainingLabel[indexOutput] - outputActivations[indexOutput];\n\n\t\t\tfor(int indexHidden = 0; indexHidden < SIZE_HIDDEN_LAYER; indexHidden++) {\n\t\t\t\tweightsOfOutputLayer[indexOutput][indexHidden] += learningRate * delta[indexOutput] * hiddenActiv[indexHidden] / datasetSize;\n\t\t\t}\t\n\t\t\tbiasOfOutputLayer[indexOutput] += learningRate * delta[indexOutput] / datasetSize;\n\t\t}\t\n\t\t// Create delta2 \n\t\tdouble[] delta2 = new double[SIZE_HIDDEN_LAYER];\n\t\tfor(int i = 0; i < SIZE_HIDDEN_LAYER; i++) {\n\t\t\tdelta2[i] = 0;\n\t\t\tfor(int j = 0; j < SIZE_OUTPUT_LAYER; j++) {\n\t\t\t\t// Why is it multiplying the weights for delta1?\n\t\t\t\tdelta2[i] += delta[j] * weightsOfOutputLayer[j][i];\n\t\t\t}\n\t\t\tdelta2[i] *= dtanh(hiddenActiv[i]);\n\t\t}\n\t\t// Update HiddenLayer weights\n\t\tfor(int i = 0; i < SIZE_HIDDEN_LAYER; i++) {\n\t\t\tfor(int j = 0; j < SIZE_INPUT_LAYER; j++) {\n weightsOfHiddenLayer[i][j] += learningRate * delta2[i] * (double)trainingData[j] / datasetSize;\n\t\t\t}\n biasOfHiddenLayer[i] += learningRate * delta2[i] / datasetSize;\n\t\t}\t\n\t}", "public void train(double[] inputs, double[] outputsTarget) {\n assert(outputsTarget.length == weights.get(weights.size() - 1).length);\n \n ArrayList<double[]> layersOutputs = new ArrayList<double[]>(); \n classify(inputs, layersOutputs);\n\n // Calculate sensitivities for the output nodes\n int outputNeuronCount = this.weights.get(this.weights.size() - 1).length;\n double[] nextLayerSensitivities = new double[outputNeuronCount];\n assert(layersOutputs.get(layersOutputs.size() - 1).length == outputNeuronCount);\n for (int i = 0; i < outputNeuronCount; i++) {\n nextLayerSensitivities[i] = calculateErrorPartialDerivitive(\n layersOutputs.get(layersOutputs.size() - 1)[i],\n outputsTarget[i]\n ) * calculateActivationDerivitive(layersOutputs.get(layersOutputs.size() - 1)[i]);\n assert(!Double.isNaN(nextLayerSensitivities[i]));\n }\n\n for (int weightsIndex = this.weights.size() - 1; weightsIndex >= 0; weightsIndex--) {\n int previousLayerNeuronCount = this.weights.get(weightsIndex)[0].length;\n int nextLayerNeuronCount = this.weights.get(weightsIndex).length;\n assert(nextLayerSensitivities.length == nextLayerNeuronCount);\n\n double[] previousLayerOutputs = layersOutputs.get(weightsIndex);\n double[] previousLayerSensitivities = new double[previousLayerNeuronCount];\n\n // Iterate over neurons in the previous layer\n for (int j = 0; j < previousLayerNeuronCount; j++) {\n\n // Calculate the sensitivity of this node\n double sensitivity = 0;\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n sensitivity += nextLayerSensitivities[i] * this.weights.get(weightsIndex)[i][j];\n }\n sensitivity *= calculateActivationDerivitive(previousLayerOutputs[j]);\n assert(!Double.isNaN(sensitivity));\n previousLayerSensitivities[j] = sensitivity;\n\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n double weightDelta = learningRate * nextLayerSensitivities[i] * calculateActivation(previousLayerOutputs[j]);\n this.weights.get(weightsIndex)[i][j] += weightDelta;\n assert(!Double.isNaN(this.weights.get(weightsIndex)[i][j]) && !Double.isInfinite(this.weights.get(weightsIndex)[i][j]));\n }\n }\n\n nextLayerSensitivities = previousLayerSensitivities;\n }\n }", "public boolean train_auto(Mat trainData, Mat responses, Mat varIdx, Mat sampleIdx, CvSVMParams params)\r\n {\r\n\r\n boolean retVal = train_auto_1(nativeObj, trainData.nativeObj, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, params.nativeObj);\r\n\r\n return retVal;\r\n }", "public boolean train(Mat trainData, Mat responses, Mat varIdx, Mat sampleIdx, CvSVMParams params)\r\n {\r\n\r\n boolean retVal = train_0(nativeObj, trainData.nativeObj, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, params.nativeObj);\r\n\r\n return retVal;\r\n }", "public void trainWeights(int numEpochs, int player, int winner) {\n // Will be using the boardStates member which has already encoded the\n // boards on the path to the endgame.\n // The board states must now be fit to a reinforcement learning curve.\n double[][] trainingOutput = new double[stateCount][1]; // this is the total output (useful if using an ANN).\n double nn_i_succ = 0.0;\n double nn_i = 0.0;\n\n //REALLY IMPORTANT: Training is from the perspective of the black player, so if black lost, training will\n //use negative values. If black won, it will be trained with positive values. This must be kept in mind\n //when querying the features for values!\n\n //every other value depends on this one.\n for (int i=stateCount-1; i>=0; i--) {\n //for convenience get the value of the nn at boardStates[i] and boardStates[i+1]\n if (i == stateCount-1) {\n if (winner == LOABoard.PLAYER_BLACK)\n nn_i_succ = 1;\n else if (winner == LOABoard.PLAYER_WHITE)\n nn_i_succ = -1;\n else // Draw\n nn_i_succ = 0;\n } else {\n nn_i_succ = DISCOUNT_FACTOR * nn_i;\n }\n\n nn_i = 0;\n for ( int j = 0; j < numberOfWeights; j++ )\n nn_i += boardStates[i][j] * weights[j];\n\n trainingOutput[i][0] = nn_i + LEARNING_RATE*(nn_i_succ-nn_i);\n\n for (int j=0; j< numberOfWeights; j++) {//each epoch involves training on every board state in the game\n weights[j] = weights[j] + LEARNING_RATE*(nn_i_succ-nn_i)*boardStates[i][j];\n }//for j\n }//for i\n\n ////begin debug\n//\t System.out.println(\"Debug Message: Displaying array trainingOutput (after fit to TD learning curve) \" + stateCount);\n//\t for (int debug =0; debug < trainingOutput.length; debug++) {\n//\t\tSystem.out.println(trainingOutput[debug][0]);\n// }\n ////done debug\n\n System.out.println(\"Debug Message: Displaying weights array after update.\");\n for (int i = 0; i < numberOfWeights; i++) {\n System.out.println(weights[i]);\n }\n\n System.out.println(\"Info Message: Done training weights on results from game.\");\n }", "private static native boolean train_auto_0(long nativeObj, long trainData_nativeObj, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long params_nativeObj, int k_fold, long Cgrid_nativeObj, long gammaGrid_nativeObj, long pGrid_nativeObj, long nuGrid_nativeObj, long coeffGrid_nativeObj, long degreeGrid_nativeObj, boolean balanced);", "@Test\n public void testTrain() {\n System.out.println(\"train\");\n TokenizedLine tokenizedLine = null;\n ArrayList<Words> expResult = null;\n ArrayList<Words> result = Training.train(tokenizedLine);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public void driveTrainLoop() {\n if (Config.getInstance().getBoolean(Key.ROBOT__HAS_DRIVETRAIN)) {\n // Check User Inputs\n double driveThrottle = mOperatorInterface.getDriveThrottle();\n double driveTurn = mOperatorInterface.getDriveTurn();\n\n boolean WantsAutoAim = mOperatorInterface.getFeederSteer();\n\n // Continue Driving\n if (WantsAutoAim == true) {\n // Harvest Mode - AutoSteer Functionality\n // Used for tracking a ball\n // we may want to limit the speed?\n // RobotTracker.RobotTrackerResult DriveResult =\n // mRobotTracker.GetFeederStationError(Timer.getFPGATimestamp());\n mDriveState = DriveState.AUTO_DRIVE;\n\n VisionPacket vp = mRobotTracker.GetTurretVisionPacket(Timer.getFPGATimestamp());\n // mDrive.autoSteerFeederStation(driveThrottle, vp.Error_Angle);\n } else {\n // Standard Manual Drive\n mDrive.setDrive(driveThrottle, driveTurn, false);\n\n // if we were previously in auto drive.. turn it off\n if (mDriveState == DriveState.AUTO_DRIVE) {\n mDriveState = DriveState.MANUAL;\n }\n }\n }\n }", "public void drivetrainInitialization()\n\t{\n\t\tleftSRX.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, Constants.kTimeoutMs);\n\t\tleftSRX.setSensorPhase(true);\n\t\tleftSRX.configNominalOutputForward(0, Constants.kTimeoutMs);\n\t\tleftSRX.configNominalOutputReverse(0, Constants.kTimeoutMs);\n\t\tleftSRX.configPeakOutputForward(1, Constants.kTimeoutMs);\n\t\tleftSRX.configPeakOutputReverse(-1, Constants.kTimeoutMs);\n\n\t\t// // Config left side PID Values\n\t\t// leftSRX.selectProfileSlot(Constants.drivePIDIdx, 0);\n\t\t// leftSRX.config_kF(Constants.drivePIDIdx, Constants.lDrivekF, Constants.kTimeoutMs);\n\t\t// leftSRX.config_kP(Constants.drivePIDIdx, Constants.lDrivekP, Constants.kTimeoutMs);\n\t\t// leftSRX.config_kI(Constants.drivePIDIdx, Constants.lDrivekI, Constants.kTimeoutMs);\n\t\t// leftSRX.config_kD(Constants.drivePIDIdx, Constants.lDrivekD, Constants.kTimeoutMs);\n\n\t\t// Config right side PID settings\n\t\trightSRX.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, Constants.drivePIDIdx, Constants.kTimeoutMs);\n\t\trightSRX.setSensorPhase(true);\n\t\trightSRX.configNominalOutputForward(0, Constants.kTimeoutMs);\n\t\trightSRX.configNominalOutputReverse(0, Constants.kTimeoutMs);\n\t\trightSRX.configPeakOutputForward(1, Constants.kTimeoutMs);\n\t\trightSRX.configPeakOutputReverse(-1, Constants.kTimeoutMs);\n\n\t\t// // Config right side PID Values\n\t\t// rightSRX.selectProfileSlot(Constants.drivePIDIdx, 0);\n\t\t// rightSRX.config_kF(Constants.drivePIDIdx, Constants.rDrivekF, Constants.kTimeoutMs);\n\t\t// rightSRX.config_kP(Constants.drivePIDIdx, Constants.rDrivekP, Constants.kTimeoutMs);\n\t\t// rightSRX.config_kI(Constants.drivePIDIdx, Constants.rDrivekI, Constants.kTimeoutMs);\n\t\t// rightSRX.config_kD(Constants.drivePIDIdx, Constants.rDrivekD, Constants.kTimeoutMs);\n\n\t\t// Set up followers\n\t\tleftSPX1.follow(leftSRX);\n\t\tleftSPX2.follow(leftSRX);\n\n\t\trightSPX1.follow(rightSRX);\n\t\trightSPX2.follow(rightSRX);\n\t\t\n\t\trightSRX.setInverted(true);\n\t\trightSPX1.setInverted(true);\n\t\trightSPX2.setInverted(true);\n }", "@Override\r\n // WEI XU METHOD 2\r\n \r\n public void train(String sourceText) {\r\n String[] words1 = sourceText.split(\"[\\\\s]+\");\r\n // add starter to be a next word for the last word in the source text.\r\n List<String> words = new ArrayList<String>(Arrays.asList(words1));\r\n words.add(words1[0]);\r\n starter = words1[0];\r\n String prevWord = starter;\r\n for (int i = 1; i < words.size(); i++) {\r\n ListNode node = findNode(prevWord);//todo:it's a reference? but not a new Listnode? so no need set back?\r\n if (node == null) {\r\n node = new ListNode(prevWord);\r\n wordList.add(node);\r\n }\r\n node.addNextWord(words.get(i));//todo: why hashmap need set back value, linkedlist don't need?\r\n prevWord = words.get(i);\r\n }\r\n }", "public void learn(ArrayList<Triple<Integer, Integer, Integer>> trainTriples, ArrayList<Triple<Integer, Integer, Integer>> devTriples, int entitySize, int relationSize, Map<String, Integer> entity2Id,\n Map<String, Integer> relation2Id, double margin, double learningRate, double C, int k, int size, int epochs, String entityOutput, String relationOutput){\n initialize(entitySize, relationSize, k);\n int batchNumber = Math.round(trainTriples.size() / size);\n for(int i = 0; i < epochs; i++){\n for (int j = 0; j< batchNumber; j ++){\n ArrayList<Triple<Integer, Integer, Integer>> miniBatch = helper.sample(trainTriples, size);\n ArrayList<Triple<Integer, Integer, Integer>> corruptedTriples = sample.generateBern(miniBatch, entitySize, trainTriples, relationSize);\n update(miniBatch, corruptedTriples, margin, learningRate, C, k);\n }\n logger.info(\"Epoch: \" + i);\n\n if (devTriples != null){\n double accuracy = validation(devTriples, margin, k);\n logger.info(\"Validation Accuracy: \" + accuracy + \"; Epoch: \" + i);\n }\n\n }\n saveModel(entityOutput, relationOutput, entity2Id, relation2Id);\n\n }", "public interface ITrainingService {\n\n void train(double[][] gestures, double[][] responses, Integer numberOfResponses);\n}", "public void train(double learningR, int index, int i){\n\t\t \n\t\tdouble output = outputL.getIntermediateData(i)[index];\n\t\terrorGradient = output *(1-output) * outputL.getErrorGradient() * outputL.getWeights()[index];\n\t\t\t\t \n\t\t\t\t\n\t\tfor (int j = 0; j < inputs; j++) {\n\t\t\tweights[j] += delta(learningR, data[i][j], errorGradient);\n\t\t}\n\t\t\t\n\t\tthreshold += delta(learningR, -1, errorGradient);\n\t\t\t\n\t\t\t\t\n\t}", "public void actionTrain(Train t) {\n\t\t\t t.setVitesseScalaire(vitesse);\n\t\t}", "public WeightedMovingAverageModel(float[] weights, int slices, int trainPoints, int validationPoints) {\n this(weights, slices, 1, trainPoints, validationPoints);\n }", "public DriveTrain()\n\t{\n\t\tleftMotor1 = new VictorSPX(DriveTrainConstants.leftFrontMotorChannel);\n\t\tleftMotor2 = new VictorSPX(DriveTrainConstants.leftRearMotorChannel);\n\t\trightMotor1 = new VictorSPX(DriveTrainConstants.rightFrontMotorChannel);\n\t\trightMotor2 = new VictorSPX(DriveTrainConstants.rightRearMotorChannel);\n\n\t\tleftMotor1.setInverted(DriveTrainConstants.leftMotorInverted);\n\t\trightMotor1.setInverted(DriveTrainConstants.rightMotorInverted);\n\n\t\tleftMotor2.setInverted(InvertType.FollowMaster);\n\t\trightMotor2.setInverted(InvertType.FollowMaster);\n\n\t\tleftMotor2.set(ControlMode.Follower, leftMotor1.getDeviceID());\n\t\trightMotor2.set(ControlMode.Follower, rightMotor1.getDeviceID());\n\t}", "public abstract void Train() throws Exception;", "public void setStopTrainModel() {\n HwHidataJniAdapter hwHidataJniAdapter = HwHidataJniAdapter.getInstance();\n if (hwHidataJniAdapter != null) {\n hwHidataJniAdapter.nativeSetIsStop(true);\n }\n }", "public org.apache.spark.mllib.clustering.KMeansModel train (org.apache.spark.rdd.RDD<org.apache.spark.mllib.linalg.Vector> data, int k, int maxIterations, int runs, java.lang.String initializationMode) { throw new RuntimeException(); }", "public FFANNAdaptiveBackPropagationJSP()\n\t{\n\t\t//run(network, numberInputNeurons, numberHiddenNeurons, numberOutputNeurons, trainingSet);\n\t}", "public double train(ExampleInput input, ExampleOutput output,\n\t\t\tExampleOutput predicted);", "public BackPropagationLearningProcess(NeuralNetwork network) {\r\n\t\tsuper(network);\r\n\t}", "@Override\n\tpublic void train(Instance[] trainingData, int v) {\n\n\t\t// For all the words in the documents, count the number of occurrences. Save in\n\t\t// HashMap\n\t\t// e.g.\n\t\t// m_map[0].get(\"catch\") should return the number of \"catch\" es, in the\n\t\t// documents labeled sports\n\t\t// Hint: m_map[0].get(\"asdasd\") would return null, when the word has not\n\t\t// appeared before.\n\t\t// Use m_map[0].put(word,1) to put the first count in.\n\t\t// Use m_map[0].replace(word, count+1) to update the value\n\t\tm_trainingData = trainingData;\n\t\tm_v = v;\n\t\tm_map[0] = new HashMap<>();\n\t\tm_map[1] = new HashMap<>();\n\n\t\t// iterate the instances (i.e., articles) in the training data\n\t\tfor (int i = 0; i < m_trainingData.length; i++) {\n\t\t\tInstance article = m_trainingData[i];\n\t\t\t// if this article belongs to sports\n\t\t\tif (article.label.equals(Label.SPORTS)) {\n\t\t\t\t// iterate each word in this article\n\t\t\t\tfor (int j = 0; j < article.words.length; j++) {\n\t\t\t\t\tString word = article.words[j];\n\t\t\t\t\t// if this word exists in the sports hashmap\n\t\t\t\t\tif (m_map[0].containsKey(word)) {\n\t\t\t\t\t\tm_map[0].replace(word, m_map[0].get(word).intValue() + 1);\n\t\t\t\t\t}\n\t\t\t\t\t// if this word is a new word in the sports hashmap\n\t\t\t\t\telse {\n\t\t\t\t\t\tm_map[0].put(word, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if this article belongs to business (i.e., non-sports)\n\t\t\telse {\n\t\t\t\t// iterate each word in this article\n\t\t\t\tfor (int j = 0; j < article.words.length; j++) {\n\t\t\t\t\tString word = article.words[j];\n\t\t\t\t\t// if this word exists in the business hashmap\n\t\t\t\t\tif (m_map[1].containsKey(word)) {\n\t\t\t\t\t\tm_map[1].replace(word, m_map[1].get(word).intValue() + 1);\n\t\t\t\t\t}\n\t\t\t\t\t// if this word is a new word in the sports hashmap\n\t\t\t\t\telse {\n\t\t\t\t\t\tm_map[1].put(word, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// |V| is the size of the total vocabulary we assume we will encounter (i.e.,\n\t\t// the dictionary size) from training data and test data\n\t\t// The value |V| will be passed to the train method of your classifier as the\n\t\t// argument int v.\n\n\t\t// To obtain the number of word type\n\t\tSet<String> all = new HashSet<String>();\n\t\tfor (int j = 0; j < m_trainingData.length; j++) {\n\t\t\tfor (int k = 0; k < m_trainingData[j].words.length; k++) {\n\t\t\t\tall.add(m_trainingData[j].words[k]);\n\t\t\t}\n\t\t}\n\n\t\t// To obtain the total number of words for each class(label)\n\t\tsumV[0] = 0.0;\n\t\tsumV[1] = 0.0;\n\t\tfor (String w : all) {\n\t\t\tif (m_map[0].get(w) != null) {\n\t\t\t\tsumV[0] += m_map[0].get(w);\n\t\t\t}\n\t\t\tif (m_map[1].get(w) != null) {\n\t\t\t\tsumV[1] += m_map[1].get(w);\n\t\t\t}\n\t\t}\n\t}", "private void forwardPropagation(int[] trainingData, double[] activationsOfHiddenLayer, double[] outputActivations) {\n\t\tdouble[] hiddenActivations = new double[SIZE_HIDDEN_LAYER];\n\n\t\tfor(int indexHidden = 0; indexHidden < SIZE_HIDDEN_LAYER; indexHidden++) {\n\t\t\thiddenActivations[indexHidden] = 0;\n\t\t\tfor(int indexInput = 0; indexInput < SIZE_INPUT_LAYER; indexInput++) {\n\t\t\t\thiddenActivations[indexHidden] += weightsOfHiddenLayer[indexHidden][indexInput] * trainingData[indexInput];\n\t\t\t}\t\n\t\t\thiddenActivations[indexHidden] += biasOfHiddenLayer[indexHidden];\n//\t\t\t// We then call the activation function \n\t\t\thiddenActivations[indexHidden] = tanh(hiddenActivations[indexHidden]);\n\t\t\tactivationsOfHiddenLayer[indexHidden] = hiddenActivations[indexHidden];\n\n\t\t}\n\t\t\t\t\n\t\tfor(int indexOuput = 0; indexOuput < SIZE_OUTPUT_LAYER; indexOuput++) {\n\t\t\toutputActivations[indexOuput] = 0;\n\t\t\tfor(int indexHidden = 0; indexHidden < SIZE_HIDDEN_LAYER; indexHidden ++) {\n\t\t\t\toutputActivations[indexOuput] += weightsOfOutputLayer[indexOuput][indexHidden] * hiddenActivations[indexHidden];\n\t\t\t}\t\n\t\t\toutputActivations[indexOuput] += biasOfOutputLayer[indexOuput];\n\t\t}\n\t\tsoftmax(outputActivations);\t\n\t}", "public org.apache.spark.mllib.clustering.KMeansModel train (org.apache.spark.rdd.RDD<org.apache.spark.mllib.linalg.Vector> data, int k, int maxIterations, int runs) { throw new RuntimeException(); }", "public void buildAllPossibleTrain() {\n while (depotOnThisLine.checkOnPossibilityCreatingTrain()) {\n try {\n trains.add(Factory.buildNewTrain(depotOnThisLine));\n } catch (DepotNotExistException e) {\n e.printStackTrace();\n }\n }\n }", "private void trainPerceptron() {\n\t\t// Creates a log of that contains the percentage each epoch got correct\n\t\tint numWrong = images.size();\n\t\tint numReps = 0;\n\n\t\t// Repeat the training process TIMES_TO_REPEAT number of times or until\n\t\t// there are none wrong\n\t\tfor (int repetition = 0; repetition < TIMES_TO_REPEAT && numWrong != 0; repetition++) {\n\t\t\tint numCorrect = 0;\n\n\t\t\t// Iterate through each image in the set of image\n\t\t\tfor (PerceptronImage image : images) {\n\t\t\t\tdouble netInput = 0;\n\n\t\t\t\t// Work out the net input by evaluating each feature on the\n\t\t\t\t// image\n\t\t\t\tfor (Feature feature : features) {\n\t\t\t\t\tnetInput += feature.evaluate(image) * feature.getWeight();\n\t\t\t\t}\n\n\t\t\t\t// If the image is evaluated to be an X\n\t\t\t\tif (netInput <= 0) {\n\t\t\t\t\t// If it actually is an X then record it\n\t\t\t\t\tif (image.isX()) {\n\t\t\t\t\t\tnumCorrect++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If it is not then re-weight features\n\t\t\t\t\t\tfor (Feature feature : features) {\n\t\t\t\t\t\t\tdouble newWeight = feature.getWeight()\n\t\t\t\t\t\t\t\t\t+ feature.evaluate(image) * learningRate;\n\t\t\t\t\t\t\tfeature.setWeight(newWeight);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// If the image is evaluated to be not an X\n\t\t\t\t\t// If it actually not an X then record it\n\t\t\t\t\tif (!image.isX()) {\n\t\t\t\t\t\tnumCorrect++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If it is not then re-weight features\n\t\t\t\t\t\tfor (Feature feature : features) {\n\t\t\t\t\t\t\tdouble newWeight = feature.getWeight()\n\t\t\t\t\t\t\t\t\t- feature.evaluate(image) * learningRate;\n\t\t\t\t\t\t\tfeature.setWeight(newWeight);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update the number of images wrong for this epoch\n\t\t\tnumWrong = images.size() - numCorrect;\n\n\t\t\t// Modify the learning rate\n\t\t\tif (learningRate > LEARNING_RATE_MINIMUM) {\n\t\t\t\tlearningRate *= LEARNING_RATE_MODIFIER;\n\t\t\t}\n\n\t\t\tnumReps++;\n\t\t}\n\n\t\ttry {\n\t\t\tPrintWriter writer = new PrintWriter(\"output.txt\");\n\t\t\t\n\t\t\t// Print out the number of repetitions if the perceptron converged,\n\t\t\t// otherwise print out the number of images that are still classified\n\t\t\t// incorrectly\n\t\t\tif (numWrong == 0) {\n\t\t\t\twriter.println(\"Perceptron converged\");\n\t\t\t\twriter.println(\"Number of repetitions: \" + numReps);\n\t\t\t\tSystem.out.println(\"Perceptron converged\");\n\t\t\t\tSystem.out.println(\"Number of repetitions: \" + numReps);\n\t\t\t} else {\n\t\t\t\twriter.println(\"Perceptron did not converge\");\n\t\t\t\twriter.println(\"Number of images still incorrect: \" + numWrong);\n\t\t\t\tSystem.out.println(\"Perceptron did not converge\");\n\t\t\t\tSystem.out.println(\"Number of images still incorrect: \" + numWrong);\n\t\t\t}\n\n\t\t\twriter.println(\"\\nEnding learning Rate: \" + learningRate + \"\\n\");\n\t\t\tSystem.out.println(\"\\nEnding learning Rate: \" + learningRate + \"\\n\");\n\t\t\t\n\t\t\tfor (Feature feature : features){\n\t\t\t\tSystem.out.println(feature.toString());\n\t\t\t\twriter.println(feature.toString());\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n public void retrain(String sourceText) {\r\n // TODO: Implement this method.\r\n wordList.clear();\r\n //starter = null;\r\n //rnGenerator = null;\r\n \r\n train(sourceText);\r\n }", "public DriveTrain (int motorChannelL1,int motorChannelL2,int motorChannelR1,int motorChannelR2 ){\n leftMotor1 = new Victor(motorChannelL1);\n leftMotor2 = new Victor(motorChannelL2);\n rightMotor1 = new Victor(motorChannelR1);\n rightMotor2 = new Victor(motorChannelR2);\n highDrive = new RobotDrive(motorChannelL1, motorChannelR1);\n lowDrive = new RobotDrive(motorChannelL2, motorChannelR2);\n \n }", "public static void main(String[] args) throws Exception {\n final int numRows = 28;\n final int numColumns = 28;\n int outputNum = 10; // number of output classes\n int batchSize = 128; // batch size for each epoch\n int rngSeed = 123; // random number seed for reproducibility\n int numEpochs = 15; // number of epochs to perform\n String modelPath = \"モデルパスを入力\";\n\n //Get the DataSetIterators:\n DataSetIterator mnistTrain = new MnistDataSetIterator(batchSize, true, rngSeed);\n DataSetIterator mnistTest = new MnistDataSetIterator(batchSize, false, rngSeed);\n\n\n System.out.println(\"Build model....\");\n MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()\n .seed(rngSeed) //include a random seed for reproducibility\n // use stochastic gradient descent as an optimization algorithm\n .updater(new Nesterovs(0.006, 0.9))\n .l2(1e-4)\n .list()\n .layer(new DenseLayer.Builder() //create the first, input layer with xavier initialization\n .nIn(numRows * numColumns)\n .nOut(1000)\n .activation(Activation.RELU)\n .weightInit(WeightInit.XAVIER)\n .build())\n .layer(new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD) //create hidden layer\n .nIn(1000)\n .nOut(outputNum)\n .activation(Activation.SOFTMAX)\n .weightInit(WeightInit.XAVIER)\n .build())\n .build();\n\n\n MultiLayerNetwork model = new MultiLayerNetwork(conf);\n model.init();\n //print the score with every 1 iteration\n UIServer uiServer = UIServer.getInstance();\n InMemoryStatsStorage statsStorage = new InMemoryStatsStorage();\n uiServer.attach(statsStorage);\n model.setListeners(new StatsListener(statsStorage),new ScoreIterationListener(1));\n\n System.out.println(\"Train model....\");\n model.fit(mnistTrain, numEpochs);\n\n\n\n\n System.out.println(\"Evaluate model....\");\n Evaluation eval = model.evaluate(mnistTest);\n System.out.println(eval.stats());\n ModelSerializer.writeModel(model, new File(modelPath), false);\n System.out.println(\"****************Example finished********************\");\n\n }", "public static void runTrainControllers() {\n Map<String, TrainController> trains = getTrainControllers();\n for (String s : trains.keySet()) {\n TrainController tc = trains.get(s);\n if (tc.isRunning()) {\n PowerCalculator.run(tc);\n }\n }\n }" ]
[ "0.71167135", "0.6604763", "0.6601962", "0.65842324", "0.653999", "0.6396027", "0.62939566", "0.62697804", "0.6130686", "0.6130571", "0.61073923", "0.61009663", "0.60541636", "0.6051641", "0.6040938", "0.603393", "0.60261965", "0.597244", "0.5957213", "0.5953508", "0.5950653", "0.59148335", "0.58909935", "0.5885283", "0.58811814", "0.58402383", "0.58077335", "0.57817733", "0.57170004", "0.5688536", "0.5662792", "0.565294", "0.56411976", "0.56286365", "0.5609246", "0.55985284", "0.5585691", "0.5582402", "0.5572024", "0.55714864", "0.55427384", "0.55317384", "0.5529787", "0.5463131", "0.54504526", "0.5447432", "0.5416125", "0.5403193", "0.537195", "0.5371693", "0.5357064", "0.5339786", "0.5336436", "0.5330972", "0.5325504", "0.5319482", "0.5317177", "0.53141993", "0.5314111", "0.5306645", "0.5305894", "0.52938205", "0.52877796", "0.52628076", "0.5260641", "0.5243912", "0.5236302", "0.52178246", "0.52042425", "0.5191845", "0.5176554", "0.5170899", "0.5166813", "0.51604927", "0.5150185", "0.51496315", "0.51476425", "0.51455426", "0.51435786", "0.5129582", "0.5114864", "0.5100114", "0.50919425", "0.5076519", "0.5074067", "0.5072039", "0.50711733", "0.50596553", "0.505421", "0.50435096", "0.5033345", "0.50313795", "0.5028236", "0.5015005", "0.4973987", "0.4959902", "0.49519205", "0.49504027", "0.49425867", "0.49389622" ]
0.6154577
8
Test model for Word Perplexity
public void test2 (List<List<String>> sentences) { double totalLogProb = 0; double totalNumTokens = 0; for (List<String> sentence : sentences) { totalNumTokens += sentence.size(); double sentenceLogProb = sentenceLogProb2(sentence); totalLogProb += sentenceLogProb; } double perplexity = Math.exp(-totalLogProb / totalNumTokens); System.out.println("Word Perplexity = " + perplexity ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test03() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n \n naiveBayesMultinomialText0.m_norm = 715.85816;\n MultiClassClassifierUpdateable multiClassClassifierUpdateable0 = new MultiClassClassifierUpdateable();\n Capabilities capabilities0 = multiClassClassifierUpdateable0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.m_minWordP = (-988.56143);\n double double0 = naiveBayesMultinomialText0.getMinWordFrequency();\n assertEquals((-988.56143), double0, 0.01);\n }", "@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.m_leplace = (double) (-1);\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test83() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.minWordFrequencyTipText();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(\"Ignore any words that don't occur at least min frequency times in the training data. If periodic pruning is turned on, then the dictionary is pruned according to this value\", string0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n NaiveBayesMultinomialText naiveBayesMultinomialText1 = (NaiveBayesMultinomialText)AbstractClassifier.makeCopy(naiveBayesMultinomialText0);\n naiveBayesMultinomialText1.m_wordFrequencies = true;\n boolean boolean0 = naiveBayesMultinomialText1.getUseWordFrequencies();\n assertTrue(naiveBayesMultinomialText1.getUseWordFrequencies());\n assertTrue(boolean0);\n }", "@Test(timeout = 4000)\n public void test57() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n PrecomputedKernelMatrixKernel precomputedKernelMatrixKernel0 = new PrecomputedKernelMatrixKernel();\n File file0 = precomputedKernelMatrixKernel0.getKernelMatrixFile();\n naiveBayesMultinomialText0.setStopwords(file0);\n String[] stringArray0 = naiveBayesMultinomialText0.getOptions();\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(14, stringArray0.length);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n }", "@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");*/\r\n }", "private void test() throws IOException {\n\t\tdouble wordFreq = 0, probAttr = 0, // overlapped word frequency,\n\t\t\t\t\t\t\t\t\t\t\t// probability of each attribute\n\t\tprobHam, probSpam;// probability of being ham and spam\n\t\tdouble wordAppearInVocab = 0; // whether words in test file appeared in\n\t\t\t\t\t\t\t\t\t\t// all training files\n\t\ttestContent = new String();// content of test file\n\n\t\t/* words in test, spam, ham files */\n\t\tArrayList<String> testWord = new ArrayList<String>();\n\t\tArrayList<String> hamWord = new ArrayList<String>();\n\t\tArrayList<String> spamWord = new ArrayList<String>();\n\t\tString buff;// tmp buffer for file reading\n\t\tBufferedReader in = new BufferedReader(new FileReader(inputTestFile));\n\n\t\t/* assign words */\n\t\twhile ((buff = in.readLine()) != null)\n\t\t\ttestContent += buff;\n\t\tfor (int i = 0; i < testContent.split(\" \").length; i++)\n\t\t\ttestWord.add(testContent.split(\" \")[i]);\n\t\tfor (int i = 0; i < hamContent.split(\" \").length; i++)\n\t\t\thamWord.add(hamContent.split(\" \")[i]);\n\t\tfor (int i = 0; i < spamContent.split(\" \").length; i++)\n\t\t\tspamWord.add(spamContent.split(\" \")[i]);\n\n\t\t/*\n\t\t * calculate the probability of being ham\n\t\t */\n\t\tfor (int i = 0; i < testWord.size(); i++) {\n\t\t\tif (vocabulary.contains(testWord.get(i))) // check whether a word is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// in vocabulary, if\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// not, ignore it\n\t\t\t\twordAppearInVocab++;\n\t\t\tfor (int j = 0; j < hamWord.size(); j++) { // get word frequency of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// words in training\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// files\n\t\t\t\tif (testWord.get(i).equals(hamWord.get(j))) {\n\t\t\t\t\twordFreq++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (wordAppearInVocab != 0) {\n\t\t\t\tprobAttr += java.lang.Math.log((double) (wordFreq + 1) // get\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// probability\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of an\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// attribute\n\t\t\t\t\t\t/ (double) (hamWordCount + vocabLen));\n\t\t\t}\n\t\t\twordFreq = 0;\n\t\t\twordAppearInVocab = 0;\n\t\t}\n\t\tprobHam = java.lang.Math.log(pHam) + probAttr;\n\t\tprobAttr = 0;\n\t\t/*\n\t\t * calculate the probability of being spam\n\t\t */\n\t\tfor (int i = 0; i < testWord.size(); i++) {\n\t\t\tif (vocabulary.contains(testWord.get(i)))\n\t\t\t\twordAppearInVocab++;\n\n\t\t\tfor (int j = 0; j < spamWord.size(); j++) {\n\t\t\t\tif (testWord.get(i).equals(spamWord.get(j))) {\n\t\t\t\t\twordFreq++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (wordAppearInVocab != 0) {\n\t\t\t\tprobAttr += java.lang.Math.log((double) (wordFreq + 1)\n\t\t\t\t\t\t/ (double) (spamWordCount + vocabLen));\n\t\t\t}\n\t\t\twordFreq = 0;\n\t\t\twordAppearInVocab = 0;\n\t\t}\n\t\tprobSpam = java.lang.Math.log(pSpam) + probAttr;\n\t\tprobAttr = 0;\n\n\t\t/*\n\t\t * output\n\t\t */\n\n\t\t/*\n\t\t * for (int i = 0; i < vocabulary.size(); i++) {\n\t\t * System.out.println(vocabulary.get(i)); } System.out.println(probHam -\n\t\t * probSpam);\n\t\t */\n\t\tif (probHam > probSpam)\n\t\t\tSystem.out.println(\"ham\");\n\t\telse\n\t\t\tSystem.out.println(\"spam\");\n\t}", "@Test(timeout = 4000)\n public void test81() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.LNormTipText();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(\"The LNorm to use for document length normalization.\", string0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test(timeout = 4000)\n public void test63() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setPeriodicPruning(4);\n StringKernel stringKernel0 = new StringKernel();\n naiveBayesMultinomialText0.m_minWordP = (double) 0;\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertEquals(4, naiveBayesMultinomialText0.getPeriodicPruning());\n }", "@Test\n void nlpPipeline() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n assertFalse(sentences.isEmpty());\n }", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setNorm(1);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test(timeout = 4000)\n public void test43() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n boolean boolean0 = naiveBayesMultinomialText0.getUseWordFrequencies();\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(boolean0);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test70() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n \n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.setNormalizeDocLength(true);\n naiveBayesMultinomialText0.buildClassifier(instances0);\n DenseInstance denseInstance0 = new DenseInstance(0);\n naiveBayesMultinomialText0.distributionForInstance(denseInstance0);\n assertTrue(naiveBayesMultinomialText0.getNormalizeDocLength());\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(\"The independent probability of a class\\n--------------------------------------\\nclass1\\t6.0\\nclass2\\t6.0\\nclass3\\t6.0\\nclass4\\t6.0\\n\\nThe probability of a word given the class\\n-----------------------------------------\\n\\tclass1\\tclass2\\tclass3\\tclass4\\t\\nover\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nthe\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nThe\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nquick\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nlazy\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\njumps\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nbrown\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t\\ndog\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nfox\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\n\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "public void buildModel(String wordFileName) throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(new File(wordFileName)));\n\n String str;\n while ((str = br.readLine()) != null) {\n List<String> tokens = StanfordParser.stanfordTokenize(str).stream().map(CoreLabel::originalText).collect(Collectors.toList());\n for (String word : tokens) {\n double count = model.wordProbability.containsKey(word) ? model.wordProbability.get(word) : 0;\n count++;\n model.wordProbability.put(word, count);\n }\n }\n br.close();\n\n // Remove Empty prob.\n model.wordProbability.remove(StringUtils.EMPTY);\n model.normalizeWordProbability();\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "speech.multilang.Params.DecisionPointParams getDecisionPointParams();", "@Test(timeout = 4000)\n public void test78() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.globalInfo();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(\"Multinomial naive bayes for text data. Operates directly (and only) on String attributes. Other types of input attributes are accepted but ignored during training and classification\", string0);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test(timeout = 4000)\n public void test69() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n Instances instances1 = new Instances(instances0, 0);\n naiveBayesMultinomialText0.buildClassifier(instances1);\n DenseInstance denseInstance0 = new DenseInstance(0);\n double[] doubleArray0 = naiveBayesMultinomialText0.distributionForInstance(denseInstance0);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertArrayEquals(new double[] {0.25, 0.25, 0.25, 0.25}, doubleArray0, 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n }", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n \n naiveBayesMultinomialText0.setNorm(0.0);\n double double0 = naiveBayesMultinomialText0.getNorm();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test79() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.normTipText();\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(\"The norm of the instances after normalization.\", string0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test(timeout = 4000)\n public void test66() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n naiveBayesMultinomialText0.setLowercaseTokens(true);\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertTrue(naiveBayesMultinomialText0.getLowercaseTokens());\n }", "public void trainDocTopicModel(Vector original, Vector labels, Matrix docTopicModel, boolean inf) {\n List<Integer> terms = new ArrayList<Integer>();\n Iterator<Vector.Element> docElementIter = original.iterateNonZero();\n //long getIterTime=System.currentTimeMillis();\n double docTermCount = 0.0;\n while (docElementIter.hasNext()) {\n Vector.Element element = docElementIter.next();\n terms.add(element.index());\n docTermCount += element.get();\n }\n //long midTime=System.currentTimeMillis();\n List<Integer> topicLabels = new ArrayList<Integer>();\n Iterator<Vector.Element> labelIter = labels.iterateNonZero();\n while (labelIter.hasNext()) {\n Vector.Element e = labelIter.next();\n topicLabels.add(e.index());\n }\n //long t1 = System.currentTimeMillis();\n //log.info(\"get List use {} ms ,with terms' size of {} and doc size of {},get term list use {} ms,get termIter use time {} \",new Object[]{(t1-preTime),terms.size(),original.size(),(midTime-preTime),(getIterTime-preTime)});\n //log.info(\"docTopicModel columns' length is {} \",docTopicModel.columnSize());\n pTopicGivenTerm(terms, topicLabels, docTopicModel);\n //long t2 = System.currentTimeMillis();\n //log.info(\"pTopic use {} ms with terms' size {}\", new Object[]{(t2 - t1),terms.size()});\n normByTopicAndMultiByCount(original, terms, docTopicModel);\n //long t3 = System.currentTimeMillis();\n //log.info(\"normalize use {} ms with terms' size {}\", new Object[]{(t3 - t2),terms.size()});\n // now multiply, term-by-term, by the document, to get the weighted distribution of\n // term-topic pairs from this document.\n\n // now recalculate \\(p(topic|doc)\\) by summing contributions from all of pTopicGivenTerm\n if (inf) {\n for (Vector.Element topic : labels) {\n labels.set(topic.index(), (docTopicModel.viewRow(topic.index()).norm(1) + alpha) / (docTermCount + numTerms * alpha));\n }\n // now renormalize so that \\(sum_x(p(x|doc))\\) = 1\n labels.assign(Functions.mult(1 / labels.norm(1)));\n //log.info(\"set topics use {} \" + (System.currentTimeMillis() - t3));\n }\n //log.info(\"after train: \"+ topics.toString());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n \n naiveBayesMultinomialText0.setLNorm(0);\n double double0 = naiveBayesMultinomialText0.getLNorm();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test54() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n double double0 = naiveBayesMultinomialText0.getLNorm();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(2.0, double0, 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setStemmer((Stemmer) null);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test\n void getSentimentScore() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n assertTrue(np.getSentimentScore(sentences) >= 0 && np.getSentimentScore(sentences) <=4);\n }", "public void testLPState()\n \t{\n \t\tsolver.buildLPState();\n \t\tassertTrue(solver.hasLPState());\n \t\t\n \t\tfinal int nLPVars = solver.getNumberOfLPVariables();\n \t\tassertTrue(nLPVars >= 0);\n \t\t\n \t\tfinal double[] objective = solver.getObjectiveFunction();\n \t\tassertEquals(nLPVars, objective.length);\n \t\t\n \t\tint nVarsUsed = 0;\n \t\t\n \t\tfor (VariableBase var : model.getVariables())\n \t\t{\n \t\t\tSVariable svar = solver.getSolverVariable(var);\n \t\t\tassertSame(svar, solver.createVariable(var));\n \t\t\t\n \t\t\tDiscrete mvar = svar.getModelObject();\n \t\t\tassertSame(var, mvar);\n \t\t\tassertSame(solver, svar.getParentGraph());\n \t\t\t\n \t\t\t// Test do-nothing methods\n \t\t\tsvar.resetEdgeMessages(0);\n \t\t\tsvar.updateEdge(0);\n \t\t\tsvar.moveMessages(null, 0, 1);\n \t\t\tassertNull(svar.getInputMsg(0));\n \t\t\tassertNull(svar.getOutputMsg(0));\n \t\t\tassertNull(svar.createMessages(null));\n \t\t\tassertNull(svar.resetInputMessage(null));\n \t\t\t\n \t\t\tint lpVar = svar.getLPVarIndex();\n \t\t\tint nValidAssignments = svar.getNumberOfValidAssignments();\n \t\t\t\n \t\t\tif (var.hasFixedValue())\n \t\t\t{\n \t\t\t\t// Currently the converse is not true because model variables\n \t\t\t\t// do not currently check to see if there is only one non-zero input weight.\n \t\t\t\tassertTrue(svar.hasFixedValue());\n \t\t\t}\n \t\t\tif (svar.hasFixedValue())\n \t\t\t{\n \t\t\t\tassertFalse(svar.hasLPVariable());\n \t\t\t}\n \t\t\tif (svar.hasLPVariable())\n \t\t\t{\n \t\t\t\tassertTrue(lpVar >= 0);\n \t\t\t\tassertTrue(nValidAssignments > 1);\n \t\t\t\t++nVarsUsed;\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tassertEquals(-1, lpVar);\n \t\t\t\tassertTrue(nValidAssignments <= 1);\n \t\t\t}\n \t\t\t\n \t\t\tdouble[] weights = mvar.getInput();\n \t\t\tdouble totalWeight = 0.0;\n \t\t\tfor (double w : weights)\n \t\t\t{\n \t\t\t\ttotalWeight += w;\n \t\t\t}\n \t\t\t\n \t\t\tfor (int i = 0, end = svar.getModelObject().getDomain().size(); i < end; ++i)\n \t\t\t{\n \t\t\t\tdouble w = mvar.getInput()[i];\n \t\t\t\tint lpVarForValue = svar.domainIndexToLPVar(i);\n \t\t\t\tint i2 = svar.lpVarToDomainIndex(lpVarForValue);\n \t\t\t\tif (lpVarForValue >= 0)\n \t\t\t\t{\n \t\t\t\t\tassertEquals(i, i2);\n\t\t\t\t\tassertEquals(Math.log(w), objective[lpVarForValue], 1e-6);\n \t\t\t\t}\n \t\t\t\tif (!svar.hasLPVariable() || mvar.getInput()[i] == 0.0)\n \t\t\t\t{\n \t\t\t\t\tassertEquals(-1, lpVarForValue);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\tfor (Factor factor : model.getFactors())\n \t\t{\n \t\t\tSTableFactor sfactor = solver.getSolverFactor(factor);\n \t\t\tassertSame(sfactor, solver.createFactor(factor));\n \t\t\tassertSame(factor, sfactor.getModelObject());\n \t\t\tassertSame(solver, sfactor.getParentGraph());\n \t\t\t\n \t\t\t// Test do nothing methods\n \t\t\tsfactor.createMessages();\n \t\t\tsfactor.updateEdge(0);\n \t\t\tsfactor.resetEdgeMessages(0);\n \t\t\tsfactor.moveMessages(null, 0 , 1);\n \t\t\tassertNull(sfactor.getInputMsg(0));\n \t\t\tassertNull(sfactor.getOutputMsg(0));\n \t\t}\n \t\t\n \t\tfinal List<IntegerEquation> constraints = solver.getConstraints();\n \t\tassertNotNull(constraints);\n \n \t\tint nConstraints = solver.getNumberOfConstraints();\n \t\tint nVarConstraints = solver.getNumberOfVariableConstraints();\n \t\tint nMarginalConstraints = solver.getNumberOfMarginalConstraints();\n \t\tassertEquals(nConstraints, constraints.size());\n \t\tassertEquals(nConstraints, nVarConstraints + nMarginalConstraints);\n \t\tassertEquals(nVarsUsed, nVarConstraints);\n \t\t\n \t\t{\n \t\t\tMatlabConstraintTermIterator termIter = solver.getMatlabSparseConstraints();\n \t\t\tList<Integer> constraintTerms = new ArrayList<Integer>(termIter.size() * 3);\n \t\t\t\n \t\t\tIterator<IntegerEquation> constraintIter = constraints.iterator();\n \t\t\tfor (int row = 1; constraintIter.hasNext(); ++ row)\n \t\t\t{\n \t\t\t\tIntegerEquation constraint = constraintIter.next();\n \t\t\t\t\n \t\t\t\tint nExpectedTerms = -1;\n \t\t\t\tint lpVar = -1;\n \t\t\t\t\n \t\t\t\tif (row <= nVarConstraints)\n \t\t\t\t{\n \t\t\t\t\tLPVariableConstraint varConstraint = constraint.asVariableConstraint();\n \t\t\t\t\tassertNotNull(varConstraint);\n \t\t\t\t\tassertNull(constraint.asFactorConstraint());\n \t\t\t\t\t\n \t\t\t\t\tSVariable svar = varConstraint.getSolverVariable();\n \t\t\t\t\tassertTrue(svar.hasLPVariable());\n \t\t\t\t\t\n \t\t\t\t\tassertEquals(1, varConstraint.getRHS());\n \t\t\t\t\tnExpectedTerms = svar.getNumberOfValidAssignments();\n \t\t\t\t\t\n \t\t\t\t\tlpVar = svar.getLPVarIndex();\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tLPFactorMarginalConstraint factorConstraint = constraint.asFactorConstraint();\n \t\t\t\t\tassertNotNull(factorConstraint);\n \t\t\t\t\tassertNull(constraint.asVariableConstraint());\n \t\t\t\t\t\n \t\t\t\t\tSTableFactor sfactor = factorConstraint.getSolverFactor();\n \t\t\t\t\tlpVar = sfactor.getLPVarIndex();\n \t\t\t\t\t\n \t\t\t\t\tassertEquals(0, factorConstraint.getRHS());\n \t\t\t\t\tnExpectedTerms = sfactor.getNumberOfValidAssignments();\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tint[] lpvars = constraint.getVariables();\n \t\t\t\tassertEquals(constraint.size(), lpvars.length);\n \t\t\t\tassertEquals(0, constraint.getCoefficient(-1));\n \t\t\t\tassertEquals(0, constraint.getCoefficient(lpVar + nExpectedTerms));\n \t\t\t\tassertFalse(constraint.hasCoefficient(-1));\n \t\t\t\t\n \t\t\t\tassertTrue(lpVar >= 0);\n \n \t\t\t\tIntegerEquation.TermIterator constraintTermIter = constraint.getTerms();\n \t\t\t\tfor (int i = 0; constraintTermIter.advance(); ++i)\n \t\t\t\t{\n \t\t\t\t\tassertEquals(lpvars[i], constraintTermIter.getVariable());\n \t\t\t\t\tassertEquals(constraintTermIter.getCoefficient(), constraint.getCoefficient(lpvars[i]));\n \t\t\t\t\tassertTrue(constraint.hasCoefficient(lpvars[i]));\n \t\t\t\t\tconstraintTerms.add(row);\n \t\t\t\t\tconstraintTerms.add(constraintTermIter.getVariable());\n \t\t\t\t\tconstraintTerms.add(constraintTermIter.getCoefficient());\n \t\t\t\t}\n \t\t\t\tassertFalse(constraintTermIter.advance());\n \t\t\t}\n \t\t\t\n \t\t\tfor (int i = 0; termIter.advance(); i += 3)\n \t\t\t{\n \t\t\t\tassertEquals((int)constraintTerms.get(i), termIter.getRow());\n \t\t\t\tassertEquals(constraintTerms.get(i+1) + 1, termIter.getVariable());\n \t\t\t\tassertEquals((int)constraintTerms.get(i+2), termIter.getCoefficient());\n \t\t\t}\n \t\t\tassertFalse(termIter.advance());\n \t\t}\n \t\t\n \t\t\n \t\tif (expectedConstraints != null)\n \t\t{\n \t\t\tIterator<IntegerEquation> constraintIter = constraints.iterator();\n \t\t\tassertEquals(expectedConstraints.length, solver.getNumberOfConstraints());\n \t\t\tfor (int i = 0, end = expectedConstraints.length; i < end; ++i)\n \t\t\t{\n \t\t\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n \t\t\t\tIntegerEquation constraint = constraintIter.next();\n \t\t\t\tconstraint.print(new PrintStream(out));\n \t\t\t\tString actual = out.toString().trim();\n \n \t\t\t\tString expected = expectedConstraints[i].trim();\n \n \t\t\t\tif (!expected.equals(actual))\n \t\t\t\t{\n \t\t\t\t\tSystem.out.format(\"Constraint %d mismatch:\\n\", i);\n \t\t\t\t\tSystem.out.format(\"Expected: %s\\n\", expected);\n \t\t\t\t\tSystem.out.format(\" Actual: %s\\n\", actual);\n \t\t\t\t}\n \t\t\t\tassertEquals(expected, actual);\n \t\t\t}\n \t\t}\n \t\t\n \t\t// Test setting solution. A real solution will only use ones and zeros,\n \t\t// but we will use random values to make sure they are assigned correctly.\n \t\tdouble[] solution = new double[nLPVars];\n \t\tRandom rand = new Random();\n \t\tfor (int i = solution.length; --i>=0;)\n \t\t{\n \t\t\tsolution[i] = rand.nextDouble();\n \t\t}\n \t\tsolver.setSolution(solution);\n \t\tfor (VariableBase var : model.getVariables())\n \t\t{\n \t\t\tSVariable svar = solver.getSolverVariable(var);\n \t\t\tdouble[] belief = svar.getBelief();\n \t\t\tif (svar.hasFixedValue())\n \t\t\t{\n \t\t\t\tint vali = svar.getValueIndex();\n \t\t\t\tfor (int i = belief.length; --i>=0;)\n \t\t\t\t{\n \t\t\t\t\tif (i == vali)\n \t\t\t\t\t{\n \t\t\t\t\t\tassertEquals(1.0, belief[i], 1e-6);\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n \t\t\t\t\t\tassertEquals(0.0, belief[i], 1e-6);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tfor (int i = svar.getModelObject().getDomain().size(); --i>=0;)\n \t\t\t\t{\n \t\t\t\t\tint lpVar = svar.domainIndexToLPVar(i);\n \t\t\t\t\tif (lpVar < 0)\n \t\t\t\t\t{\n \t\t\t\t\t\tassertEquals(0, belief[i], 1e-6);\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n \t\t\t\t\t\tassertEquals(solution[lpVar], belief[i], 1e-6);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\tsolver.clearLPState();\n \t\tassertInitialState();\n \t}", "@Test(timeout = 4000)\n public void test86() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.stemmerTipText();\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(\"The stemming algorithm to use on the words.\", string0);\n }", "@Test(timeout = 4000)\n public void test42() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setLNorm(551.149718887);\n assertEquals(551.149718887, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"probToLogOdds: probability must be in [0,1] \");\n assertEquals(\"probtologod: prob must be in [0,1] \", string0);\n }", "@Test(timeout = 4000)\n public void test51() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.getTokenizer();\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n }", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.getStemmer();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test(timeout = 4000)\n public void test44() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n boolean boolean0 = naiveBayesMultinomialText0.getNormalizeDocLength();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertFalse(boolean0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test(timeout = 4000)\n public void test76() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.useWordFrequenciesTipText();\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(\"Use word frequencies rather than binary bag of words representation\", string0);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n \n naiveBayesMultinomialText0.setMinWordFrequency(0.0);\n double double0 = naiveBayesMultinomialText0.getMinWordFrequency();\n assertEquals(0.0, double0, 0.01);\n }", "public void translate() {\n\t\tif(!init)\r\n\t\t\treturn; \r\n\t\ttermPhraseTranslation.clear();\r\n\t\t// document threshold: number of terms / / 8\r\n//\t\tdocThreshold = (int) (wordKeyList.size() / computeAvgTermNum(documentTermRelation) / 8.0);\r\n\t\t//\t\tuseDocFrequency = true;\r\n\t\tint minFrequency=1;\r\n\t\temBkgCoefficient=0.5;\r\n\t\tprobThreshold=0.001;//\r\n\t\titerationNum = 20;\r\n\t\tArrayList<Token> tokenList;\r\n\t\tToken curToken;\r\n\t\tint j,k;\r\n\t\t//p(w|C)\r\n\r\n\t\tint[] termValues = termIndexList.values;\r\n\t\tboolean[] termActive = termIndexList.allocated;\r\n\t\ttotalCollectionCount = 0;\r\n\t\tfor(k=0;k<termActive.length;k++){\r\n\t\t\tif(!termActive[k])\r\n\t\t\t\tcontinue;\r\n\t\t\ttotalCollectionCount +=termValues[k];\r\n\t\t}\r\n\t\t\r\n\t\t// for each phrase\r\n\t\tint[] phraseFreqKeys = phraseFrequencyIndex.keys;\r\n\t\tint[] phraseFreqValues = phraseFrequencyIndex.values;\r\n\t\tboolean[] states = phraseFrequencyIndex.allocated;\r\n\t\tfor (int phraseEntry = 0;phraseEntry<states.length;phraseEntry++){\r\n\t\t\tif(!states[phraseEntry]){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (phraseFreqValues[phraseEntry] < minFrequency)\r\n\t\t\t\tcontinue;\r\n\t\t\ttokenList=genSignatureTranslation(phraseFreqKeys[phraseEntry]); // i is phrase number\r\n\t\t\tfor (j = 0; j <tokenList.size(); j++) {\r\n\t\t\t\tcurToken=(Token)tokenList.get(j);\r\n\t\t\t\tif(termPhraseTranslation.containsKey(curToken.getIndex())){\r\n\t\t\t\t\tIntFloatOpenHashMap old = termPhraseTranslation.get(curToken.getIndex());\r\n\t\t\t\t\tif(old.containsKey(phraseFreqKeys[phraseEntry])){\r\n\t\t\t\t\t\tSystem.out.println(\"aha need correction\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\told.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight()); //phrase, weight\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tIntFloatOpenHashMap newPhrase = new IntFloatOpenHashMap();\r\n\t\t\t\t\tnewPhrase.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight());\r\n\t\t\t\t\ttermPhraseTranslation.put(curToken.getIndex(), newPhrase);\r\n\t\t\t\t}\r\n\t\t\t\t//\t\t\t\toutputTransMatrix.add(i,curToken.getIndex(),curToken.getWeight());\r\n\t\t\t\t//\t\t\t\toutputTransTMatrix.add(curToken.getIndex(), i, curToken.getWeight());\r\n\t\t\t\t//TODO termPhrase exists, create PhraseTerm\r\n\t\t\t}\r\n\t\t\ttokenList.clear();\r\n\t\t}\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test84() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.periodicPruningTipText();\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(\"How often (number of instances) to prune the dictionary of low frequency terms. 0 means don't prune. Setting a positive integer n means prune after every n instances\", string0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "public static void main(String[] args) {\r\n // feed the generator a fixed random value for repeatable behavior\r\n MarkovTextGeneratorLoL gen = new MarkovTextGeneratorLoL(new Random(42));\r\n //String textString = \"hi there hi Leo\";\r\n //String textString = \"\";\r\n \r\n String textString = \"Hello. Hello there. This is a test. Hello there. Hello Bob. Test again.\";\r\n System.out.println(textString);\r\n gen.train(textString);\r\n System.out.println(gen);\r\n System.out.println(\"Generator: \" + gen.generateText(0));\r\n String textString2 = \"You say yes, I say no, \" +\r\n \"You say stop, and I say go, go, go, \" +\r\n \"Oh no. You say goodbye and I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello. \" +\r\n \"I say high, you say low, \" +\r\n \"You say why, and I say I don't know. \" +\r\n \"Oh no. \" +\r\n \"You say goodbye and I say hello, hello, hello. \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello. \" +\r\n \"Why, why, why, why, why, why, \" +\r\n \"Do you say goodbye. \" +\r\n \"Oh no. \" +\r\n \"You say goodbye and I say hello, hello, hello. \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello. \" +\r\n \"You say yes, I say no, \" +\r\n \"You say stop and I say go, go, go. \" +\r\n \"Oh, oh no. \" +\r\n \"You say goodbye and I say hello, hello, hello. \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello,\";\r\n System.out.println(textString2);\r\n gen.retrain(textString2);\r\n System.out.println(gen);\r\n System.out.println(gen.generateText(20));\r\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.getUseStopList();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setTokenizer((Tokenizer) null);\n Tokenizer tokenizer0 = naiveBayesMultinomialText0.getTokenizer();\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertNull(tokenizer0);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test53() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.listOptions();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test52() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n \n naiveBayesMultinomialText0.setUseWordFrequencies(true);\n assertTrue(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test(timeout = 4000)\n public void test50() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.getStopwords();\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.m_lnorm = (double) (-2);\n double double0 = naiveBayesMultinomialText0.getLNorm();\n assertEquals((-2.0), double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test59() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n \n naiveBayesMultinomialText0.m_wordFrequencies = true;\n naiveBayesMultinomialText0.getOptions();\n assertTrue(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "public static Double[] learnSimplePerceptronWords(Data data1[],int index,double LearningRate,Double w[],HashMap<Integer, Integer> words)\r\n \t{\r\n \t\t\r\n \t\tData data[] = Arrays.copyOf(data1,index);\r\n \t\t\r\n \t\t//shuffle the data..\r\n \t \tArrayList<Data> arrayList = new ArrayList<Data>(Arrays.asList(Arrays.copyOf(data,index))); \r\n \t\tCollections.shuffle(arrayList,new Random(10));\r\n \t\tdata = arrayList.toArray(new Data[arrayList.size()]);\r\n \t\tfor(int i=0;i<index;i++)\r\n \t\t{\r\n \t\t\tdouble trueLabel;\r\n \t\t\tdouble predictedLabel;\r\n \t\t\tdouble dotProduct_wT_x = 0.0f;\r\n \t\t\tHashMap<Integer, Double> x = new HashMap<Integer, Double>();\r\n \t\t \r\n \t\t\ttrueLabel = data[i].getY();\r\n \t\t\tx= data[i].getX();\r\n \t\t\t \r\n \t\t\t\r\n \t\t \r\n \t\t\t//wT*x (contains bias)\r\n \t\t\tfor (Map.Entry<Integer, Double> entry : x.entrySet()) {\r\n \t\t\t\tdotProduct_wT_x = dotProduct_wT_x + w[entry.getKey()] * entry.getValue();\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\t//predict the label\r\n \t\t\tif(dotProduct_wT_x < 0)\r\n \t\t\t\tpredictedLabel = -1;\r\n \t\t\telse\t\r\n \t\t\t\tpredictedLabel = +1;\r\n \t\t\t\r\n \t\t\t//check if prediction is correct, if not update the weight vector and bias.\r\n \t\t\tif(predictedLabel != trueLabel)\r\n \t\t//\tif(dotProduct_wT_x<0)\r\n \t\t\t{\r\n \t\t\t\t//update bias\r\n \t\t\t\tw[0]=w[0]+trueLabel*LearningRate;\r\n\r\n \t\t\t\t\r\n \t\t\t\t//update all other weights only if those words are worthy tracking\r\n \t\t\t\r\n \t\t\t\tfor(int j=1;j<w.length;j++)\r\n \t\t\t\t{\r\n \t\t\t\t\t// if(x.containsKey(j))\r\n \t\t\t\t if(x.containsKey(j))\r\n \t\t\t \t if(words.containsKey(j)) //give more weightage to words that matter updates only when keyword found\r\n \t\t \t\t\t \tw[j]=w[j]+LearningRate*trueLabel*x.get(j);\r\n\r\n \t\t\t\t//\telse\r\n \t\t\t//\t\t\tw[j]=(double)0;\r\n \t\t\t\t \r\n \t\t\t\t\r\n \t\t\t\t \r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t \r\n \t\t}\r\n \t\treturn w;\r\n \t}", "@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }", "@Test(timeout = 4000)\n public void test73() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.normalizeDocLengthTipText();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(\"If true then document length is normalized according to the settings for norm and lnorm\", string0);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n }", "@Test(timeout = 4000)\n public void test65() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.m_useStopList = true;\n Capabilities capabilities0 = naiveBayesMultinomialText0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test41() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.reset();\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n PrecomputedKernelMatrixKernel precomputedKernelMatrixKernel0 = new PrecomputedKernelMatrixKernel();\n File file0 = precomputedKernelMatrixKernel0.getKernelMatrixFile();\n naiveBayesMultinomialText0.setStopwords(file0);\n File file1 = naiveBayesMultinomialText0.getStopwords();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertFalse(file1.exists());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseStopList());\n }", "@Test(timeout = 4000)\n public void test49() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.getLowercaseTokens();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test(timeout = 4000)\n public void test80() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.lowercaseTokensTipText();\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(\"Whether to convert all tokens to lowercase\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setStopwords((File) null);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertFalse(naiveBayesMultinomialText0.getUseStopList());\n }", "@Test(timeout = 4000)\n public void test45() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n double double0 = naiveBayesMultinomialText0.getMinWordFrequency();\n assertEquals(3.0, double0, 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test38() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n int int0 = naiveBayesMultinomialText0.getPeriodicPruning();\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(0, int0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n }", "@Test\n public void testTrain() {\n System.out.println(\"train\");\n TokenizedLine tokenizedLine = null;\n ArrayList<Words> expResult = null;\n ArrayList<Words> result = Training.train(tokenizedLine);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test(timeout = 4000)\n public void test56() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(\"NaiveBayesMultinomialText: No model built yet.\\n\", string0);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test(timeout = 4000)\n public void test68() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"probToLogOdds: probability must be in [0,1] \");\n assertEquals(\"probtologod: prob must be in [0,1] \", string0);\n }", "@Test(timeout = 4000)\n public void test85() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.stopwordsTipText();\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(\"The file containing the stopwords (if this is a directory then the default ones are used).\", string0);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "public double perplexity(Vector document, Vector docTopics) {\n double perplexity = 0;\n double norm = docTopics.norm(1) + (docTopics.size() * alpha);\n Iterator<Vector.Element> docElementIter = document.iterateNonZero();\n while (docElementIter.hasNext()) {\n Vector.Element e = docElementIter.next();\n int term = e.index();\n double prob = 0;\n for (int x = 0; x < numTopics; x++) {\n double d = (docTopics.get(x) + alpha) / norm;\n double p = d * (topicTermCounts.viewRow(x).get(term) + eta)\n / (topicSums.get(x) + eta * numTerms);\n prob += p;\n }\n perplexity += e.get() * Math.log(prob);\n }\n return -perplexity;\n }", "private double p_w_given_l(String word, Label label) {\n\t\t// TODO : Implement\n\t\t// Calculate the probability with Laplace smoothing for word in class(label)\n\t\tif(label.equals(Label.POSITIVE)) {\n\t\t\tdouble posCount = wordCount.get(Label.POSITIVE) + 0.0;\n\t\t\tif(!posWords.containsKey(word))\n\t\t\t\treturn 1.0/(v + posCount);\n\t\t\telse\n\t\t\t\treturn (1.0 + ((double)(posWords.get(word))))/(v + posCount);\n\t\t}\n\t\telse {\n\t\t\tdouble negCount = wordCount.get(Label.NEGATIVE) + 0.0;\n\t\t\tif(!negWords.containsKey(word))\n\t\t\t\treturn 1.0/(v + negCount);\n\t\t\telse\n\t\t\t\treturn (1.0 + ((double)(negWords.get(word))))/(v + negCount);\n\t\t}\n\t}", "public void trainBernoulli() {\t\t\n\t\tMap<String, Cluster> trainingDataSet = readFile(trainLabelPath, trainDataPath, \"training\");\n\t\tMap<String, Cluster> testingDataSet = readFile(testLabelPath, testDataPath, \"testing\");\n\n\t\t// do testing, if the predicted class and the gold class is not equal, increment one\n\t\tdouble error = 0;\n\n\t\tdouble documentSize = 0;\n\n\t\tSystem.out.println(\"evaluate the performance\");\n\t\tfor (int testKey = 1; testKey <= 20; testKey++) {\n\t\t\tCluster testingCluster = testingDataSet.get(Integer.toString(testKey));\n\t\t\tSystem.out.println(\"Cluster: \"+testingCluster.toString());\n\n\t\t\tfor (Document document : testingCluster.getDocuments()) {\n\t\t\t\tdocumentSize += 1; \n\t\t\t\tList<Double> classprobability = new ArrayList<Double>();\n\t\t\t\tMap<String, Integer> testDocumentWordCounts = document.getWordCount();\n\n\t\t\t\tfor (int classindex = 1; classindex <= 20; classindex++) {\n\t\t\t\t\t// used for calculating the probability\n\t\t\t\t\tCluster trainCluster = trainingDataSet.get(Integer.toString(classindex));\n\t\t\t\t\t// System.out.println(classindex + \" \" + trainCluster.mClassId);\n\t\t\t\t\tMap<String, Double> bernoulliProbability = trainCluster.bernoulliProbabilities;\n\t\t\t\t\tdouble probability = Math.log(trainCluster.getDocumentSize()/trainDocSize);\n\t\t\t\t\tfor(int index = 1; index <= voc.size(); index++ ){\n\n\t\t\t\t\t\t// judge whether this word is stop word \n\t\t\t\t\t\tboolean isStopwords = englishStopPosition.contains(index);\n\t\t\t\t\t\tif (isStopwords) continue;\n\n\t\t\t\t\t\tboolean contain = testDocumentWordCounts.containsKey(Integer.toString(index));\t\t\t\t\t\t\n\t\t\t\t\t\tif (contain) {\n\t\t\t\t\t\t\tprobability += Math.log(bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprobability += Math.log(1 - bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// put the probability into the map for the specific class\n\t\t\t\t\tclassprobability.add(probability);\n\t\t\t\t}\n\t\t\t\tObject obj = Collections.max(classprobability);\n\t\t\t\t// System.out.println(classprobability);\n\t\t\t\tString predicte_class1 = obj.toString();\n\t\t\t\t// System.out.println(predicte_class1);\n\t\t\t\t// System.out.println(Double.parseDouble(predicte_class1));\n\t\t\t\tint index = classprobability.indexOf(Double.parseDouble(predicte_class1));\n\t\t\t\t// System.out.println(index);\n\t\t\t\tString predicte_class = Integer.toString(index + 1);\n\n\n\t\t\t\tconfusion_matrix[testKey - 1][index] += 1;\n\n\t\t\t\t// System.out.println(document.docId + \": G, \" + testKey + \"; P: \" + predicte_class);\n\t\t\t\tif (!predicte_class.equals(Integer.toString(testKey))) {\n\t\t\t\t\terror += 1;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize);\n\t\t}\n\n\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize + \" precision rate : \" + (1 - error/documentSize));\n\n\t\t// print confusion matrix\n\t\tprintConfusionMatrix(confusion_matrix);\n\t}", "@Test(timeout = 4000)\n public void test77() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.getRevision();\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(\"9122\", string0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n }", "private void buildLanguageModel() {\n int total = 0;\n Map<Integer, Integer> wordCount = new HashMap<>();\n for (List<Integer> story : corpus.getStories()) {\n for (Integer word : story) {\n total++;\n if (wordCount.get(word) == null) wordCount.put(word, 0);\n wordCount.put(word, wordCount.get(word) + 1);\n }\n }\n wordValues = new HashMap<>();\n for (Map.Entry<Integer, Integer> entry : wordCount.entrySet()) {\n wordValues.put(entry.getKey(), total * 1.0 / entry.getValue());\n }\n }", "@Test(timeout = 4000)\n public void test72() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.tokenizerTipText();\n assertEquals(\"The tokenizing algorithm to use on the strings.\", string0);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n }", "@Override\n\tpublic double p_w_given_l(String word, Label label) {\n\n\t\t// Calculate the probability with Laplace smoothing for word in class(label)\n\t\tdouble ret = 0;\n\t\tm_delta = 0.00001;\n\n\t\tif (label == Label.SPORTS) {\n\t\t\t// if training data has this word\n\t\t\tif (m_map[0].get(word) != null) {\n\t\t\t\tret = (m_map[0].get(word).intValue() + m_delta) / (m_v * m_delta + sumV[0]);\n\t\t\t}\n\t\t\t// training data does not have this word\n\t\t\telse {\n\t\t\t\tret = m_delta / (m_v * m_delta + sumV[0]);\n\t\t\t}\n\t\t} else {\n\t\t\t// if training data has this word\n\t\t\tif (m_map[1].get(word) != null) {\n\t\t\t\tret = (m_map[1].get(word).intValue() + m_delta) / (m_v * m_delta + sumV[1]);\n\t\t\t}\n\t\t\t// training data does not have this word\n\t\t\telse {\n\t\t\t\tret = m_delta / (m_v * m_delta + sumV[1]);\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t}", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public double checkModel() {\n\treturn (Weights[2] * Unigram.checkModel() + \n\t\tWeights[1] * Bigram.checkModel() +\n\t\tWeights[0] * Trigram.checkModel());\n }", "public void test(List<String> modelFiles, String testFile, String prpFile) {\n/* 1014 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 1015 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* 1018 */ int nFold = modelFiles.size();\n/* */ \n/* 1020 */ List<RankList> samples = readInput(testFile);\n/* */ \n/* 1022 */ System.out.print(\"Preparing \" + nFold + \"-fold test data... \");\n/* 1023 */ FeatureManager.prepareCV(samples, nFold, trainingData, testData);\n/* 1024 */ System.out.println(\"[Done.]\");\n/* 1025 */ double rankScore = 0.0D;\n/* 1026 */ List<String> ids = new ArrayList<>();\n/* 1027 */ List<Double> scores = new ArrayList<>();\n/* 1028 */ for (int f = 0; f < nFold; f++) {\n/* */ \n/* 1030 */ List<RankList> test = testData.get(f);\n/* 1031 */ Ranker ranker = this.rFact.loadRankerFromFile(modelFiles.get(f));\n/* 1032 */ int[] features = ranker.getFeatures();\n/* 1033 */ if (normalize) {\n/* 1034 */ normalize(test, features);\n/* */ }\n/* 1036 */ for (RankList aTest : test) {\n/* 1037 */ RankList l = ranker.rank(aTest);\n/* 1038 */ double score = this.testScorer.score(l);\n/* 1039 */ ids.add(l.getID());\n/* 1040 */ scores.add(Double.valueOf(score));\n/* 1041 */ rankScore += score;\n/* */ } \n/* */ } \n/* 1044 */ rankScore /= ids.size();\n/* 1045 */ ids.add(\"all\");\n/* 1046 */ scores.add(Double.valueOf(rankScore));\n/* 1047 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ \n/* 1049 */ if (!prpFile.isEmpty()) {\n/* */ \n/* 1051 */ savePerRankListPerformanceFile(ids, scores, prpFile);\n/* 1052 */ System.out.println(\"Per-ranked list performance saved to: \" + prpFile);\n/* */ } \n/* */ }", "public static void main(String[] args) throws Exception {\n\t\tint i;\r\n\t\tint [][]preci_recall = new int [5][6]; \r\n\r\n\t\tNGRAM ngram = new NGRAM();\r\n\t\t\r\n\t\tfor(i=0; i<5; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println((i+1) + \" th FOLD IS A TEST SET\");\r\n\t\t\t\r\n\t\t\tdouble[][] test_ngram_features = ngram.feature(i,1);\r\n\t\t\tdouble[][] train_ngram_features = ngram.feature(i,0);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"NGRAM FEATURES...OK\");\r\n\t\r\n//\t\t\t\r\n//\t\t\tLIWC liwc = new LIWC();\r\n//\t\t\t\r\n//\t\t\tdouble[][] test_liwc_features = liwc.feature(i,1,test_ngram_features.length);\r\n//\t\t\tdouble[][] train_liwc_features = liwc.feature(i,0,train_ngram_features.length);\r\n//\r\n//\t\t\tSystem.out.println(\"LIWC FEATURES..OK\");\r\n//\t\t\t\r\n//\t\t\tCOMBINE combine = new COMBINE();\r\n//\t\t\tdouble[][] train_features = combine.sum(train_liwc_features,train_ngram_features);\r\n//\t\t\tdouble[][] test_features = combine.sum(test_liwc_features,test_ngram_features);\r\n//\t\t\t\r\n//\t\t\tSystem.out.println(\"COMBINE...OK\");\r\n\t\t\r\n\t\t\tSVMLIGHT svmlight = new SVMLIGHT();\r\n\t\t\tpreci_recall[i]=svmlight.calcc(train_ngram_features, test_ngram_features);\r\n\r\n\t\t}\r\n\t\t\r\n//\t 0 : truthful TP\r\n//\t 1 : truthful TP+FP\r\n//\t 2 : truthful TP+FN\r\n//\t 3 : deceptive TP\r\n//\t 4 : deceptive TP+FP\r\n//\t 5 : deceptive TP+FN\r\n\t\t\r\n\t\tint truthful_TP_sum=0,truthful_TPFP_sum=0,truthful_TPFN_sum=0;\r\n\t\tint deceptive_TP_sum=0,deceptive_TPFP_sum=0,deceptive_TPFN_sum=0;\r\n\t\t\r\n\t\tfor(i=0;i<5;i++) {\r\n\t\t\ttruthful_TP_sum+=preci_recall[i][0];\r\n\t\t\ttruthful_TPFP_sum+=preci_recall[i][1];\r\n\t\t\ttruthful_TPFN_sum+=preci_recall[i][2];\r\n\t\t\t\r\n\t\t\tdeceptive_TP_sum+=preci_recall[i][3];\r\n\t\t\tdeceptive_TPFP_sum+=preci_recall[i][4];\r\n\t\t\tdeceptive_TPFN_sum+=preci_recall[i][5];\r\n\t\t}\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"\\n\\nTRUTHFUL_TP_SUM : \" + truthful_TP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFP_SUM : \" + truthful_TPFP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFN_SUM : \" + truthful_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE_TP_SUM : \" + deceptive_TP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFP_SUM : \" + deceptive_TPFP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFN_SUM : \" + deceptive_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"\\nTRUTHFUL PRECISION : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFP_sum));\r\n\t\tSystem.out.println(\"TRUTHFUL RECALL : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFN_sum));\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE PRECISION : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFP_sum));\r\n\t\tSystem.out.println(\"DECEPTIVE RECALL : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFN_sum));\r\n\t\t\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n CVParameterSelection cVParameterSelection0 = new CVParameterSelection();\n Capabilities capabilities0 = cVParameterSelection0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n try { \n naiveBayesMultinomialText0.buildClassifier(instances0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // weka.classifiers.bayes.NaiveBayesMultinomialText: Cannot handle relational attributes!\n //\n verifyException(\"weka.core.Capabilities\", e);\n }\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n NaiveBayesMultinomial naiveBayesMultinomial0 = new NaiveBayesMultinomial();\n MockRandom mockRandom0 = new MockRandom((-1));\n try { \n evaluation0.crossValidateModel((Classifier) naiveBayesMultinomial0, instances0, (-1), (Random) mockRandom0, (Object[]) testInstances0.DEFAULT_WORDS);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Number of folds must be greater than 1\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n FilteredClassifier filteredClassifier0 = new FilteredClassifier();\n try { \n Evaluation.evaluateModel((Classifier) filteredClassifier0, testInstances0.DEFAULT_WORDS);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // Weka exception: No training file and no object input file given.\n // \n // General options:\n // \n // -h or -help\n // \\tOutput help information.\n // -synopsis or -info\n // \\tOutput synopsis for classifier (use in conjunction with -h)\n // -t <name of training file>\n // \\tSets training file.\n // -T <name of test file>\n // \\tSets test file. If missing, a cross-validation will be performed\n // \\ton the training data.\n // -c <class index>\n // \\tSets index of class attribute (default: last).\n // -x <number of folds>\n // \\tSets number of folds for cross-validation (default: 10).\n // -no-cv\n // \\tDo not perform any cross validation.\n // -split-percentage <percentage>\n // \\tSets the percentage for the train/test set split, e.g., 66.\n // -preserve-order\n // \\tPreserves the order in the percentage split.\n // -s <random number seed>\n // \\tSets random number seed for cross-validation or percentage split\n // \\t(default: 1).\n // -m <name of file with cost matrix>\n // \\tSets file with cost matrix.\n // -l <name of input file>\n // \\tSets model input file. In case the filename ends with '.xml',\n // \\ta PMML file is loaded or, if that fails, options are loaded\n // \\tfrom the XML file.\n // -d <name of output file>\n // \\tSets model output file. In case the filename ends with '.xml',\n // \\tonly the options are saved to the XML file, not the model.\n // -v\n // \\tOutputs no statistics for training data.\n // -o\n // \\tOutputs statistics only, not the classifier.\n // -i\n // \\tOutputs detailed information-retrieval statistics for each class.\n // -k\n // \\tOutputs information-theoretic statistics.\n // -classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\n // \\tUses the specified class for generating the classification output.\n // \\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\n // -p range\n // \\tOutputs predictions for test instances (or the train instances if\n // \\tno test instances provided and -no-cv is used), along with the \n // \\tattributes in the specified range (and nothing else). \n // \\tUse '-p 0' if no attributes are desired.\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -distribution\n // \\tOutputs the distribution instead of only the prediction\n // \\tin conjunction with the '-p' option (only nominal classes).\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -r\n // \\tOnly outputs cumulative margin distribution.\n // -g\n // \\tOnly outputs the graph representation of the classifier.\n // -xml filename | xml-string\n // \\tRetrieves the options from the XML-data instead of the command line.\n // -threshold-file <file>\n // \\tThe file to save the threshold data to.\n // \\tThe format is determined by the extensions, e.g., '.arff' for ARFF \n // \\tformat or '.csv' for CSV.\n // -threshold-label <label>\n // \\tThe class label to determine the threshold data for\n // \\t(default is the first label)\n // \n // Options specific to weka.classifiers.meta.FilteredClassifier:\n // \n // -F <filter specification>\n // \\tFull class name of filter to use, followed\n // \\tby filter options.\n // \\teg: \\\"weka.filters.unsupervised.attribute.Remove -V -R 1,2\\\"\n // -D\n // \\tIf set, classifier is run in debug mode and\n // \\tmay output additional info to the console\n // -W\n // \\tFull name of base classifier.\n // \\t(default: weka.classifiers.trees.J48)\n // \n // Options specific to classifier weka.classifiers.trees.J48:\n // \n // -U\n // \\tUse unpruned tree.\n // -O\n // \\tDo not collapse tree.\n // -C <pruning confidence>\n // \\tSet confidence threshold for pruning.\n // \\t(default 0.25)\n // -M <minimum number of instances>\n // \\tSet minimum number of instances per leaf.\n // \\t(default 2)\n // -R\n // \\tUse reduced error pruning.\n // -N <number of folds>\n // \\tSet number of folds for reduced error\n // \\tpruning. One fold is used as pruning set.\n // \\t(default 3)\n // -B\n // \\tUse binary splits only.\n // -S\n // \\tDon't perform subtree raising.\n // -L\n // \\tDo not clean up after the tree has been built.\n // -A\n // \\tLaplace smoothing for predicted probabilities.\n // -J\n // \\tDo not use MDL correction for info gain on numeric attributes.\n // -Q <seed>\n // \\tSeed for random data shuffling (default 1).\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "public static void caso12(){\n\n FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso1.owl\",\"file:resources/caso1.repository\",fm);\n\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"pan\");\n\t\tif(map==null){\n\t\t\tSystem.out.println(\"El map es null\");\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test48() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n double double0 = naiveBayesMultinomialText0.getNorm();\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, double0, 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n }", "@Override\n public void calculate(double[] x) {\n\n double prob = 0.0; // the log prob of the sequence given the model, which is the negation of value at this point\n Triple<double[][], double[][], double[][]> allParams = separateWeights(x);\n double[][] linearWeights = allParams.first();\n double[][] W = allParams.second(); // inputLayerWeights \n double[][] U = allParams.third(); // outputLayerWeights \n\n double[][] Y = null;\n if (flags.softmaxOutputLayer) {\n Y = new double[U.length][];\n for (int i = 0; i < U.length; i++) {\n Y[i] = ArrayMath.softmax(U[i]);\n }\n }\n\n double[][] What = emptyW();\n double[][] Uhat = emptyU();\n\n // the expectations over counts\n // first index is feature index, second index is of possible labeling\n double[][] E = empty2D();\n double[][] eW = emptyW();\n double[][] eU = emptyU();\n\n // iterate over all the documents\n for (int m = 0; m < data.length; m++) {\n int[][][] docData = data[m];\n int[] docLabels = labels[m];\n\n // make a clique tree for this document\n CRFCliqueTree cliqueTree = CRFCliqueTree.getCalibratedCliqueTree(docData, labelIndices, numClasses, classIndex,\n backgroundSymbol, new NonLinearCliquePotentialFunction(linearWeights, W, U, flags));\n\n // compute the log probability of the document given the model with the parameters x\n int[] given = new int[window - 1];\n Arrays.fill(given, classIndex.indexOf(backgroundSymbol));\n int[] windowLabels = new int[window];\n Arrays.fill(windowLabels, classIndex.indexOf(backgroundSymbol));\n\n if (docLabels.length>docData.length) { // only true for self-training\n // fill the given array with the extra docLabels\n System.arraycopy(docLabels, 0, given, 0, given.length);\n System.arraycopy(docLabels, 0, windowLabels, 0, windowLabels.length);\n // shift the docLabels array left\n int[] newDocLabels = new int[docData.length];\n System.arraycopy(docLabels, docLabels.length-newDocLabels.length, newDocLabels, 0, newDocLabels.length);\n docLabels = newDocLabels;\n }\n // iterate over the positions in this document\n for (int i = 0; i < docData.length; i++) {\n int label = docLabels[i];\n double p = cliqueTree.condLogProbGivenPrevious(i, label, given);\n if (VERBOSE) {\n System.err.println(\"P(\" + label + \"|\" + ArrayMath.toString(given) + \")=\" + p);\n }\n prob += p;\n System.arraycopy(given, 1, given, 0, given.length - 1);\n given[given.length - 1] = label;\n }\n\n // compute the expected counts for this document, which we will need to compute the derivative\n // iterate over the positions in this document\n for (int i = 0; i < docData.length; i++) {\n // for each possible clique at this position\n System.arraycopy(windowLabels, 1, windowLabels, 0, window - 1);\n windowLabels[window - 1] = docLabels[i];\n for (int j = 0; j < docData[i].length; j++) {\n Index<CRFLabel> labelIndex = labelIndices[j];\n // for each possible labeling for that clique\n int[] cliqueFeatures = docData[i][j];\n double[] As = null;\n double[] fDeriv = null;\n double[][] yTimesA = null;\n double[] sumOfYTimesA = null;\n\n if (j == 0) {\n As = NonLinearCliquePotentialFunction.hiddenLayerOutput(W, cliqueFeatures, flags);\n fDeriv = new double[inputLayerSize];\n double fD = 0;\n for (int q = 0; q < inputLayerSize; q++) {\n if (useSigmoid) {\n fD = As[q] * (1 - As[q]); \n } else {\n fD = 1 - As[q] * As[q]; \n }\n fDeriv[q] = fD;\n }\n\n // calculating yTimesA for softmax\n if (flags.softmaxOutputLayer) {\n double val = 0;\n\n yTimesA = new double[outputLayerSize][numHiddenUnits];\n for (int ii = 0; ii < outputLayerSize; ii++) {\n yTimesA[ii] = new double[numHiddenUnits];\n }\n sumOfYTimesA = new double[outputLayerSize];\n\n for (int k = 0; k < outputLayerSize; k++) {\n double[] Yk = null;\n if (flags.tieOutputLayer) {\n Yk = Y[0];\n } else {\n Yk = Y[k];\n }\n double sum = 0;\n for (int q = 0; q < inputLayerSize; q++) {\n if (q % outputLayerSize == k) {\n int hiddenUnitNo = q / outputLayerSize;\n val = As[q] * Yk[hiddenUnitNo];\n yTimesA[k][hiddenUnitNo] = val;\n sum += val;\n }\n }\n sumOfYTimesA[k] = sum;\n }\n }\n\n // calculating Uhat What\n int[] cliqueLabel = new int[j + 1];\n System.arraycopy(windowLabels, window - 1 - j, cliqueLabel, 0, j + 1);\n\n CRFLabel crfLabel = new CRFLabel(cliqueLabel);\n int givenLabelIndex = labelIndex.indexOf(crfLabel);\n double[] Uk = null;\n double[] UhatK = null;\n double[] Yk = null;\n double[] yTimesAK = null;\n double sumOfYTimesAK = 0;\n if (flags.tieOutputLayer) {\n Uk = U[0];\n UhatK = Uhat[0];\n if (flags.softmaxOutputLayer) {\n Yk = Y[0];\n }\n } else {\n Uk = U[givenLabelIndex];\n UhatK = Uhat[givenLabelIndex];\n if (flags.softmaxOutputLayer) {\n Yk = Y[givenLabelIndex];\n }\n }\n\n if (flags.softmaxOutputLayer) {\n yTimesAK = yTimesA[givenLabelIndex];\n sumOfYTimesAK = sumOfYTimesA[givenLabelIndex];\n }\n\n for (int k = 0; k < inputLayerSize; k++) {\n double deltaK = 1;\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (k % outputLayerSize == givenLabelIndex) {\n int hiddenUnitNo = k / outputLayerSize;\n if (flags.softmaxOutputLayer) {\n UhatK[hiddenUnitNo] += (yTimesAK[hiddenUnitNo] - Yk[hiddenUnitNo] * sumOfYTimesAK);\n deltaK *= Yk[hiddenUnitNo];\n } else {\n UhatK[hiddenUnitNo] += As[k];\n deltaK *= Uk[hiddenUnitNo];\n }\n }\n } else {\n UhatK[k] += As[k];\n if (useOutputLayer) {\n deltaK *= Uk[k];\n }\n }\n if (useHiddenLayer)\n deltaK *= fDeriv[k];\n if (useOutputLayer) {\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (k % outputLayerSize == givenLabelIndex) {\n double[] WhatK = What[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n WhatK[cliqueFeatures[n]] += deltaK;\n }\n }\n } else {\n double[] WhatK = What[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n WhatK[cliqueFeatures[n]] += deltaK;\n }\n }\n } else {\n if (k == givenLabelIndex) {\n double[] WhatK = What[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n WhatK[cliqueFeatures[n]] += deltaK;\n }\n }\n }\n }\n }\n\n for (int k = 0; k < labelIndex.size(); k++) { // labelIndex.size() == numClasses\n int[] label = labelIndex.get(k).getLabel();\n double p = cliqueTree.prob(i, label); // probability of these labels occurring in this clique with these features\n if (j == 0) { // for node features\n double[] Uk = null;\n double[] eUK = null;\n double[] Yk = null;\n if (flags.tieOutputLayer) {\n Uk = U[0];\n eUK = eU[0];\n if (flags.softmaxOutputLayer) {\n Yk = Y[0];\n }\n } else {\n Uk = U[k];\n eUK = eU[k];\n if (flags.softmaxOutputLayer) {\n Yk = Y[k];\n }\n }\n if (useOutputLayer) {\n for (int q = 0; q < inputLayerSize; q++) {\n double deltaQ = 1;\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (q % outputLayerSize == k) {\n int hiddenUnitNo = q / outputLayerSize;\n if (flags.softmaxOutputLayer) {\n eUK[hiddenUnitNo] += (yTimesA[k][hiddenUnitNo] - Yk[hiddenUnitNo] * sumOfYTimesA[k]) * p;\n deltaQ = Yk[hiddenUnitNo];\n } else {\n eUK[hiddenUnitNo] += As[q] * p;\n deltaQ = Uk[hiddenUnitNo];\n }\n }\n } else {\n eUK[q] += As[q] * p;\n deltaQ = Uk[q];\n }\n if (useHiddenLayer)\n deltaQ *= fDeriv[q];\n if (flags.sparseOutputLayer || flags.tieOutputLayer) {\n if (q % outputLayerSize == k) {\n double[] eWq = eW[q];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n eWq[cliqueFeatures[n]] += deltaQ * p;\n }\n }\n } else {\n double[] eWq = eW[q];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n eWq[cliqueFeatures[n]] += deltaQ * p;\n }\n }\n }\n } else {\n double deltaK = 1;\n if (useHiddenLayer)\n deltaK *= fDeriv[k];\n double[] eWK = eW[k];\n for (int n = 0; n < cliqueFeatures.length; n++) {\n eWK[cliqueFeatures[n]] += deltaK * p;\n }\n }\n } else { // for edge features\n for (int n = 0; n < cliqueFeatures.length; n++) {\n E[cliqueFeatures[n]][k] += p;\n }\n }\n }\n }\n }\n }\n\n if (Double.isNaN(prob)) { // shouldn't be the case\n throw new RuntimeException(\"Got NaN for prob in CRFNonLinearLogConditionalObjectiveFunction.calculate()\");\n }\n\n value = -prob;\n if(VERBOSE){\n System.err.println(\"value is \" + value);\n }\n\n // compute the partial derivative for each feature by comparing expected counts to empirical counts\n int index = 0;\n for (int i = 0; i < E.length; i++) {\n int originalIndex = edgeFeatureIndicesMap.get(i);\n\n for (int j = 0; j < E[i].length; j++) {\n derivative[index++] = (E[i][j] - Ehat[i][j]);\n if (VERBOSE) {\n System.err.println(\"linearWeights deriv(\" + i + \",\" + j + \") = \" + E[i][j] + \" - \" + Ehat[i][j] + \" = \" + derivative[index - 1]);\n }\n }\n }\n if (index != edgeParamCount)\n throw new RuntimeException(\"after edge derivative, index(\"+index+\") != edgeParamCount(\"+edgeParamCount+\")\");\n\n for (int i = 0; i < eW.length; i++) {\n for (int j = 0; j < eW[i].length; j++) {\n derivative[index++] = (eW[i][j] - What[i][j]);\n if (VERBOSE) {\n System.err.println(\"inputLayerWeights deriv(\" + i + \",\" + j + \") = \" + eW[i][j] + \" - \" + What[i][j] + \" = \" + derivative[index - 1]);\n }\n }\n }\n\n\n if (index != beforeOutputWeights)\n throw new RuntimeException(\"after W derivative, index(\"+index+\") != beforeOutputWeights(\"+beforeOutputWeights+\")\");\n\n if (useOutputLayer) {\n for (int i = 0; i < eU.length; i++) {\n for (int j = 0; j < eU[i].length; j++) {\n derivative[index++] = (eU[i][j] - Uhat[i][j]);\n if (VERBOSE) {\n System.err.println(\"outputLayerWeights deriv(\" + i + \",\" + j + \") = \" + eU[i][j] + \" - \" + Uhat[i][j] + \" = \" + derivative[index - 1]);\n }\n }\n }\n }\n\n if (index != x.length)\n throw new RuntimeException(\"after W derivative, index(\"+index+\") != x.length(\"+x.length+\")\");\n\n int regSize = x.length;\n if (flags.skipOutputRegularization || flags.softmaxOutputLayer) {\n regSize = beforeOutputWeights;\n }\n\n // incorporate priors\n if (prior == QUADRATIC_PRIOR) {\n double sigmaSq = sigma * sigma;\n for (int i = 0; i < regSize; i++) {\n double k = 1.0;\n double w = x[i];\n value += k * w * w / 2.0 / sigmaSq;\n derivative[i] += k * w / sigmaSq;\n }\n } else if (prior == HUBER_PRIOR) {\n double sigmaSq = sigma * sigma;\n for (int i = 0; i < regSize; i++) {\n double w = x[i];\n double wabs = Math.abs(w);\n if (wabs < epsilon) {\n value += w * w / 2.0 / epsilon / sigmaSq;\n derivative[i] += w / epsilon / sigmaSq;\n } else {\n value += (wabs - epsilon / 2) / sigmaSq;\n derivative[i] += ((w < 0.0) ? -1.0 : 1.0) / sigmaSq;\n }\n }\n } else if (prior == QUARTIC_PRIOR) {\n double sigmaQu = sigma * sigma * sigma * sigma;\n for (int i = 0; i < regSize; i++) {\n double k = 1.0;\n double w = x[i];\n value += k * w * w * w * w / 2.0 / sigmaQu;\n derivative[i] += k * w / sigmaQu;\n }\n }\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n \n naiveBayesMultinomialText0.m_normalize = true;\n boolean boolean0 = naiveBayesMultinomialText0.getNormalizeDocLength();\n assertTrue(boolean0);\n }", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n double[] doubleArray0 = new double[8];\n doubleArray0[1] = 20.0;\n SparseInstance sparseInstance0 = new SparseInstance(20.0, doubleArray0);\n instances0.add((Instance) sparseInstance0);\n try { \n naiveBayesMultinomialText0.buildClassifier(instances0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 20\n //\n verifyException(\"weka.classifiers.bayes.NaiveBayesMultinomialText\", e);\n }\n }", "public static void main(String[] args) {\n\t\tUtility.dirPath = \"C:\\\\Users\\\\imSlappy\\\\workspace\\\\FeelingAnalysis\\\\Documents\\\\2_group_eng\";\n\t\tString sub[] = {\"dup\",\"bug\"};\n\t\tUtility.classLabel = sub;\n\t\tUtility.numdoc = 350;\n\t\tSetClassPath.read_path(Utility.dirPath);\n\t\tUtility.language = \"en\";\n\t\t\n\t\tUtility.stopWordHSEN = Fileprocess.FileHashSet(\"data/stopwordAndSpc_eng.txt\");\n\t\tUtility.dicen = new _dictionary();\n\t\tUtility.dicen.getDictionary(\"data/dicEngScore.txt\");\n\t\t\n\t\tUtility.vocabHM = new HashMap();\n\t\t// ================= completed initial main Program ==========================\n\n\t\tMainExampleNaive ob = new MainExampleNaive();\n\t\t\n\t\t// --------------------- Pre-process -----------------------\n\t\tob.word_arr = new HashSet [Utility.listFile.length][];\n\t\tob.wordSet = new ArrayList<String>();\n\t\tfor (int i = 0; i < Utility.listFile.length; i++) {\n\t\t\tob.word_arr[i]=new HashSet[Utility.listFile[i].length];\n\t\t\tfor (int j = 0; j < Utility.listFile[i].length; j++) {\n\t\t\t\tStringBuffer strDoc = Fileprocess.readFile(Utility.listFile[i][j]);\n\t\t\t\tob.word_arr[i][j]=ob.docTokenization(new String(strDoc));\n\t\t\t}\n\t\t\tob.checkBound(3, 10000);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"++ Total : \"+Utility.vocabHM.size()+\" words\");\n\t\tSystem.out.println(\"++ \"+Utility.vocabHM);\n\t\t\n\t\t// ---------------------- Selection ------------------------\n//\t\tInformationGain ig = new InformationGain(ob.word_arr.length*ob.word_arr[0].length , ob.wordSet,ob.word_arr);\n//\t\tArrayList<String> ban_word = ig.featureSelection(0.0); // selected out with IG = 0\n//\t\t//ob.banFeature(ban_word);\n//\t\tSystem.out.println(\"ban list[\"+ban_word.size()+\"] : \"+ban_word);\n//\t\t\n//\t\tSystem.out.println(\"-- After \"+Utility.vocabHM.size());\n//\t\tSystem.out.println(\"-- \"+Utility.vocabHM);\n\t\t\n\t\tob.setWordPosition();\n\t\t// ---------------------- Processing -----------------------\n\t\tNaiveBayes naive = new NaiveBayes();\n\t\tnaive.naiveTrain(true);\n\t\t\n\t\tint result = naive.naiveUsage(\"after cold reset of my pc (crash of xp) the favorites of firefox are destroyed and all settings are standard again! Where are firefox-favorites stored and the settings ? how to backup them rgularely? All other software on my pc still works properly ! even INternetExplorer\");\n\t\tSystem.out.println(\"\\nResult : \"+Utility.classLabel[result]);\n\t}", "@Test(timeout = 4000)\n public void test75() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.useStopListTipText();\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(\"If true, ignores all words that are on the stoplist.\", string0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test\n\tpublic void testProcessAndLoad() {\n\t\tPreProcessor preProcessor = new PreProcessor();\n\t\tpreProcessor.processFiles(new File(\"res/tests/test1.txt\"));\n\t\tNGramModel actualModel = preProcessor.getNgramModel();\n\t\tactualModel.end();\n\t\t\n\t\tString testFilePath = \"res/bin/test.bin\";\n\t\t\n\t\tFile dir = new File(\"res/bin\");\n\t\tif (!dir.exists()) {\n\t\t\tdir.mkdirs();\n\t\t}\n\t\t\n\t\tpreProcessor.writeToFile(testFilePath);\n\t\t\n\t\tLoader loader = new Loader();\n\t\tNGramModel loadedModel = loader.load(testFilePath);\n\t\tassertEquals(loadedModel.numNgrams(), actualModel.getNgrams().size());\n\t\t\n\t\tfor (Map.Entry<NGram, Integer> current : actualModel.getNgrams().entrySet()) {\n\t\t\tassertEquals((int)current.getValue(), loadedModel.getCount(current.getKey()));\n\t\t}\n\t\t\n\t\tfor (int i = 1; i <= actualModel.maxLength(); i++) {\n\t\t\tassertEquals(loadedModel.numberOfNGramLength(i), actualModel.numberOfNGramLength(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < actualModel.topUnigrams().size(); i++) {\n\t\t\tassertEquals(loadedModel.topUnigrams().get(i), actualModel.topUnigrams().get(i));\n\t\t}\n\t\t\n\t\tassertEquals(\n\t\t\tloadedModel.getGoodTuringEstimation().getTotal(),\n\t\t\tactualModel.getGoodTuringEstimation().getTotal());\n\t\t\n\t\tassertEquals(\n\t\t\tloadedModel.getGoodTuringEstimation().getA(),\n\t\t\tactualModel.getGoodTuringEstimation().getA(), 1E-6);\n\t\t\n\t\tassertEquals(\n\t\t\tloadedModel.getGoodTuringEstimation().getB(),\n\t\t\tactualModel.getGoodTuringEstimation().getB(), 1E-6);\n\t}", "public static void model1() {\n try {\n IloCplex cplex = new IloCplex();\n \n //variables\n IloNumVar x = cplex.numVar(0, Double.MAX_VALUE, \"x\"); //x >= 0\n IloNumVar y = cplex.numVar(0, Double.MAX_VALUE, \"y\"); //y >= 0\n \n //expressions\n IloLinearNumExpr objective = cplex.linearNumExpr();\n objective.addTerm(0.12, x);\n objective.addTerm(0.15, y);\n \n //define objective\n cplex.addMinimize(objective);\n \n //define constraints\n cplex.addGe(cplex.sum(cplex.prod(60, x), cplex.prod(60, y)), 300);\n cplex.addGe(cplex.sum(cplex.prod(12, x), cplex.prod(6, y)), 36);\n cplex.addGe(cplex.sum(cplex.prod(10, x), cplex.prod(30, y)), 90);\n \n //solve\n if (cplex.solve()) {\n System.out.println(\"Obj = \" + cplex.getObjValue());\n System.out.println(\"Obj = \" + cplex.getValue(objective));\n System.out.println(\"x = \" + cplex.getValue(x));\n System.out.println(\"y = \" + cplex.getValue(y));\n } else {\n System.out.println(\"Solution not found.\");\n }\n } catch (IloException ex) {\n ex.printStackTrace();\n }\n }", "public NBClassifier(String trainDataFolder, int trainPortion)\n\t{\n\t\ttrainingDocs = new ArrayList<String>();\n\t\tallDocs = new ArrayList<String>();\n\t\tnumClasses = 2;\n\t\tclassCounts = new int[numClasses];\n\t\tclassStrings = new String[numClasses];\n\t\tclassTokenCounts = new int[numClasses];\n\t\tcondProb = new HashMap[numClasses];\n\t\tvocabulary = new HashSet<String>();\n\t\tfor(int i=0;i<numClasses;i++){ //just initialization\n\t\t\tclassStrings[i] = \"\";\n\t\t\tcondProb[i] = new HashMap<String,Double>();\n\t\t}\n\t\ttotalDocs = 5574;\n\t\toffset = Math.round(totalDocs) * trainPortion / 100;\n\t\tSystem.out.println(\"Numer of Documents For Training: \"+offset);\n\t\tSystem.out.println(\"Numer of Documents For Testing: \"+(totalDocs-offset));\n\t\tpreprocess(trainDataFolder);\n\t\t\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tString[] tokens = classStrings[i].split(\" \");\n\t\t\tclassTokenCounts[i] = tokens.length;\n\t\t\t//collecting the counts\n\t\t\tfor(String token:tokens){\n\t\t\t\t//System.out.println(token);\n\t\t\t\tvocabulary.add(token);\n\t\t\t\tif(condProb[i].containsKey(token)){\n\t\t\t\t\tdouble count = condProb[i].get(token);\n\t\t\t\t\tcondProb[i].put(token, count+1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcondProb[i].put(token, 1.0);\n\t\t\t\t//System.out.println(token+\" : \"+condProb[i].get(token));\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tIterator<Map.Entry<String, Double>> iterator = condProb[i].entrySet().iterator();\n\t\t\tint vSize = vocabulary.size();\n\t\t\twhile(iterator.hasNext())\n\t\t\t{\n\t\t\t\tMap.Entry<String, Double> entry = iterator.next();\n\t\t\t\tString token = entry.getKey();\n\t\t\t\tDouble count = entry.getValue();\n\t\t\t\t//System.out.println(count+1+\" / ( \"+classTokenCounts[i]+\" + \"+vSize+\" )\");\n\t\t\t\tcount = (count+1)/(classTokenCounts[i]+vSize);\n\t\t\t\tcondProb[i].put(token, count);\n\t\t\t}\n\t\t\t//System.out.println(\"dekho: \"+condProb[i]);\n\t\t}\n\t\ttestModel();\n\t}", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "public void testVocabulary() throws Exception {\n assertVocabulary(a, getDataPath(\"kstemTestData.zip\"), \"kstem_examples.txt\");\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public static void runMarginPerceptron(Data[] data, int index,String testFileName,HashMap<Integer,Integer> words)\r\n{\r\n int t=0;\r\n double LearningRates[] = {1, 0.1, 0.01};\r\n double Margins[] = {1, 0.1, 0.01};\r\n\r\n\tint minInt =0; // Set To Your Desired Min Value\r\n int maxInt =2;\r\n\tRandom rand = new Random();\r\n\t\r\n \tint randomNum = rand.nextInt((maxInt - minInt) + 1) + minInt;\r\n\r\n \tdouble LearningRate = LearningRates[randomNum];\r\n \t\r\nfor(int m=0;m<LearningRates.length;m++)\r\n{\r\n for(int i=0;i<LearningRates.length;i++)\r\n {\r\n\t LearningRate = LearningRates[i];\r\n\t\t double devAccuracyTotal = (double)0;\r\n\t\t int noOfEpochs= 20;\r\n\t\t int decreaseRate = 0;\r\n\t\t \r\n \t\t Double w[] = new Double[74500];\r\n\t\t Double min =-0.01; // Set To Your Desired Min Value\r\n\t Double max = 0.01;\r\n\t \t\tdouble smallRandNumber = min + new Random().nextDouble() * (max - min); \r\n\t\t\tArrays.fill(w, smallRandNumber);\r\n\t\t\t\r\n\t\t for(int epoch=0;epoch<noOfEpochs;epoch++)\r\n\t\t {\r\n\t\t\t \tw = learnMarginPerceptron(data,index,LearningRate,decreaseRate,w,Margins[m]);\r\n\t\t\t \tdecreaseRate = decreaseRate + index;\r\n\t\t\r\n\t\t }\r\n\t\t//CVSplit test\r\n \tdouble cvAccuracy = testTestFile(w,testFileName,words);\r\n \t\r\n// \tSystem.out.println(\"Epoch\" + epoch +\" Dev Accuracy for Decaying Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \r\n \r\n \tSystem.out.println(\" ** Cv Accuracy for Margin Rate\" + Margins[m] + \" Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \tSystem.out.println(\" \");\r\n }\r\n}\r\n//double testAccuracy = testTestFile(w,testFileName);\r\n\t//System.out.println(\"test Accuracy\" + testAccuracy);\r\n}", "@Test\r\n public void testKpt() {\r\n System.out.println(\"kpt\");\r\n String stem = \"heikko\";\r\n boolean isVahva = true;\r\n String expResult = \"heiko\";\r\n String result;\r\n result = Word.kpt(stem, isVahva);\r\n assertEquals(expResult, result);\r\n \r\n stem = \"heiko\";\r\n expResult = \"heikko\";\r\n result = Word.kpt(stem, false);\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test12() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toMatrixString(\"randomWidthFactorTipText\");\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(\"randomWidthFactorTipText\\n a b <-- classified as\\n 0 0 | a = class1\\n 0 0 | b = class2\\n\", string0);\n }", "public static void demoDP(LexicalizedParser lp, String filename) {\n\t\t// This option shows loading and sentence-segmenting and tokenizing\n\t\t// a file using DocumentPreprocessor.\n\t\tTreebankLanguagePack tlp = new PennTreebankLanguagePack();\n\t\tGrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();\n\t\t// You could also create a tokenizer here (as below) and pass it\n\t\t// to DocumentPreprocessor\n\t\tfor (List<HasWord> sentence : new DocumentPreprocessor(filename)) {\n\t\t\tTree parse = lp.apply(sentence);\n\t\t\tList<Tree> testTree = new ArrayList<Tree>();\n\n\t\t\t// for (Tree subtree : parse) {\n\t\t\t// if (subtree.label().value().equals(\"VP\")) {\n\t\t\t// testTree.add(subtree);\n\t\t\t// }\n\t\t\t// }\n\t\t\t//\n//\t\t\tString pattern = \"VP < ((/VB.?/ < am|is|are|was|were) $+ (RB < /n['o]t/)) [< NP | < VP]\";// \"\\\\(VP \\\\([am|is|was|were|are]\\\\) .*\\\\)\";//\n//\t\t\tString pat = \"@NP < /NN.?/\";\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \"\\\\(VP \\\\(.* [am|is|are|was|were]\\\\) \\\\(RB n[o’]t\\\\) \\\\(*\\\\)\\\\)\";\n//\t\t\tTregexPattern tgrepPattern = TregexPattern.compile(pattern);\n//\t\t\tTregexMatcher m = tgrepPattern.matcher(parse);\n//\t\t\twhile (m.find()) {\n//\t\t\t\tTree subtree = m.getMatch();\n//\t\t\t\ttestTree.add(subtree);\n//\t\t\t\tSystem.out.println(subtree.toString());\n//\t\t\t}\n\n\t\t\tTregexPatternCompiler tpc = new TregexPatternCompiler();\n\t\t\ttpc.addMacro(\"@VB\", \"/^VB/\");\n\t\t\ttpc.addMacro(\"@Be\", \"am|is|are|was|were\");\n\t\t\ttpc.addMacro(\"@Aux\", \"have|has|had|do|does|did\");\n\t\t\ttpc.addMacro(\"@NEGTerm\", \"(RB < /n['o]t/)\");\n\t\t\ttpc.addMacro(\"@PRN\", \"NP|ADJP|PP|ADVP|SBAR|S\");\n\t\t\ttpc.addMacro(\"@Modal\", \"can|could|may|might|will|would|must|shall|should|ought\");\n\t\t\ttpc.addMacro(\"@Be-Not\", \"(@VB < @Be $+ @NEGTerm)\");\n//\t\t\tTregexPattern test = tpc.compile(\"NP = cnp < DT !$ PP\");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < ((@VB < @Be) $+ @NEGTerm) <@PRN\");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < ((@VB < @Be) $+ @NEGTerm) < @PRN\");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < @VB =vb < @NEGTerm < @PRN =xc \");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < ((MD < @Modal) $+ @NEGTerm) < @PRN\");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < (MD $+ @NEGTerm) < VP \"); //GOOD\n//\t\t\tTregexPattern test = tpc.compile(\"VP < MD=md < VP: =md $+ @NEGTerm \");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < @VB=vb : =vb < @Be : =vb $+ @NEGTerm\");\n//\t\t\tTregexPattern test = tpc.compile(\"VP < @VB=vb < @PRN :(=vb < @Be $+ @NEGTerm)\");\n//\t\t\tTregexPattern test = tpc.compile(\"@VB < @Be $+ @NEGTerm\");\n\n\t\t\tTregexPattern test = tpc.compile(\"VP < ((@VB < @Aux) $+ @NEGTerm) < VP\");\n\t\t\t\n\n\t\t\tTregexMatcher mth = test.matcher(parse);\n\t\t\tif (mth.find()) {\n\t\t\t\tTree subtree = mth.getMatch();\n\t\t\t\ttestTree.add(subtree);\n\t\t\t\tSystem.out.println(\"Ter Compiler: \"+subtree.toString());\n\t\t\t}\n//\t\t\tfor (Tree subTree : testTree) {\n//\t\t\t\tString prdPattern = \"NP\";\n//\t\t\t\t TregexPattern prd = TregexPattern.compile(prdPattern);\n//\t\t\t\t TregexMatcher macher = prd.matcher(subTree);\n//\t\t\t\t if (macher.find()) {\n//\t\t\t\t Tree prdTree = m.getMatch();\n//\t\t\t\t System.out.println(\"PRD pattern: \"+prdTree.toString());\n//\t\t\t\t }\n//\t\t\t}\n\t\t\tSystem.out.println(\"--- Pattern: \" + testTree.toString());\n\t\t\t System.out.println(\"***\" + parse.toString());\n//\t\t\tparse.pennPrint();\n//\t\t\tSystem.out.println(parse.pennString());\n\t\t\tSystem.out.println();\n\n\t\t\tGrammaticalStructure gs = gsf.newGrammaticalStructure(parse);\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tCollection tdl = gs.typedDependenciesCCprocessed();\n\t\t\t System.out.println(\"td1: \"+tdl);\n\t\t\t System.out.println();\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n String[] stringArray0 = new String[2];\n stringArray0[1] = \"\";\n Evaluation.main(stringArray0);\n NaiveBayesMultinomial naiveBayesMultinomial0 = new NaiveBayesMultinomial();\n try { \n Evaluation.evaluateModel((Classifier) naiveBayesMultinomial0, stringArray0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // Weka exception: No training file and no object input file given.\n // \n // General options:\n // \n // -h or -help\n // \\tOutput help information.\n // -synopsis or -info\n // \\tOutput synopsis for classifier (use in conjunction with -h)\n // -t <name of training file>\n // \\tSets training file.\n // -T <name of test file>\n // \\tSets test file. If missing, a cross-validation will be performed\n // \\ton the training data.\n // -c <class index>\n // \\tSets index of class attribute (default: last).\n // -x <number of folds>\n // \\tSets number of folds for cross-validation (default: 10).\n // -no-cv\n // \\tDo not perform any cross validation.\n // -split-percentage <percentage>\n // \\tSets the percentage for the train/test set split, e.g., 66.\n // -preserve-order\n // \\tPreserves the order in the percentage split.\n // -s <random number seed>\n // \\tSets random number seed for cross-validation or percentage split\n // \\t(default: 1).\n // -m <name of file with cost matrix>\n // \\tSets file with cost matrix.\n // -l <name of input file>\n // \\tSets model input file. In case the filename ends with '.xml',\n // \\ta PMML file is loaded or, if that fails, options are loaded\n // \\tfrom the XML file.\n // -d <name of output file>\n // \\tSets model output file. In case the filename ends with '.xml',\n // \\tonly the options are saved to the XML file, not the model.\n // -v\n // \\tOutputs no statistics for training data.\n // -o\n // \\tOutputs statistics only, not the classifier.\n // -i\n // \\tOutputs detailed information-retrieval statistics for each class.\n // -k\n // \\tOutputs information-theoretic statistics.\n // -classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\n // \\tUses the specified class for generating the classification output.\n // \\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\n // -p range\n // \\tOutputs predictions for test instances (or the train instances if\n // \\tno test instances provided and -no-cv is used), along with the \n // \\tattributes in the specified range (and nothing else). \n // \\tUse '-p 0' if no attributes are desired.\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -distribution\n // \\tOutputs the distribution instead of only the prediction\n // \\tin conjunction with the '-p' option (only nominal classes).\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -r\n // \\tOnly outputs cumulative margin distribution.\n // -xml filename | xml-string\n // \\tRetrieves the options from the XML-data instead of the command line.\n // -threshold-file <file>\n // \\tThe file to save the threshold data to.\n // \\tThe format is determined by the extensions, e.g., '.arff' for ARFF \n // \\tformat or '.csv' for CSV.\n // -threshold-label <label>\n // \\tThe class label to determine the threshold data for\n // \\t(default is the first label)\n // \n // Options specific to weka.classifiers.bayes.NaiveBayesMultinomial:\n // \n // -D\n // \\tIf set, classifier is run in debug mode and\n // \\tmay output additional info to the console\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "@Test(timeout = 4000)\n public void test88() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String[] stringArray0 = naiveBayesMultinomialText0.getOptions();\n naiveBayesMultinomialText0.setOptions(stringArray0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(12, stringArray0.length);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseStopList());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertFalse(naiveBayesMultinomialText0.getLowercaseTokens());\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }" ]
[ "0.64486605", "0.63913137", "0.63194466", "0.6187891", "0.61518353", "0.61263955", "0.6043004", "0.59998506", "0.599842", "0.5989644", "0.5986709", "0.5951035", "0.58942086", "0.58690417", "0.5837127", "0.5832657", "0.5831929", "0.5814853", "0.5808449", "0.58067596", "0.5804527", "0.57989895", "0.5796981", "0.57886076", "0.5776009", "0.5773431", "0.5765576", "0.57646173", "0.5750388", "0.5746854", "0.5740199", "0.5730915", "0.57288754", "0.5727416", "0.5724854", "0.57188016", "0.571146", "0.56941164", "0.56937593", "0.56770754", "0.56753564", "0.56718427", "0.5658292", "0.5650787", "0.5648852", "0.5640434", "0.5637251", "0.5632111", "0.56317526", "0.5621906", "0.5606176", "0.56005025", "0.5593243", "0.55907667", "0.5588533", "0.5580203", "0.55796516", "0.5577359", "0.5574282", "0.557263", "0.5571479", "0.5571299", "0.5566697", "0.555667", "0.5555071", "0.5529122", "0.5523732", "0.55207294", "0.55200356", "0.55008847", "0.54979736", "0.54928726", "0.5484834", "0.54828364", "0.5482781", "0.54577094", "0.5448048", "0.5427688", "0.5424878", "0.5407395", "0.5392024", "0.53846174", "0.538287", "0.53770375", "0.53738624", "0.5372454", "0.5371586", "0.53685474", "0.53518134", "0.53359145", "0.53337514", "0.53201526", "0.5319908", "0.5313457", "0.53132427", "0.5312799", "0.53079337", "0.5304112", "0.5299007", "0.5297383" ]
0.6834601
0
Train and test a bidirectional bigram model. Command format: "nlp.lm.BidirectionalBigramModel [DIR] [TestFrac]" where DIR is the name of a file or directory whose LDC POS Tagged files should be used for input data; and TestFrac is the fraction of the sentences in this data that should be used for testing, the rest for training. 0 < TestFrac < 1 Uses the last fraction of the data for testing and the first part for training.
public static void main(String[] args) throws IOException { // All but last arg is a file/directory of LDC tagged input data File[] files = new File[args.length - 1]; for (int i = 0; i < files.length; i++) files[i] = new File(args[i]); // Last arg is the TestFrac double testFraction = Double.valueOf(args[args.length -1]); // Get list of sentences from the LDC POS tagged input files List<List<String>> sentences = POSTaggedFile.convertToTokenLists(files); int numSentences = sentences.size(); // Compute number of test sentences based on TestFrac int numTest = (int)Math.round(numSentences * testFraction); // Take test sentences from end of data List<List<String>> testSentences = sentences.subList(numSentences - numTest, numSentences); // Take training sentences from start of data List<List<String>> trainSentences = sentences.subList(0, numSentences - numTest); System.out.println("# Train Sentences = " + trainSentences.size() + " (# words = " + BigramModel.wordCount(trainSentences) + ") \n# Test Sentences = " + testSentences.size() + " (# words = " + BigramModel.wordCount(testSentences) + ")"); // Create a BidirectionalBigramModel model and train it. BidirectionalBigramModel model = new BidirectionalBigramModel(); System.out.println("Training..."); model.train(trainSentences); // Test on training data using test2 model.test2(trainSentences); System.out.println("Testing..."); // Test on test data using test2 model.test2(testSentences); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testProcessAndLoad() {\n\t\tPreProcessor preProcessor = new PreProcessor();\n\t\tpreProcessor.processFiles(new File(\"res/tests/test1.txt\"));\n\t\tNGramModel actualModel = preProcessor.getNgramModel();\n\t\tactualModel.end();\n\t\t\n\t\tString testFilePath = \"res/bin/test.bin\";\n\t\t\n\t\tFile dir = new File(\"res/bin\");\n\t\tif (!dir.exists()) {\n\t\t\tdir.mkdirs();\n\t\t}\n\t\t\n\t\tpreProcessor.writeToFile(testFilePath);\n\t\t\n\t\tLoader loader = new Loader();\n\t\tNGramModel loadedModel = loader.load(testFilePath);\n\t\tassertEquals(loadedModel.numNgrams(), actualModel.getNgrams().size());\n\t\t\n\t\tfor (Map.Entry<NGram, Integer> current : actualModel.getNgrams().entrySet()) {\n\t\t\tassertEquals((int)current.getValue(), loadedModel.getCount(current.getKey()));\n\t\t}\n\t\t\n\t\tfor (int i = 1; i <= actualModel.maxLength(); i++) {\n\t\t\tassertEquals(loadedModel.numberOfNGramLength(i), actualModel.numberOfNGramLength(i));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < actualModel.topUnigrams().size(); i++) {\n\t\t\tassertEquals(loadedModel.topUnigrams().get(i), actualModel.topUnigrams().get(i));\n\t\t}\n\t\t\n\t\tassertEquals(\n\t\t\tloadedModel.getGoodTuringEstimation().getTotal(),\n\t\t\tactualModel.getGoodTuringEstimation().getTotal());\n\t\t\n\t\tassertEquals(\n\t\t\tloadedModel.getGoodTuringEstimation().getA(),\n\t\t\tactualModel.getGoodTuringEstimation().getA(), 1E-6);\n\t\t\n\t\tassertEquals(\n\t\t\tloadedModel.getGoodTuringEstimation().getB(),\n\t\t\tactualModel.getGoodTuringEstimation().getB(), 1E-6);\n\t}", "public void train (List<List<String>> sentences) {\n // sentence structure: <S>A B C</S>\n bigramModel.train(sentences, bigramModel.start_symbol, bigramModel.end_symbol);\n // sentence structure: </S>C B A<S>\n backwardBigramModel.train(sentences, backwardBigramModel.end_symbol, backwardBigramModel.start_symbol);\n }", "public void generateWithBigramModel (String start) {\n\t\tRandom r = new Random();\n//\t\tList<String> biList = new ArrayList<>();\n//\t\tfor (Map.Entry<String, Integer> entry : this.bi.entrySet()) {\n//\t\t\tif (entry.getKey().startsWith(start)) {\n//\t\t\t\tfor (int i = 0; i < entry.getValue(); i++) {\n//\t\t\t\t\tbiList.add(entry.getKey());\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t\tint maxLen = 200;\n//\t\tstart = biList.get(r.nextInt(biList.size()));\n\t\tStringBuilder sb = new StringBuilder(start);\n\t\tList<String> biList = null;\n\t\twhile (sb.charAt(0) != '$' || maxLen > 0) {\n\t\t\tSystem.out.print(sb.charAt(0));\n\t\t\tsb.deleteCharAt(0);\n\t\t\tbiList = new ArrayList<>();\n\t\t\tfor (Map.Entry<String, Integer> entry : this.tri.entrySet()) {\n\t\t\t\tif (entry.getKey().startsWith(sb.toString())) {\n\t\t\t\t\tfor (int i = 0; i < entry.getValue(); i++) {\n\t\t\t\t\t\tbiList.add(entry.getKey());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (biList.size() > 0) {\n\t\t\t\tsb = new StringBuilder(biList.get(r.nextInt(biList.size())));\n\t\t\t}\n\t\t\t\n\t\t\tmaxLen--;\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void trainModel(List<BugReport> brs){\r\n\t\t\r\n\t\tdouble startTime = System.currentTimeMillis();\r\n\t\tthis.initializeModel(brs);\r\n\t\tthis.inferenceModel(brs);\r\n\t\tdouble endTime = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"LDA training time cost: \"+(endTime-startTime)/1000.0);\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n String trainedFile = args[0];\n String testFile = args[1];\n \n Bagging inital = new Bagging(trainedFile,testFile);\n inital.run();\n }", "public static BigramModel calTransitionProb(BigramModel transitionProb, FilePath pathStr,\n\t\t\tArrayList<ArrayList<String>> tokenList, ArrayList<String> words) throws IOException {\n\t\tFile file = new File(pathStr.getPathStr() + \"train.txt\");\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file), \"euc-kr\"));\n\t\tString train = null;\n\t\tArrayList<String> tokens = null;\n\t\ttokenList = new ArrayList<ArrayList<String>>();\n\t\ttransitionProb = new BigramModel();\n\n\t\twhile ((train = br.readLine()) != null) {\n\t\t\tString lastSignal = \"\";\n\t\t\tif (!train.equals(\"\")) {\n\t\t\t\ttrain = train.split(\"\t\")[1];\n\t\t\t\tint lastIndex = 0;\n\n\t\t\t\tif (train.contains(\"+\")) {\n\t\t\t\t\tif (train.contains(\"++\")) {\n\t\t\t\t\t\ttrain = train.replace(\"++\", \"+더하기기호\");\n\t\t\t\t\t}\n\t\t\t\t\tif (train.contains(\"//\")) {\n\t\t\t\t\t\ttrain = train.replace(\"//\", \"슬래쉬기호/\");\n\t\t\t\t\t}\n\t\t\t\t\tif (train.contains(\"+/SW\")) {\n\t\t\t\t\t\ttrain = train.replace(\"+/SW\", \"더하기기호/SW\");\n\t\t\t\t\t}\n\t\t\t\t\tfor (int i = 0; i < train.split(\"\\\\+\").length; i++) {\n\t\t\t\t\t\tString trainModified = train.split(\"\\\\+\")[i];\n\t\t\t\t\t\tlastIndex = trainModified.lastIndexOf(\"/\");\n\t\t\t\t\t\ttokens.add(trainModified.substring(lastIndex + 1));\n\t\t\t\t\t\tif (trainModified.contains(\"더하기기호\")) {\n\t\t\t\t\t\t\ttrainModified = trainModified.replace(\"더하기기호\", \"+\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (trainModified.contains(\"슬래쉬기호\")) {\n\t\t\t\t\t\t\ttrainModified = trainModified.replace(\"슬래쉬기호\", \"/\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\twords.add(trainModified);\n\t\t\t\t\t}\n\t\t\t\t\tlastSignal = \"/\" + train.split(\"\\\\+\")[train.split(\"\\\\+\").length - 1].substring(lastIndex + 1);\n\t\t\t\t} else {\n\t\t\t\t\tif (train.contains(\"++\")) {\n\t\t\t\t\t\ttrain = train.replace(\"++\", \"+더하기기호\");\n\t\t\t\t\t}\n\t\t\t\t\tif (train.contains(\"//\")) {\n\t\t\t\t\t\ttrain = train.replace(\"//\", \"슬래쉬기호/\");\n\t\t\t\t\t}\n\t\t\t\t\tif (train.contains(\"+/SW\")) {\n\t\t\t\t\t\ttrain = train.replace(\"+/SW\", \"더하기기호/SW\");\n\t\t\t\t\t}\n\t\t\t\t\tlastIndex = train.lastIndexOf(\"/\");\n\t\t\t\t\tlastSignal = \"/\" + train.substring(lastIndex + 1);\n\t\t\t\t\ttokens.add(train.substring(lastIndex + 1));\n\t\t\t\t\tif (train.contains(\"+\")) {\n\t\t\t\t\t\ttrain = train.replace(\"더하기기호\", \"+\");\n\t\t\t\t\t}\n\t\t\t\t\tif (train.contains(\"/\")) {\n\t\t\t\t\t\ttrain = train.replace(\"슬래쉬기호\", \"/\");\n\t\t\t\t\t}\n\t\t\t\t\twords.add(train);\n\t\t\t\t}\n\t\t\t\tif (lastSignal.equals(\"/SF\")) {\n\t\t\t\t\ttokenList.add(tokens);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttokens = new ArrayList<String>();\n\t\t\t}\n\n\t\t}\n\t\ttransitionProb.train(tokenList);\n\t\treturn transitionProb;\n\n\t}", "public static void testNewBBFArchitecture(){\n\t\t\n\t\tString outputDir = \"E:\\\\testing\\\\Java Backbone Fitting\\\\test orientation fix\\\\\";\n\t\tString inputFileName = outputDir+\"Berlin@Berlin_2NDs_B_Square_SW_96-160_201411201541.prejav\";\n\t\t\t\n\t\tExperiment ex = new Experiment(inputFileName);\n\t\t\n\t\t\n\t\tBackboneFitter bbf = new BackboneFitter(ex.getTrackFromInd(50));\n\t\tbbf.fitTrack();\n\t\t\n\t\tBackboneFitter bbfOld = new BackboneFitter();\n\t\t///method no longer exists\n\t\t//bbfOld.fitTrack(ex.getTrackFromInd(50));\n\t\t///\n\t\t\n\t\tSystem.out.println(\"Done\");\n\t}", "public void testMainLBGFS() throws Exception {\n\t\tConrad.main(new String[] {\"train\", \"test/input/zeroOrderLBFGS.xml\", \"test/input/zeroOrderTest.txt\", \"test/working/zeroLBGFSModel.ser\"});\n\t\tConrad.main(new String[] {\"test\", \"test/working/zeroLBGFSModel.ser\", \"test/input/zeroOrderTest.txt\", \"test/working/zeroOrderMainLBGFSPredicted.txt\"});\n\t\tConrad.main(new String[] {\"test\", \"test/working/zeroLBGFSModel.ser\", \"test/input/zeroOrderTest2.txt\", \"test/working/zeroOrder2MainLBGFSPredicted.txt\"});\n\t\tassertFilesMatch(\"test/output/zeroOrder2MainLBGFSPredicted.txt\", \"test/working/zeroOrder2MainLBGFSPredicted.txt\");\n\t}", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.m_leplace = (double) (-1);\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "public void trainBernoulli() {\t\t\n\t\tMap<String, Cluster> trainingDataSet = readFile(trainLabelPath, trainDataPath, \"training\");\n\t\tMap<String, Cluster> testingDataSet = readFile(testLabelPath, testDataPath, \"testing\");\n\n\t\t// do testing, if the predicted class and the gold class is not equal, increment one\n\t\tdouble error = 0;\n\n\t\tdouble documentSize = 0;\n\n\t\tSystem.out.println(\"evaluate the performance\");\n\t\tfor (int testKey = 1; testKey <= 20; testKey++) {\n\t\t\tCluster testingCluster = testingDataSet.get(Integer.toString(testKey));\n\t\t\tSystem.out.println(\"Cluster: \"+testingCluster.toString());\n\n\t\t\tfor (Document document : testingCluster.getDocuments()) {\n\t\t\t\tdocumentSize += 1; \n\t\t\t\tList<Double> classprobability = new ArrayList<Double>();\n\t\t\t\tMap<String, Integer> testDocumentWordCounts = document.getWordCount();\n\n\t\t\t\tfor (int classindex = 1; classindex <= 20; classindex++) {\n\t\t\t\t\t// used for calculating the probability\n\t\t\t\t\tCluster trainCluster = trainingDataSet.get(Integer.toString(classindex));\n\t\t\t\t\t// System.out.println(classindex + \" \" + trainCluster.mClassId);\n\t\t\t\t\tMap<String, Double> bernoulliProbability = trainCluster.bernoulliProbabilities;\n\t\t\t\t\tdouble probability = Math.log(trainCluster.getDocumentSize()/trainDocSize);\n\t\t\t\t\tfor(int index = 1; index <= voc.size(); index++ ){\n\n\t\t\t\t\t\t// judge whether this word is stop word \n\t\t\t\t\t\tboolean isStopwords = englishStopPosition.contains(index);\n\t\t\t\t\t\tif (isStopwords) continue;\n\n\t\t\t\t\t\tboolean contain = testDocumentWordCounts.containsKey(Integer.toString(index));\t\t\t\t\t\t\n\t\t\t\t\t\tif (contain) {\n\t\t\t\t\t\t\tprobability += Math.log(bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprobability += Math.log(1 - bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// put the probability into the map for the specific class\n\t\t\t\t\tclassprobability.add(probability);\n\t\t\t\t}\n\t\t\t\tObject obj = Collections.max(classprobability);\n\t\t\t\t// System.out.println(classprobability);\n\t\t\t\tString predicte_class1 = obj.toString();\n\t\t\t\t// System.out.println(predicte_class1);\n\t\t\t\t// System.out.println(Double.parseDouble(predicte_class1));\n\t\t\t\tint index = classprobability.indexOf(Double.parseDouble(predicte_class1));\n\t\t\t\t// System.out.println(index);\n\t\t\t\tString predicte_class = Integer.toString(index + 1);\n\n\n\t\t\t\tconfusion_matrix[testKey - 1][index] += 1;\n\n\t\t\t\t// System.out.println(document.docId + \": G, \" + testKey + \"; P: \" + predicte_class);\n\t\t\t\tif (!predicte_class.equals(Integer.toString(testKey))) {\n\t\t\t\t\terror += 1;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize);\n\t\t}\n\n\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize + \" precision rate : \" + (1 - error/documentSize));\n\n\t\t// print confusion matrix\n\t\tprintConfusionMatrix(confusion_matrix);\n\t}", "public void train(KDTree test, BufferedReader br, List<double[]> equationList, int kmerToDo, boolean fastatofeature) throws Exception;", "public void buildMultigramModel(String fileName, int n) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t\tString line = null;\n\t\tStringBuilder sb = null;\n\t\tMap<String, Integer> count = new HashMap<>();\n\t\tint totalCount = 0;\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tsb = new StringBuilder();\n//\t\t\tsb.append(terminal); // no \"$\" at the beginning\n\t\t\tfor (char c : line.toCharArray()) {\n\t\t\t\tif (Character.isLetter(c) || c == ' ' || c == ',' || c == '.' || c == '\\'') {\n\t\t\t\t\tif (Character.isLowerCase(c)) {\n\t\t\t\t\t\tc = (char) (c + 'A' - 'a');\n\t\t\t\t\t}\n\t\t\t\t\tsb.append(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(terminal);\n\t\t\t// sb is established and preprocessed: \"hello, this is a sentence.$\"\n\t\t\t\n\t\t\twhile (sb.length() >= n) { // n == 2 if it is a bigram model\n\t\t\t\tString crt = sb.substring(0, n); // the first n characters\n\t\t\t\tif (count.containsKey(crt)) {\n\t\t\t\t\tcount.put(crt, count.get(crt) + 1);\n\t\t\t\t\ttotalCount++;\n\t\t\t\t}else {\n\t\t\t\t\tcount.put(crt, 1);\n\t\t\t\t}\n\t\t\t\tsb.deleteCharAt(0);\n\t\t\t}\n\t\t}\n\t\tif (n == 2) {\n\t\t\tbi = new HashMap<>(count);\n\t\t\tlm.putAll(bi);\n\t\t\tthis.sizeOfBiword = totalCount;\n\t\t} else if (n == 3) {\n\t\t\ttri = new HashMap<>(count);\n\t\t\tlm.putAll(tri);\n\t\t\tthis.sizeOfTriword = totalCount;\n\t\t}\n//\t\tSystem.out.println(\"File \" + fileName + \"\\'s \" + n + \"-gram model is ready.\");\n\t\treader.close();\n\t}", "public void train()\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n System.out.println(\"Start Training ..\");\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Training Text %..\");\n\t\t\ttrainText();\n\n\t\t\tSystem.out.println(\"Training Complex %..\");\n\t\t\ttrainCombined();\n\n\t\t\tSystem.out.println(\"Training Feature %..\");\n\t\t\ttrainFeatures();\n\n\t\t\tSystem.out.println(\"Training Lexicon %..\");\n\t\t\t//trainLexicon();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void main(String[] args) {\n String dataset = args[1];\n if(args[0].equals(\"nb\")) {\n if (args.length > 2) {\n boolean cf = Boolean.parseBoolean(args[2]);\n int ngram = Integer.parseInt(args[3]);\n if(dataset.equals(\"small\"))\n naiveBayes(cf, ngram);\n else {\n indexFileRead_TREC(cf, ngram);\n //testNewNaiveBayes(cf, ngram);\n //naiveBayesClassifier(cf, ngram);\n }\n\n }else {\n if(dataset.equals(\"small\"))\n naiveBayes(false, 0);\n else {\n indexFileRead_TREC(false, 0);\n //testNewNaiveBayes(false, 0);\n //naiveBayesClassifier(false, 0);\n }\n }\n }else if(args[0].equals(\"svm\")) {\n if (args.length > 2) {\n boolean rp = Boolean.parseBoolean(args[2]);\n int size = Integer.parseInt(args[3]);\n svm_test(rp, size);\n } else\n svm_test(false, 0);\n }\n //indexFileRead_LBJ();\n\t}", "public void testNBChunkLearnng() throws IOException, GateException {\n // Initialisation\n System.out.print(\"Testing the Naive Bayes method on chunk learning...\");\n File chunklearningHome = new File(new File(learningHome, \"test\"),\n \"chunklearning\");\n String configFileURL = new File(chunklearningHome,\n \"engines-naivebayesweka.xml\").getAbsolutePath();\n String corpusDirName = new File(chunklearningHome, \"data-ontonews\")\n .getAbsolutePath();\n //Remove the label list file, feature list file and chunk length files.\n String wdResults = new File(chunklearningHome,\n ConstantParameters.SUBDIRFORRESULTS).getAbsolutePath();\n emptySavedFiles(wdResults);\n String inputASN = \"Key\";\n loadSettings(configFileURL, corpusDirName, inputASN, inputASN);\n // Set the evaluation mode\n RunMode runM=RunMode.EVALUATION;\n learningApi.setLearningMode(runM);\n controller.execute();\n // Using the evaluation mode for testing\n EvaluationBasedOnDocs evaluation = learningApi.getEvaluation();\n // Compare the overall results with the correct numbers\n /*assertEquals(evaluation.macroMeasuresOfResults.correct, 3);\n assertEquals(evaluation.macroMeasuresOfResults.partialCor, 1);\n assertEquals(evaluation.macroMeasuresOfResults.spurious, 19);\n assertEquals(evaluation.macroMeasuresOfResults.missing, 68);*/\n assertEquals(\"Wrong value for correct: \", 27, (int)Math.floor(evaluation.macroMeasuresOfResults.correct));\n assertEquals(\"Wrong value for partial: \", 3, (int)Math.floor(evaluation.macroMeasuresOfResults.partialCor));\n assertEquals(\"Wrong value for spurious: \", 26, (int)Math.floor(evaluation.macroMeasuresOfResults.spurious));\n assertEquals(\"Wrong value for missing: \", 42, (int)Math.floor(evaluation.macroMeasuresOfResults.missing));\n // Remove the resources\n clearOneTest();\n System.out.println(\"completed\");\n }", "@Test\n @Tag(\"bm1000\")\n public void testBRANDY() {\n CuteNetlibCase.doTest(\"BRANDY.SIF\", \"1518.509896488128\", null, NumberContext.of(7, 4));\n }", "public void testMainLBGFSCached() throws Exception {\n\t\tConrad.main(new String[] {\"train\", \"test/input/zeroOrderLBFGSCached.xml\", \"test/input/zeroOrderTest.txt\", \"test/working/zeroLBGFSModelCached.ser\"});\n\t\tConrad.main(new String[] {\"test\", \"test/working/zeroLBGFSModelCached.ser\", \"test/input/zeroOrderTest.txt\", \"test/working/zeroOrderMainLBGFSCachedPredicted.txt\"});\n\t\tConrad.main(new String[] {\"test\", \"test/working/zeroLBGFSModelCached.ser\", \"test/input/zeroOrderTest2.txt\", \"test/working/zeroOrder2MainLBGFSCachedPredicted.txt\"});\n\t\tassertFilesMatch(\"test/output/zeroOrder2MainLBGFSPredicted.txt\", \"test/working/zeroOrder2MainLBGFSCachedPredicted.txt\");\n\t}", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testBNL1() {\n CuteNetlibCase.doTest(\"BNL1.SIF\", \"1977.629561522682\", \"1977.629561522682\", NumberContext.of(7, 4));\n }", "public static void main(String[] args) {\n\n\t\tlong startTime = System.currentTimeMillis();\n\n\t\t//NaiveBayesParam nb = new NaiveBayesParam(\"data/split1.arff\",\"data/split1_test.arff\");\n\t\t//NaiveBayesParam nb = new NaiveBayesParam(\"/media/F/Acads/iitb/mtp/naivebayesdataset/bronchiolitis/br-processed.arff\",\"\" +\n\t\t//\t\t\"/media/F/Acads/iitb/mtp/naivebayesdataset/bronchiolitis/br-processed.arff\");\n\t\t//NaiveBayesParam nb = new NaiveBayesParam(\"/media/F/Acads/iitb/mtp/naivebayesdataset/01/sylva_agnostic_valid.arff\",\"\" +\n\t\t//\t\t\"/media/F/Acads/iitb/mtp/naivebayesdataset/01/sylva_agnostic_valid.arff\");\n\n\t\t// NaiveBayesParam nb = new NaiveBayesParam(\"data/split1lac.arff\",\n\t\t// \"data/split1lacTest.arff\");\n\t\t//NaiveBayesParam nb = new NaiveBayesParam(\"data/split1b.arff\", \"data/split1bTest.arff\");\n\t\t// NaiveBayesParam nb = new NaiveBayesPFaram(\"data/split1lac.arff\",\n\t\t// \"data/split1bTest.arff\");\n\t\t//NaiveBayesParam nb = new NaiveBayesParam(\"data/split1lac.arff\",\"data/split1hTest.arff\");\n\t\t\n\t\t\n\t\tNaiveBayesParam nb = new NaiveBayesParam(\"/media/F/Acads/iitb/mtp/QuickHeal/data/split1per1.arff\", \"/media/F/Acads/iitb/mtp/QuickHeal/data/split1.arff\");\n\t\t\t\t\n\t\tInputData initialData = nb.calcInitialState();\n\t\ttry {\n\t\t\tinitialData.serialize(\"/home/agam/nb.dat\");\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t/*nb.calcNewState(nb.param);\n\n\n\t\ttry {\n\t\t\tdouble dist1[][] = nb.distributionForInstances(nb.trainInstances);\n\t\t\tdouble dist2[][] = nb.distributionForInstances(nb.testInstances);\n\t\t\t\n\t\t\tint countFN=0;\n\t\t\tint countFP=0;\n\t\t\tSystem.out.println(\"1.# prob0 - prob1 - actual - pred\");\n\t\t\tfor (int i = 0; i < nb.trainInstances.numInstances(); i++)\n\t\t\t{\n\t\t\t\tdouble pred;\n\t\t\t\tdouble actual = nb.trainInstances.instance(i).classValue();\n\t\t\t\t//System.out.print(\"actual=\"+actual);\n\t\t\t\tif(dist1[i][0] >= dist1[i][1])\n\t\t\t\t\tpred=0d;\n\t\t\t\telse\n\t\t\t\t\tpred=1d;\n\t\t //if (pred != actual)\n\t\t if (!(pred > actual-0.1d && pred < actual + 0.1d))\n\t\t {\n//\t\t \tif(pred == 1)\n\t\t \tif(pred > 0.9d && pred < 1.1d)\n\t\t \t\tcountFP++;\n\t\t \telse\n\t\t \t\tcountFN++;\n\t\t }\n\t\t\t}\n\t\t\tSystem.out.println(\"countFP=\"+countFP);\n\t\t\tSystem.out.println(\"%FP=\"+countFP*200.0/nb.trainInstances.numInstances());\n\t\t\tSystem.out.println(\"countFN=\"+countFN);\n\t\t\tSystem.out.println(\"%FN=\"+countFN*200.0/nb.trainInstances.numInstances());\n\t\t\t\n\t\t\tcountFN=0;\n\t\t\tcountFP=0;\n\t\t\tSystem.out.println(\"2.# prob0 - prob1 - actual - pred\");\n\t\t\tfor (int i = 0; i < nb.testInstances.numInstances(); i++)\n\t\t\t{\n\t\t\t\tdouble pred;\n\t\t\t\tdouble actual = nb.testInstances.instance(i).classValue();\n\t\t\t\tif(dist2[i][0] >= dist2[i][1])\n\t\t\t\t\tpred=0d;\n\t\t\t\telse\n\t\t\t\t\tpred=1d;\n//\t\t if (pred != actual)\n\t\t if (!(pred > actual-0.1d && pred < actual + 0.1d))\n\t\t {\n\t\t \tif(pred > 0.9d && pred < 1.1d)\n//\t\t \tif(pred == 1)\n\t\t \t\tcountFP++;\n\t\t \telse\n\t\t \t\tcountFN++;\n\t\t }\n\t\t System.out.println(\"2.#\"+dist2[i][0]+\" \"+dist2[i][1]+\" \" +actual+\" \"+pred);\n\t\t\t}\n\t\t\tSystem.out.println(\"countFP=\"+countFP);\n\t\t\tSystem.out.println(\"%FP=\"+countFP*100.0/nb.testInstances.numInstances());\n\t\t\tSystem.out.println(\"countFN=\"+countFN);\n\t\t\tSystem.out.println(\"%FN=\"+countFN*100.0/nb.testInstances.numInstances());\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/*\t\t\n\t\tdouble jac[][]=nb.calcJacobian(nb.trainInstances.instance(0));\n\n\t\tfor(int i=0;i<nb.trainInstances.numClasses();i++)\n\t\t{\n\t\t\tfor(int j=0;j<4*nb.trainInstances.numAttributes()-4+nb.trainInstances.numClasses();j++)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"jac[\"+i+\"]=[\"+j+\"]=\"+jac[i][j]);\n\t\t\t}\n\t\t}\n*/\t\t\n\t\tlong endTime = System.currentTimeMillis();\n\t\tlong totalTime = endTime - startTime;\n\t\tSystem.out.println(totalTime + \" milliseconds\");\n\t}", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n \n naiveBayesMultinomialText0.m_norm = 715.85816;\n MultiClassClassifierUpdateable multiClassClassifierUpdateable0 = new MultiClassClassifierUpdateable();\n Capabilities capabilities0 = multiClassClassifierUpdateable0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "public void testLBFGS() throws Exception {\n\t\tList<? extends TrainingSequence<?>> data = IntInput.prepareData(\"001111\\n001111\\n001111\\n001111\\n001111\\n001111\\n001111\\n001111\\n\");\n\t\tModelManager m = new TestFeatureManager(1);\n\n\t\tStandardOptimizer opt = new StandardOptimizer();\n\t\topt.setStarts(new double[] {0.1});\n\t\topt.setEpsForConvergence(0.001);\n\t\topt.setObjectiveFunction(new MaximumLikelihoodGradient());\n\t\tdouble[] weights = opt.optimize(m, data);\n\t\tassertEquals(2.0, weights[0], 0.01);\n\t}", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testBNL2() {\n CuteNetlibCase.doTest(\"BNL2.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n PrecomputedKernelMatrixKernel precomputedKernelMatrixKernel0 = new PrecomputedKernelMatrixKernel();\n File file0 = precomputedKernelMatrixKernel0.getKernelMatrixFile();\n naiveBayesMultinomialText0.setStopwords(file0);\n File file1 = naiveBayesMultinomialText0.getStopwords();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertFalse(file1.exists());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseStopList());\n }", "public static void main(String[] args) {\n\t\tSparkConf conf = new SparkConf().setAppName(\"NB\").setMaster(\"local[*]\").set(\"spark.ui.port\",\"4040\");;\n\t JavaSparkContext jsc = new JavaSparkContext(conf);\n\t\tString path = \"localpath\";\n\t\tJavaRDD<LabeledPoint> inputData = MLUtils.loadLabeledPoints(jsc.sc(), path).toJavaRDD();\n\t\tJavaRDD<LabeledPoint>[] tmp = inputData.randomSplit(new double[]{0.6, 0.4});\n\t\tJavaRDD<LabeledPoint> training = tmp[0]; // training set\n\t\tJavaRDD<LabeledPoint> test = tmp[1]; // test set\n\t\tNaiveBayesModel model = NaiveBayes.train(training.rdd(), 1.0);\n\t\tJavaPairRDD<Double, Double> predictionAndLabel =\n\t\t test.mapToPair(p -> new Tuple2<>(model.predict(p.features()), p.label()));\n\t\t// Save and load model\n\t\tmodel.save(jsc.sc(), \"localotuput_path\");\n\t\tNaiveBayesModel sameModel = NaiveBayesModel.load(jsc.sc(), \"localotuput_path\");\n\t\t\n\t\tdouble accuracy =\n\t\t\t\t predictionAndLabel.filter(pl -> pl._1().equals(pl._2())).count() / (double) test.count();\n\t\t\t\t\n\t\tSystem.out.println(\"The final accuracy is\"+accuracy);\n//\t\tpredictionAndLabel.foreach(data -> {\n//\t\t System.out.println(\"final model=\"+data._1() + \"final label=\" + data._2());\n//\t\t}); \n\t}", "@Test(timeout = 4000)\n public void test82() throws Throwable {\n NaiveBayesMultinomialText.main((String[]) null);\n }", "@Override\n\tpublic void run() {\n\t\tfileName = \"out_\" + Program.getProgram().getFileName() + \"_\";\n\t\tint numAddStop = 0;\n\t\t//fileName = \"out_themida_\";\n\n\t\t//fileState.clearContentFile();\n\t\t//bkFile.clearContentFile();\n\t\toverallStartTime = System.currentTimeMillis();\n\t\tlong overallStartTemp = overallStartTime;\n\t\t// BE-PUM algorithm\n\t\tSystem.out.println(\"Starting On-the-fly Model Generation algorithm.\");\n\t\tprogram.getResultFileTemp().appendInLine('\\n' + program.getFileName() + '\\t');\n\t\t\n\t\t// Set up initial context\n\t\tX86TransitionRule rule = new X86TransitionRule();\n\t\tBPCFG cfg = Program.getProgram().getBPCFG();\n\t\tEnvironment env = new Environment();\n\t\t//env.getMemory().resetImportTable(program);\n\t\tAbsoluteAddress location = Program.getProgram().getEntryPoint();\n\t\tInstruction inst = Program.getProgram().getInstruction(location, env);\n\t\tList<BPPath> pathList = new ArrayList<BPPath>();\n\t\t\n\t\t// Insert start node\n\t\tBPVertex startNode = null;\n\t\tstartNode = new BPVertex(location, inst);\n\t\tstartNode.setType(0);\n\t\tcfg.insertVertex(startNode);\n\n\t\tBPState curState = null;\n\t\tBPPath path = null;\n\t\tcurState = new BPState(env, location, inst);\n\t\tpath = new BPPath(curState, new PathList(), new Formulas());\n\t\tpath.setCurrentState(curState);\n\t\tpathList.add(path);\n\n\t\t/*if (Program.getProgram().getFileName().equals(\"api_test_v2.3_lvl1.exe\") \n\t\t\t\t&& isRestored) {\n\t\t\tSystem.out.println(\"Restore State from File.\");\n\t\t\tFileProcess reFile = new FileProcess(\"data/data/restoreState.txt\");\n\t\t\tpathList = restoreState(reFile);\n\t\t\t// bkFile.clearContentFile();\n\t\t\tSystem.out.println(\"Finished restoring state!\");\n\t\t}*/\n\n\t\t// Update at first -----------------------------\n\t\tTIB.setBeUpdated(true);\n\t\tTIB.updateTIB(curState);\n\t\t// ---------------------------------------------\n\n\t\t// PHONG - 20150801 /////////////////////////////\n\t\t// Packer Detection via Header\n\t\tSystem.out.println(\"================PACKER DETECTION VIA HEADER ======================\");\n\t\tif (OTFModelGeneration.detectPacker)\n\t\t{\n\t\t\tprogram.getDetection().detectViaHeader(program);\n\t\t\tprogram.getDetection().setToLogFirst(program);\n\t\t}\n\t\tSystem.out.println(\"==================================================================\");\n\t\t/////////////////////////////////////////////////\n\t\t\n\t\tsynchronized (OTFThreadManager.getInstance()) {\n\t\t\ttry {\n\t\t\t\tOTFThreadManager.getInstance().check(this, pathList);\n\t\t\t\tOTFThreadManager.getInstance().wait();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t// PHONG - 20150724\n\t\tSystem.out.println(\"================PACKER DETECTION VIA OTF======================\");\n\t\tprogram.getDetection().packedByTechniques();\n\t\tprogram.getDetection().packedByTechniquesFrequency();\n\t\tSystem.out.println(\"==============================================================\");\n\t}", "public NaiveBayes(FileProcessor file, Boolean test) {\t\r\n\t\tfile.getData(dataEntries);\r\n\t\tif (test == false) { findFrequency(dataEntries.size());}\t\r\n\t\telse {\r\n\t\t\tdouble split = ((float)dataEntries.size()/(float)100)*70;\r\n\t\t\tfindFrequency((int)split); \r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n \n naiveBayesMultinomialText0.setNorm(0.0);\n double double0 = naiveBayesMultinomialText0.getNorm();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void testPerformReverseStep_reverseThenAltAtInit() throws IOException {\n initializeTestWithModelPath(\"models/even_odd.als\");\n String dotString1 = String.join(\"\\n\",\n \"digraph graphname {\",\n \"\\tS1 -> S2\",\n \"\\tS2 -> S3\",\n \"\\tS3\",\n \"}\",\n \"\"\n );\n String dotString2 = String.join(\"\\n\",\n \"digraph graphname {\",\n \"\\tS1 -> S2\",\n \"\\tS2 -> S3\",\n \"\\tS3\",\n \"\\tS4\",\n \"}\",\n \"\"\n );\n String dotString3 = String.join(\"\\n\",\n \"digraph graphname {\",\n \"\\tS1 -> S2\",\n \"\\tS2 -> S3\",\n \"\\tS3\",\n \"\\tS4 -> S5\",\n \"\\tS5\",\n \"}\",\n \"\"\n );\n String state1 = String.join(\"\\n\",\n \"\",\n \"S1\",\n \"----\",\n \"i: { 0 }\",\n \"\"\n );\n String state2 = String.join(\"\\n\",\n \"\",\n \"S4\",\n \"----\",\n \"i: { 1 }\",\n \"\"\n );\n String state3 = String.join(\"\\n\",\n \"\",\n \"S5\",\n \"----\",\n \"i: { 3 }\",\n \"\"\n );\n String history = String.join(\"\\n\",\n \"\",\n \"S4 (-1)\",\n \"---------\",\n \"i: { 1 }\",\n \"\"\n );\n\n assertTrue(sm.initialize(modelFile, false));\n assertTrue(sm.performStep(2));\n sm.performReverseStep(2);\n assertEquals(state1, sm.getCurrentStateString());\n assertEquals(\"\", sm.getHistory(3));\n assertEquals(dotString1, sm.getDOTString());\n\n assertTrue(sm.selectAlternatePath(false));\n assertEquals(state2, sm.getCurrentStateString());\n assertEquals(\"\", sm.getHistory(3));\n assertEquals(dotString2, sm.getDOTString());\n\n assertTrue(sm.performStep(1));\n assertEquals(state3, sm.getCurrentStateString());\n assertEquals(history, sm.getHistory(3));\n assertEquals(dotString3, sm.getDOTString());\n }", "public final void lb() throws RecognitionException {\n JCBasicBlock lbb =null;\n\n\n try {\n // C:\\\\Users\\\\Cavicchio\\\\workspace\\\\InterDepAdjStructure\\\\newgrammar\\\\JCB_tree.g:261:4: (lbb= bb (rb= lb )? )\n // C:\\\\Users\\\\Cavicchio\\\\workspace\\\\InterDepAdjStructure\\\\newgrammar\\\\JCB_tree.g:261:6: lbb= bb (rb= lb )?\n {\n pushFollow(FOLLOW_bb_in_lb271);\n lbb=bb();\n\n state._fsp--;\n\n\n\n if (displayProductions == true)\n {\n System.out.println(\"Production: lb: lbb=bb\");\n }\n problem.addBasicBlockToLinearSection(lbb);\n\n\n // C:\\\\Users\\\\Cavicchio\\\\workspace\\\\InterDepAdjStructure\\\\newgrammar\\\\JCB_tree.g:270:2: (rb= lb )?\n int alt9=2;\n int LA9_0 = input.LA(1);\n\n if ( (LA9_0==OPEN_PARENTHESIS) ) {\n alt9=1;\n }\n switch (alt9) {\n case 1 :\n // C:\\\\Users\\\\Cavicchio\\\\workspace\\\\InterDepAdjStructure\\\\newgrammar\\\\JCB_tree.g:270:2: rb= lb\n {\n pushFollow(FOLLOW_lb_in_lb279);\n lb();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n\n\n if (displayProductions == true)\n {\n System.out.println(\"Production: lb: (rb=lb)?\");\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return ;\n }", "public NaiveBayes(String trainset_directory){\r\n\t\t// Build the Naive Classifier\r\n\t\t// Using all the characters in the training data, build a Naive Bayes \r\n\t\t// classifier for the three languages. Implement the classifier using \r\n\t\t// a log-likelihood formulation of Naive Bayes.\r\n\t\t\r\n\t\tFile englishDir = new File(trainset_directory + \"/English\");\r\n\t\tFile japaneseDir = new File(trainset_directory + \"/Japanese\");\r\n\t\tFile spanishDir = new File(trainset_directory + \"/Spanish\");\r\n\r\n\t\t/* COMPUTING PRIOR PROBABILITIES */\r\n\t\t// Count the number of English documents in the training set:\r\n\t\tfloat nEnglish = englishDir.listFiles().length;\r\n\t\t\r\n\t\t// Count the number of Spanish documents in the training set:\r\n\t\tfloat nSpanish = spanishDir.listFiles().length;\r\n\t\t\r\n\t\t// Count the number of Japanese documents in the training set:\r\n\t\tfloat nJapanese = japaneseDir.listFiles().length;\r\n\t\t\r\n\t\t// Compute the total number of training documents:\r\n\t\tfloat nTotal = nEnglish + nSpanish + nJapanese;\r\n\t\t\r\n\t\t// Compute the prior probability for English:\r\n\t\tp_english = nEnglish / nTotal;\r\n\t\t// Compute the prior probability for Spanish:\r\n\t\tp_spanish = nSpanish / nTotal;\r\n\t\t// Compute the prior probability for Japanese:\r\n\t\tp_japanese = nJapanese / nTotal;\r\n\r\n\t\t/* COMPUTING CONDITIONAL LIKELIHOODS */\r\n\t\t// ENGLISH\r\n\t\tfillConditionalProb(englishConditional, englishDir);\r\n\t\t// SPANISH\r\n\t\tfillConditionalProb(spanishConditional, spanishDir);\r\n\t\t// JAPANESE\r\n\t\tfillConditionalProb(japaneseConditional, japaneseDir);\r\n\t\t\r\n\t\t/* FROM PROBABILITIES TO LOG PROBABILITIES */\r\n\t\t// Convert all probabilities to log probabilities to avoid underflow \r\n\t\t// problems. Use the natural logarithm (log(x) in Java). Apply the log \r\n\t\t// function to all probabilities\r\n\t}", "@Test\n\tpublic void testGenerate() throws UnsupportedEncodingException {\n\t\tfinal MarkovChainLanguageModel model = new MarkovChainLanguageModel();\n\t\tmodel.train(Locale.ENGLISH, \"This is an english sentence\", \"UTF-8\");\n\t}", "private void readModelAndTrain(boolean readExistingModel,\n\t\t\tbyte[] trainingDataFile) {\n\t\tInputStream dataIn = null;\n\t\ttry {\n\t\t\tObjectStream<DocumentSample> sampleStream = new DocumentSampleStream(\n\t\t\t\t\tnew PlainTextByLineStream(new FileInputStream(\n\t\t\t\t\t\t\tcreateModelInput(INPUT_TWEETS_ORIG_TXT)), \"UTF-8\"));\n\t\t\tsetModel(DocumentCategorizerME.train(\"en\", sampleStream,\n\t\t\t\t\tCUTOFF_FREQ, TRAINING_ITERATIONS));\n\t\t\tserialize(model);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (dataIn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tdataIn.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "@Test(timeout = 4000)\n public void test88() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String[] stringArray0 = naiveBayesMultinomialText0.getOptions();\n naiveBayesMultinomialText0.setOptions(stringArray0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(12, stringArray0.length);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseStopList());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertFalse(naiveBayesMultinomialText0.getLowercaseTokens());\n }", "@Test(timeout = 4000)\n public void test65() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.m_useStopList = true;\n Capabilities capabilities0 = naiveBayesMultinomialText0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(\"The independent probability of a class\\n--------------------------------------\\nclass1\\t6.0\\nclass2\\t6.0\\nclass3\\t6.0\\nclass4\\t6.0\\n\\nThe probability of a word given the class\\n-----------------------------------------\\n\\tclass1\\tclass2\\tclass3\\tclass4\\t\\nover\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nthe\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nThe\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nquick\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nlazy\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\njumps\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nbrown\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t\\ndog\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nfox\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\n\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "public static void main(String[] args) {\n String pathToTrain = \"train.csv\";\n String pathToTest = \"test.csv\";\n try {\n ArrayList<String> trainSentences = readCSV(pathToTrain);\n trainSentences.remove(0);\n ArrayList<String> testSentences = readCSV(pathToTest);\n testSentences.remove(0);\n\n ArrayList<String[]> trainWords = preprocess(trainSentences);\n NaiveBayesClassifier model = new NaiveBayesClassifier();\n model.fit(trainWords);\n\n ArrayList<String[]> testWords = preprocess(testSentences);\n double accuracy = evaluate(testWords, model);\n model.writeParams(\"params.json\");\n System.out.printf(\"Accuracy of the model is: %.4f%n\", accuracy);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testPerformReverseStep_altThenReverseToInit() throws IOException {\n initializeTestWithModelPath(\"models/even_odd.als\");\n String dotString1 = String.join(\"\\n\",\n \"digraph graphname {\",\n \"\\tS1\",\n \"\\tS2 -> S3\",\n \"\\tS3 -> S4\",\n \"\\tS4\",\n \"}\",\n \"\"\n );\n String dotString2 = String.join(\"\\n\",\n \"digraph graphname {\",\n \"\\tS1\",\n \"\\tS2 -> S3\",\n \"\\tS3 -> S4\",\n \"\\tS4 -> S5\",\n \"\\tS5\",\n \"}\",\n \"\"\n );\n String state1 = String.join(\"\\n\",\n \"\",\n \"S2\",\n \"----\",\n \"i: { 1 }\",\n \"\"\n );\n String state2 = String.join(\"\\n\",\n \"\",\n \"S5\",\n \"----\",\n \"i: { 7 }\",\n \"\"\n );\n String history = String.join(\"\\n\",\n \"\",\n \"S2 (-3)\",\n \"---------\",\n \"i: { 1 }\",\n \"\",\n \"S3 (-2)\",\n \"---------\",\n \"i: { 3 }\",\n \"\",\n \"S4 (-1)\",\n \"---------\",\n \"i: { 5 }\",\n \"\"\n );\n\n assertTrue(sm.initialize(modelFile, false));\n assertTrue(sm.selectAlternatePath(false));\n assertTrue(sm.performStep(2));\n sm.performReverseStep(2);\n assertEquals(state1, sm.getCurrentStateString());\n assertEquals(\"\", sm.getHistory(3));\n assertEquals(dotString1, sm.getDOTString());\n\n assertTrue(sm.performStep(3));\n assertEquals(state2, sm.getCurrentStateString());\n assertEquals(history, sm.getHistory(4));\n assertEquals(dotString2, sm.getDOTString());\n }", "public static void main(String[] args) {\n\n try ( LLModel gptjModel = new LLModel(Path.of(\"C:\\\\Users\\\\felix\\\\AppData\\\\Local\\\\nomic.ai\\\\GPT4All\\\\ggml-gpt4all-j-v1.3-groovy.bin\")) ){\n\n LLModel.GenerationConfig config = LLModel.config()\n .withNPredict(4096).build();\n\n // String result = gptjModel.generate(prompt, config, true);\n gptjModel.chatCompletion(\n List.of(Map.of(\"role\", \"system\", \"content\", \"You are a helpful assistant\"),\n Map.of(\"role\", \"user\", \"content\", \"Add 2+2\")), config, true, true);\n\n\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.m_useStopList = true;\n boolean boolean0 = naiveBayesMultinomialText0.getUseStopList();\n assertTrue(boolean0);\n }", "@Test(timeout = 4000)\n public void test78() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.globalInfo();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(\"Multinomial naive bayes for text data. Operates directly (and only) on String attributes. Other types of input attributes are accepted but ignored during training and classification\", string0);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test\r\n\tpublic void testVerbFolderParsing() throws FileNotFoundException, IOException{\n\t\tFile inputFile = new File(\"output/100verbs\");\r\n\t\tFile outputFile = new File(\"output/100verbsParsed\");\r\n\t\t\t\t\t\t\r\n\t\tString mtModel = \"models/ger-tagger+lemmatizer+morphology+graph-based-3.6/morphology-ger-3.6.model\";\r\n\t\tString pModel = \"models/ger-tagger+lemmatizer+morphology+graph-based-3.6/parser-ger-3.6.model\";\r\n\t\tDewacDataParser dp = new DewacDataParser();\r\n\t\t\r\n\t\tdp.initialize(mtModel, pModel);\t\t\r\n\t\tdp.parseToFolder(inputFile, outputFile,1000);\r\n\t}", "private static void bellmanfordTest() {\n\t\t\n\t\tgraphs.objectorientedgraph.Graph<Integer> graph = new graphs.objectorientedgraph.Graph<Integer>();\n\t\t\n\t\tfor (int i = 0; i < 6; i++)\n\t\t\tgraph.addVertex(i, i);\n\t\t\n\t\tgraph.addDirectedEdge(0, 1, 0);\n\t\tgraph.addDirectedEdge(0, 2, 0);\n\t\tgraph.addDirectedEdge(0, 3, 0);\n\t\tgraph.addDirectedEdge(0, 4, 0);\n\t\tgraph.addDirectedEdge(0, 5, 0);\n\t\tgraph.addDirectedEdge(5, 1, -1);\n\t\tgraph.addDirectedEdge(5, 2, 1);\n\t\tgraph.addDirectedEdge(1, 4, 4);\n\t\tgraph.addDirectedEdge(1, 3, 5);\n\t\tgraph.addDirectedEdge(2, 1, 0);\n\t\tgraph.addDirectedEdge(3, 5, -3);\n\t\tgraph.addDirectedEdge(3, 4, -1);\n\t\tgraph.addDirectedEdge(4, 5, -3);\n\t\t\n\t\tBellmanFordAlgo<Integer> bellnBellmanFordAlgo = new BellmanFordAlgo(graph ,graph.vertexList.get(0));\n\t\t\n\t\tbellnBellmanFordAlgo.getSingleSourceShortestPath();\n\t\t\n\t\tbellnBellmanFordAlgo.printPath(graph.vertexList.get(3));\n\t\t\n\t}", "public static void main (String [] args) throws Exception { \n//\t\tconf.setMapperClass(DadaMapper.class);\n//\t\tconf.setReducerClass(DataReducer.class);\n\t\t\n//\t\tConfiguration conf = new Configuration(); \n//\t\tconf.set(\"fs.default.name\", \"hdfs://zli:9000\"); \n//\t\tconf.set(\"hadoop.job.user\", \"hadoop\"); \t\t \n//\t\tconf.set(\"mapred.job.tracker\", \"zli:9001\");\n\t\t\n\t\tJob job = new Job(); \n\t\tjob.setJarByClass(NBModelTestJob.class);\n\t\tjob.getConfiguration().set(\"fs.defaultFS\", \"hdfs://NYSJHL101-142.opi.com:8020\"); \n\t\tjob.getConfiguration().set(\"hadoop.job.user\", \"hdfs\"); \t\t \n\t\tjob.getConfiguration().set(\"mapred.job.tracker\", \"NYSJHL101-144.opi.com:8021\");\n\t\tjob.getConfiguration().set(\"trainpath\", args[0]);\n\t\tFileInputFormat.addInputPath(job, new Path(args[1]));\n\t\tFileOutputFormat.setOutputPath(job, new Path(args[2]));\n\t\tFileSystem hdfs = FileSystem.get(job.getConfiguration());\n\t\t\t\t\n\t\tjob.setMapperClass(DataMapper.class);\n\t\tjob.setReducerClass(DataReducer.class);\n\t\tjob.setCombinerClass(DataCombiner.class);\n\t\tjob.setOutputKeyClass(Text.class);\n\t\tjob.setOutputValueClass(Text.class);\n\t\tjob.setNumReduceTasks(10);\n\t\t\n\t\tSystem.exit(job.waitForCompletion(true) ? 0 : 1);\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test48() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n double double0 = naiveBayesMultinomialText0.getNorm();\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, double0, 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n }", "IndependentMultiLabelModel(List<Label> labels, List<Model<Label>> models, ModelProvenance description, ImmutableFeatureMap featureMap, ImmutableOutputInfo<MultiLabel> labelInfo) {\n super(\"binary-relevance\", description, featureMap, labelInfo, models.get(0).generatesProbabilities());\n this.labels = labels;\n this.models = models;\n }", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n String[] stringArray0 = new String[2];\n stringArray0[1] = \"\";\n Evaluation.main(stringArray0);\n NaiveBayesMultinomial naiveBayesMultinomial0 = new NaiveBayesMultinomial();\n try { \n Evaluation.evaluateModel((Classifier) naiveBayesMultinomial0, stringArray0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // Weka exception: No training file and no object input file given.\n // \n // General options:\n // \n // -h or -help\n // \\tOutput help information.\n // -synopsis or -info\n // \\tOutput synopsis for classifier (use in conjunction with -h)\n // -t <name of training file>\n // \\tSets training file.\n // -T <name of test file>\n // \\tSets test file. If missing, a cross-validation will be performed\n // \\ton the training data.\n // -c <class index>\n // \\tSets index of class attribute (default: last).\n // -x <number of folds>\n // \\tSets number of folds for cross-validation (default: 10).\n // -no-cv\n // \\tDo not perform any cross validation.\n // -split-percentage <percentage>\n // \\tSets the percentage for the train/test set split, e.g., 66.\n // -preserve-order\n // \\tPreserves the order in the percentage split.\n // -s <random number seed>\n // \\tSets random number seed for cross-validation or percentage split\n // \\t(default: 1).\n // -m <name of file with cost matrix>\n // \\tSets file with cost matrix.\n // -l <name of input file>\n // \\tSets model input file. In case the filename ends with '.xml',\n // \\ta PMML file is loaded or, if that fails, options are loaded\n // \\tfrom the XML file.\n // -d <name of output file>\n // \\tSets model output file. In case the filename ends with '.xml',\n // \\tonly the options are saved to the XML file, not the model.\n // -v\n // \\tOutputs no statistics for training data.\n // -o\n // \\tOutputs statistics only, not the classifier.\n // -i\n // \\tOutputs detailed information-retrieval statistics for each class.\n // -k\n // \\tOutputs information-theoretic statistics.\n // -classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\n // \\tUses the specified class for generating the classification output.\n // \\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\n // -p range\n // \\tOutputs predictions for test instances (or the train instances if\n // \\tno test instances provided and -no-cv is used), along with the \n // \\tattributes in the specified range (and nothing else). \n // \\tUse '-p 0' if no attributes are desired.\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -distribution\n // \\tOutputs the distribution instead of only the prediction\n // \\tin conjunction with the '-p' option (only nominal classes).\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -r\n // \\tOnly outputs cumulative margin distribution.\n // -xml filename | xml-string\n // \\tRetrieves the options from the XML-data instead of the command line.\n // -threshold-file <file>\n // \\tThe file to save the threshold data to.\n // \\tThe format is determined by the extensions, e.g., '.arff' for ARFF \n // \\tformat or '.csv' for CSV.\n // -threshold-label <label>\n // \\tThe class label to determine the threshold data for\n // \\t(default is the first label)\n // \n // Options specific to weka.classifiers.bayes.NaiveBayesMultinomial:\n // \n // -D\n // \\tIf set, classifier is run in debug mode and\n // \\tmay output additional info to the console\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "public BLabel(String text)\n {\n this(text, WEST);\n }", "@Test\n @Tag(\"bm1000\")\n public void testBANDM() {\n CuteNetlibCase.doTest(\"BANDM.SIF\", \"-158.6280184501187\", null, NumberContext.of(7, 4));\n }", "public void model() \n\t{\n\t\t\n\t\ttry \n\t\t{\n\t\t GRBEnv env = new GRBEnv();\n\t\t GRBModel model = new GRBModel(env, \"resources/students.lp\");\n\n\t\t model.optimize();\n\n\t\t int optimstatus = model.get(GRB.IntAttr.Status);\n\n\t\t if (optimstatus == GRB.Status.INF_OR_UNBD) {\n\t\t model.getEnv().set(GRB.IntParam.Presolve, 0);\n\t\t model.optimize();\n\t\t optimstatus = model.get(GRB.IntAttr.Status);\n\t\t }\n\n\t\t if (optimstatus == GRB.Status.OPTIMAL) {\n\t\t double objval = model.get(GRB.DoubleAttr.ObjVal);\n\t\t System.out.println(\"Optimal objective: \" + objval);\n\t\t } else if (optimstatus == GRB.Status.INFEASIBLE) {\n\t\t System.out.println(\"Model is infeasible\");\n\n\t\t // Compute and write out IIS\n\t\t model.computeIIS();\n\t\t model.write(\"model.ilp\");\n\t\t } else if (optimstatus == GRB.Status.UNBOUNDED) {\n\t\t System.out.println(\"Model is unbounded\");\n\t\t } else {\n\t\t System.out.println(\"Optimization was stopped with status = \"\n\t\t + optimstatus);\n\t\t }\n\n\t\t // Dispose of model and environment\n\t\t model.write(\"resources/model.sol\");\n\t\t model.dispose();\n\t\t env.dispose();\n\n\t\t } catch (GRBException e) {\n\t\t System.out.println(\"Error code: \" + e.getErrorCode() + \". \" +\n\t\t e.getMessage());\n\t\t }\n\t\t\n\t}", "@Test\n public void testGetBvs() throws SolverException, InterruptedException {\n requireBitvectors();\n // Some names are specificly chosen to test the Boolector model\n // Use 1 instead of 0 or max bv value, as solvers tend to use 0, min or max as default\n for (String name : VARIABLE_NAMES) {\n testModelGetters(\n bvmgr.equal(bvmgr.makeVariable(8, name), bvmgr.makeBitvector(8, 1)),\n bvmgr.makeBitvector(8, 1),\n BigInteger.ONE,\n name);\n }\n }", "public static void handleBlindMeg(BufferedReader br, State state, int myPid) throws IOException{\n\t\tint playerCount = state.numInpot;\n\t\tswitch(playerCount){\n\t\tcase 2:\n\t\t\trec = br.readLine();\n\t\t\tsubs = rec.split(\" \");\n\t\t\t//desk.setBlind(Integer.parseInt(rec));\n\t\t\tstate.BB = Integer.parseInt(subs[1]);\n\t\t\t//我是盲注\n\t\t\tif(myPid == Integer.parseInt(subs[0])){\n\t\t\t\tstate.myRestJetton -= Integer.parseInt(subs[1]);\n\t\t\t\tstate.myBet = Integer.parseInt(subs[1]);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\trec = br.readLine();\n\t\t\tsubs = rec.split(\" \");\n\t\t\t//我是小盲注\n\t\t\tif(myPid == Integer.parseInt(subs[0].substring(0, subs[0].length() - 1))){\n\t\t\t\tstate.myRestJetton -= (Integer.parseInt(subs[1]) / 2);\n\t\t\t\tstate.myBet = Integer.parseInt(subs[1]) / 2;\n\t\t\t}\n\t\t\trec = br.readLine();\n\t\t\tsubs = rec.split(\" \");\n\t\t\t//desk.setBlind(Integer.parseInt(rec));\n\t\t\tstate.BB = Integer.parseInt(subs[1]);\n\t\t\t//我是大盲注\n\t\t\tif(myPid == Integer.parseInt(subs[0].substring(0, subs[0].length() - 1))){\n\t\t\t\tstate.myRestJetton -= Integer.parseInt(subs[1]);\n\t\t\t\tstate.myBet = Integer.parseInt(subs[1]);\n\t\t\t}\n\t\t}\n\t\tbr.readLine();\nSystem.out.println(\"my bet: \" + state.myBet);\n\t}", "public static void main(String[] args) throws IOException {\n\t\tMain t = new Main();\n\t\tSystem.out.println(\"The model is trained: \");\n\t\tt.training(enTrainingDir, 0.7);\n\t\tSystem.out.println(\"Check validation in example of \\\"AB\\\":\");\n\t\tt.checkValid(\"AB\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"============= unsmoothed models =============================================================================\");\n\t\tSystem.out.print(\"Unigram: \");\n\t\tSystem.out.println(t.uni);\n\t\tSystem.out.print(\"Bigram: \");\n\t\tSystem.out.println(t.bi);\n\t\tSystem.out.print(\"Trigram: \");\n\t\tSystem.out.println(t.tri);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"============= add-one smoothed models ========================================================================\");\n\t\tSystem.out.println(\"Note: this is only one of smoothed models , not the tuning process. Because there would be too many console lines.\");\n\t\tSystem.out.println(\"Here I take add-k = 0.7 as an example.\");\n\t\tSystem.out.println(\"*************************************************************************************************************\");\n\t\tdouble k = 0.7;\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tSystem.out.println(\"*************************************************************************************************************\");\n\t\tSystem.out.println(\"Then I take the classic add-k = 1.0 as an example.\");\n\t\tSystem.out.println(\"*************************************************************************************************************\");\n\t\tk = 1.0;\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"===== linear interpolation smoothed models ===================================================================\");\n\t\tdouble[] lambdas_tri = new double[] {1.0 / 3, 1.0 / 3, 1.0 / 3};\n\t\tdouble[] lambdas_bi = new double[] {1.0 / 2, 1.0 / 2};\n\t\tSystem.out.println(\"First is equally weighted lambdas: \" + Arrays.toString(lambdas_tri) + \" and \" + Arrays.toString(lambdas_bi));\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tSystem.out.println(\"**************************************************************************************************************\");\n\t\tlambdas_tri = new double[] {0.5, 0.3, 0.2};\n\t\tlambdas_bi = new double[] {0.7, 0.3};\n\t\tSystem.out.println(\"Then is tuned-weighted lambdas: \" + Arrays.toString(lambdas_tri) + \" and \" + Arrays.toString(lambdas_bi));\n\t\tSystem.out.println(\"Again, this is not all the tuning process. Here is only one set of lambdas.\");\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"=================== Generating texts ==========================================================================\");\n\t\tSystem.out.println(\"To save console space, here I generate A to E, five sentences. Feel free to adjust parameters in code.\");\n\t\tSystem.out.println(\"***************************************************************************************************************\");\n\t\tt.training(enTrainingDir, 0.7);\n\t\tSystem.out.println(\"**************** Bi-gram generating ***************************************************************************\");\n\t\tfor (char c = 'A'; c <= 'E'; c++) {\n\t\t\tt.generateWithBigramModel(String.valueOf(c));\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Not that good huh?\");\n\t\tSystem.out.println(\"**************** Tri-gram generating *************************************************************************\");\n\t\tfor (char c = 'A'; c <= 'E'; c++) {\n\t\t\tt.generateWithBigramModel(String.valueOf(c));\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"...Seems not good as well.\");\n\t}", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setStemmer((Stemmer) null);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void loadModel(File model_file) throws IOException, ClassNotFoundException{\n\t\t// Load Model From File\n\t\tSystem.out.println(\"Loading Training Model. Please wait.\");\n\t\tFileInputStream fileIn = new FileInputStream(model_file);\n\t\tObjectInputStream objIn = new ObjectInputStream(fileIn); \n\t\tmClassifier = (LMClassifier<NGramProcessLM, MultivariateEstimator>) objIn.readObject();\n\t\tobjIn.close();\n\t\tisTrained = true;\n\t\tSystem.out.println(\"Loading Model. Complete.\");\n\t}", "public ModelBolting(String bolting){\r\n\t\tthis.bolting = bolting;\r\n\t}", "public void trainTest() throws Exception\n\t{\n\t\tSystem.out.println(\"Preprocessing Testset ..\");\n\t\t//String[] dir = new String[]{ Test+\"negative\" , Test+\"positive\"};\n\t\t//FileIterator iterator = new FileIterator(dir,FileIterator.LAST_DIRECTORY);\n\t\tInstanceList instances = new InstanceList(getTextPipe());\n\t\t//instances.addThruPipe(iterator);\n\n\t\tCSVParser parser = new CSVParser(new FileReader(\n\t\t\t\t\"resources/datasets/sentimentanalysis/mallet_test/Sentiment140/sentiment140.csv\"),\n\t\t\t\tCSVFormat.EXCEL.withFirstRecordAsHeader());\n\n\t\tTextPreprocessor preprocessor = new TextPreprocessor(\"resources/datasets/sentimentanalysis/\");\n\t\tint count = 0;\n\t\tfor (CSVRecord record: parser.getRecords())\n\t\t{\n\t\t\tString target;\n\t\t\tif (record.get(\"target\").equals(\"0\"))\n\t\t\t\ttarget = \"negative\";\n\t\t\telse\n\t\t\t\ttarget = \"positive\";\n\t\t\tinstances.addThruPipe(new Instance(preprocessor.getProcessed(record.get(\"tweet\")),target,\n\t\t\t\t\t\"Instance\"+count++,null));\n\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t\tSystem.out.println(instances.targetLabelDistribution());\n\t\tSystem.out.println(\"Start Training Testset ..\");\n\t\tClassifier nb = new NaiveBayesTrainer().train(instances);\n\t\tSystem.out.println(\"Saving Test Model ..\");\n\t\tsaveModel(nb,Test+\"Model.bin\");\n\t\tsaveinstances(instances,Test+\"Model-Instances.bin\");\n\t\tinstances.getDataAlphabet().dump(new PrintWriter(new File(Test+\"Model-alphabet.dat\")));\n\t}", "public static final void main(final String[] args) {\n LOGGER.log(Level.INFO, \"Starting 10b!\");\n\n final CMDLineParser cmdLineParser = new CMDLineParser(args);\n final TBEngine tbEngine = new TBEngine();\n final DataSet dataSet =\n tbEngine.getDataSet(DataSetFactory.INTEGER_TYPE);\n TBEngine.resultset = new IntegerResultSet();\n }", "@Procedure(value = \"mlp.train\", mode = WRITE)\n @Description(\"Backward pass through NN\")\n public void train(@Name(value = \"no. of passes\") long nPasses) {\n\n DataLogger logger = new DataLogger(\"proto1\", \"error\");\n\n for (int i = 0; i < nPasses; i++) {\n updateTrainRate(i + 1);\n forwardPass();\n\n double error = calculateError();\n\n double reward = 1.0 - error;\n\n// if (Math.random() > 0.9) reward = error;\n\n backwardPass(reward);\n moveNext();\n\n\n// System.out.println(String.format(\"Error: %f\", error));\n// if (i % 100 == 0 && i > 0) {\n// double meanError = errors.stream().reduce(0.0, Double::sum) / 100;\n// System.out.println(String.format(\n// \"Mean error: %f, eta: %f\", meanError, eta));\n// errors.clear();\n// }\n// errors.add(error);\n logger.append(error);\n\n\n }\n\n forwardPass();\n logger.close();\n }", "@Test(timeout = 4000)\n public void test42() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setLNorm(551.149718887);\n assertEquals(551.149718887, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testBORE3D() {\n CuteNetlibCase.doTest(\"BORE3D.SIF\", \"1373.0803942085367\", null, NumberContext.of(7, 4));\n }", "public static void main(String args[])\n\t{\n\t\ttry\n\t\t{\t\t\t\n\t\t\tLinkNet ln = new LinkNet();\n\t\t\tln.ensureCapacity(500000, 50000);\n\t\t\t//ln.addBranch(1, 2);\n\t\t\t//ln.addBranch(3, 4);\n\t\t\t//ln.addBranch(3, 5);\n\t\t\t// get some test data and load it in\n\t\t\tSimpleCSV eqcsv = new SimpleCSV(\"testdata/db/Branches.csv\");\n\t\t\t\n\t\t\tint eqa[] = eqcsv.getInts(\"I\");\n\t\t\tint eqb[] = eqcsv.getInts(\"J\");\n\t\t\t\n\t\t\tSimpleCSV xfrcsv = new SimpleCSV(\"testdata/db/Transformers.csv\");\n\t\t\t\n\t\t\tint xfri[] = xfrcsv.getInts(\"I\");\n\t\t\tint xfrj[] = xfrcsv.getInts(\"J\");\n\t\t\tint xfrk[] = xfrcsv.getInts(\"K\");\n\t\t\t\n\t\t\tlong st = System.currentTimeMillis();\n\t\t\tint count = eqa.length;\n\t\t\tfor(int r=0; r<count; r++) { ln.addBranch(eqa[r], eqb[r]); }\n\t\t\tcount = xfri.length;\n\t\t\tfor(int r=0; r<count; r++)\n\t\t\t{\n\t\t\t\tln.addBranch(xfri[r], xfrj[r]);\n\t\t\t\tif (xfrk[r] != 0) ln.addBranch(xfri[r], xfrk[r]);\n\t\t\t}\n\t\t\tlong ft = System.currentTimeMillis();\n\t\t\tSystem.out.println(\"Time to load \"+(eqa.length+xfri.length)+\" branches: \"+(ft-st)+\"ms\");\n\t\t\t\n\t\t\tst = System.currentTimeMillis();\n\t\t\tint buses[] = ln.getAllBuses();\n\t\t\tft = System.currentTimeMillis();\n\t\t\tSystem.out.println(\"Time to get all buses: \"+(ft-st)+\"ms\");\n\n\t\t\tfor(int i=0; i<buses.length; i++)\n\t\t\t{\n\t\t\t\tint b = buses[i];\n\t\t\t\tSystem.out.print(\"Bus \"+b+\":\");\n\t\t\t\tfor(int n : ln.findBuses(b)) System.out.print(\" \"+n);\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t\tst = System.currentTimeMillis();\n\t\t\tint islands[][] = ln.findGroups();\n\t\t\tft = System.currentTimeMillis();\n\t\t\tSystem.out.println(\"Time to get all islands: \"+(ft-st)+\"ms\");\n\t\t\tfor(int i=0; i<islands.length; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"Island \"+i+\":\");\n\t\t\t\tfor(int n : islands[i]) System.out.print(\" \"+n);\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Error: \"+e);\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n final int numRows = 28;\n final int numColumns = 28;\n int outputNum = 10; // number of output classes\n int batchSize = 128; // batch size for each epoch\n int rngSeed = 123; // random number seed for reproducibility\n int numEpochs = 15; // number of epochs to perform\n String modelPath = \"モデルパスを入力\";\n\n //Get the DataSetIterators:\n DataSetIterator mnistTrain = new MnistDataSetIterator(batchSize, true, rngSeed);\n DataSetIterator mnistTest = new MnistDataSetIterator(batchSize, false, rngSeed);\n\n\n System.out.println(\"Build model....\");\n MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()\n .seed(rngSeed) //include a random seed for reproducibility\n // use stochastic gradient descent as an optimization algorithm\n .updater(new Nesterovs(0.006, 0.9))\n .l2(1e-4)\n .list()\n .layer(new DenseLayer.Builder() //create the first, input layer with xavier initialization\n .nIn(numRows * numColumns)\n .nOut(1000)\n .activation(Activation.RELU)\n .weightInit(WeightInit.XAVIER)\n .build())\n .layer(new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD) //create hidden layer\n .nIn(1000)\n .nOut(outputNum)\n .activation(Activation.SOFTMAX)\n .weightInit(WeightInit.XAVIER)\n .build())\n .build();\n\n\n MultiLayerNetwork model = new MultiLayerNetwork(conf);\n model.init();\n //print the score with every 1 iteration\n UIServer uiServer = UIServer.getInstance();\n InMemoryStatsStorage statsStorage = new InMemoryStatsStorage();\n uiServer.attach(statsStorage);\n model.setListeners(new StatsListener(statsStorage),new ScoreIterationListener(1));\n\n System.out.println(\"Train model....\");\n model.fit(mnistTrain, numEpochs);\n\n\n\n\n System.out.println(\"Evaluate model....\");\n Evaluation eval = model.evaluate(mnistTest);\n System.out.println(eval.stats());\n ModelSerializer.writeModel(model, new File(modelPath), false);\n System.out.println(\"****************Example finished********************\");\n\n }", "@Test(timeout = 4000)\n public void test56() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(\"NaiveBayesMultinomialText: No model built yet.\\n\", string0);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Override\n\tpublic void run(String arg) {\n\t\ttry {\n\t\t\tdocument = getDocument();\n\t\t} catch (NullPointerException e){\n\t\t\te.getStackTrace();\n\t\t\treturn;\n\t\t} catch (Exception e) {\n\t\t\tIJ.error(\"Error: File is not an SBML Model\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tcheckSBMLDocument(document);\n\t\t\n\t\taddSBases();\n\t\tModelSaver saver = new ModelSaver(document);\n\t\tsaver.save();\n\t\tshowDomainStructure();\n\t\tGeometryDatas gData = new GeometryDatas(model);\n\t\tvisualize(gData.getSpImgList());\n\t\t\n\t\tprint();\n\t\t\n\t\tModelValidator validator = new ModelValidator(document);\n\t\tvalidator.validate();\n\t}", "private static void GenerateBaseline(String path, ArrayList<String> aNgramChar, Hashtable<String, TruthInfo> oTruth, String outputFile, String classValues) {\n FileWriter fw = null;\n int nTerms = 1000;\n \n try {\n fw = new FileWriter(outputFile);\n fw.write(Weka.HeaderToWeka(aNgramChar, nTerms, classValues));\n fw.flush();\n\n ArrayList<File> files = getFilesFromSubfolders(path, new ArrayList<File>());\n\n assert files != null;\n int countFiles = 0;\n for (File file : files)\n {\n System.out.println(\"--> Generating \" + (++countFiles) + \"/\" + files.size());\n try {\n Hashtable<String, Integer> oDocBOW = new Hashtable<>();\n Hashtable<String, Integer> oDocNgrams = new Hashtable<>();\n\n String sFileName = file.getName();\n\n //File fJsonFile = new File(path + \"/\" + sFileName);\n //Get name without extension\n String sAuthor = sFileName.substring(0, sFileName.lastIndexOf('.'));\n\n Scanner scn = new Scanner(file, \"UTF-8\");\n String sAuthorContent = \"\";\n //Reading and Parsing Strings to Json\n while(scn.hasNext()){\n JSONObject tweet= (JSONObject) new JSONParser().parse(scn.nextLine());\n\n String textTweet = (String) tweet.get(\"text\");\n\n sAuthorContent += textTweet + \" \" ;\n\n StringReader reader = new StringReader(textTweet);\n\n NGramTokenizer gramTokenizer = new NGramTokenizer(reader, MINSIZENGRAM, MAXSIZENGRAM);\n CharTermAttribute charTermAttribute = gramTokenizer.addAttribute(CharTermAttribute.class);\n gramTokenizer.reset();\n\n gramTokenizer.reset();\n\n while (gramTokenizer.incrementToken()) {\n String sTerm = charTermAttribute.toString();\n int iFreq = 0;\n if (oDocBOW.containsKey(sTerm)) {\n iFreq = oDocBOW.get(sTerm);\n }\n oDocBOW.put(sTerm, ++iFreq);\n }\n\n gramTokenizer.end();\n gramTokenizer.close();\n }\n \n Features oFeatures = new Features();\n oFeatures.GetNumFeatures(sAuthorContent);\n\n if (oTruth.containsKey(sAuthor)) {\n TruthInfo truth = oTruth.get(sAuthor);\n String sGender = truth.gender.toUpperCase();\n //If gender is unknown, this author is not interesting\n if (sGender.equals(\"UNKNOWN\")) continue;\n String sCountry = truth.country.toUpperCase();\n\n if (classValues.contains(\"MALE\")) {\n fw.write(Weka.FeaturesToWeka(aNgramChar, oDocBOW, oDocNgrams, oFeatures, nTerms, sGender));\n } else {\n fw.write(Weka.FeaturesToWeka(aNgramChar, oDocBOW, oDocNgrams, oFeatures, nTerms, sCountry));\n }\n fw.flush();\n }\n\n } catch (Exception ex) {\n System.out.println(\"ERROR: \" + ex.toString());\n }\n }\n } catch (Exception ex) {\n System.out.println(\"ERROR: \" + ex.toString());\n } finally {\n if (fw!=null) { try { fw.close(); } catch (Exception ignored) {} }\n }\n }", "@Test(timeout = 4000)\n public void test57() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n PrecomputedKernelMatrixKernel precomputedKernelMatrixKernel0 = new PrecomputedKernelMatrixKernel();\n File file0 = precomputedKernelMatrixKernel0.getKernelMatrixFile();\n naiveBayesMultinomialText0.setStopwords(file0);\n String[] stringArray0 = naiveBayesMultinomialText0.getOptions();\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(14, stringArray0.length);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n }", "public NaiveBayes(List<Folder> folders) {\n\t\tsuper(folders);\n\t}", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setStopwords((File) null);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertFalse(naiveBayesMultinomialText0.getUseStopList());\n }", "public static void main(String[] args) throws Exception {\n Path modelPath = Paths.get(\"saved_graph_file\");\n byte[] graph = Files.readAllBytes(modelPath);\n\n // SavedModelBundle svd = SavedModelBundle.load(\"gin_rummy_nfsp4\", \"serve\");\n // System.out.println(svd.metaGraphDef());\n\n Graph g = new Graph();\n\n g.importGraphDef(graph);\n\n // Print for tags.\n Iterator<Operation> ops = g.operations();\n while (ops.hasNext()) {\n Operation op = ops.next();\n // Types are: Add, Const, Placeholder, Sigmoid, MatMul, Identity\n if (op.type().equals(\"Placeholder\")) {\n System.out.println(\"Type: \" + op.type() + \", Name: \" + op.name() + \", NumOutput: \" + op.numOutputs());\n System.out.println(\"OUTPUT: \" + op.output(0).shape());\n }\n }\n\n //open session using imported graph\n Session sess = new Session(g);\n float[][] inputData = {{4, 3, 2, 1}};\n\n // We have to create tensor to feed it to session,\n // unlike in Python where you just pass Numpy array\n Tensor inputTensor = Tensor.create(inputData, Float.class);\n float[][] output = predict(sess, inputTensor);\n for (int i = 0; i < output[0].length; i++) {\n System.out.println(output[0][i]);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testBOEING1() {\n CuteNetlibCase.doTest(\"BOEING1.SIF\", \"-335.2135675071266\", \"286.9746573387996\", NumberContext.of(7, 4));\n }", "public void loadModel(){\n remoteModel = new FirebaseCustomRemoteModel.Builder(dis).build();\n FirebaseModelManager.getInstance().getLatestModelFile(remoteModel)\n .addOnCompleteListener(new OnCompleteListener<File>() {\n @Override\n public void onComplete(@NonNull Task<File> task) {\n File modelFile = task.getResult();\n if (modelFile != null) {\n interpreter = new Interpreter(modelFile);\n // Toast.makeText(MainActivity2.this, \"Hosted Model loaded.. Running interpreter..\", Toast.LENGTH_SHORT).show();\n runningInterpreter();\n }\n else{\n try {\n InputStream inputStream = getAssets().open(dis+\".tflite\");\n byte[] model = new byte[inputStream.available()];\n inputStream.read(model);\n ByteBuffer buffer = ByteBuffer.allocateDirect(model.length)\n .order(ByteOrder.nativeOrder());\n buffer.put(model);\n //Toast.makeText(MainActivity2.this, dis+\"Bundled Model loaded.. Running interpreter..\", Toast.LENGTH_SHORT).show();\n interpreter = new Interpreter(buffer);\n runningInterpreter();\n } catch (IOException e) {\n // File not found?\n Toast.makeText(MainActivity2.this, \"No hosted or bundled model\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n });\n }", "public static final SubLObject setup_inference_balanced_tactician_motivation_file() {\n utilities_macros.note_funcall_helper_function($sym24$BALANCED_STRATEGY_NOTE_NEW_TACTIC);\n utilities_macros.note_funcall_helper_function($sym26$BALANCED_STRATEGY_NOTE_SPLIT_TACTICS_STRATEGICALLY_POSSIBLE);\n return NIL;\n }", "@Test(timeout = 4000)\n public void test66() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n naiveBayesMultinomialText0.setLowercaseTokens(true);\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertTrue(naiveBayesMultinomialText0.getLowercaseTokens());\n }", "public void testMainLBGFSCachedSemiMarkov() throws Exception {\n\t\tConrad.main(new String[] {\"train\", \"test/input/zeroOrderLBFGSCachedSemiMarkov.xml\", \"test/input/zeroOrderTestShortMax.txt\", \"test/working/zeroLBGFSModelCachedSemiMarkov.ser\"});\n\t\tConrad.main(new String[] {\"test\", \"test/working/zeroLBGFSModelCachedSemiMarkov.ser\", \"test/input/zeroOrderTest.txt\", \"test/working/zeroOrderMainLBGFSCachedSemiMarkovPredicted.txt\"});\n\t\tConrad.main(new String[] {\"test\", \"test/working/zeroLBGFSModelCachedSemiMarkov.ser\", \"test/input/zeroOrderTest2.txt\", \"test/working/zeroOrder2MainLBGFSCachedSemiMarkovPredicted.txt\"});\n\t\tassertFilesMatch(\"test/output/zeroOrder2MainLBGFSCachedSemiMarkovPredicted.txt\", \"test/working/zeroOrder2MainLBGFSCachedSemiMarkovPredicted.txt\");\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testBOEING2() {\n CuteNetlibCase.doTest(\"BOEING2.SIF\", \"-3.1501872802E+02\", \"-73.36896910872208\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.getUseStopList();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "public void trainModel(String input) {\n\n String[] words = input.split(\" \");\n String currentWord = \"\";\n\n for (int i = 0; i < words.length; i++) {\n\n if (i == 0 || words[i-1].contains(\".\")) {\n model.get(\"_begin\").add(words[i]);\n } else if (i == words.length - 1 || words[i].contains(\".\")) {\n model.get(\"_end\").add(words[i]);\n } else {\n model.putIfAbsent(currentWord, new ArrayList<String>());\n model.get(currentWord).add(words[i]);\n }\n\n currentWord = words[i];\n\n }\n }", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setUseStopList(true);\n assertTrue(naiveBayesMultinomialText0.getUseStopList());\n }", "public void testSVMChunkLearnng() throws IOException, GateException {\n // Initialisation\n System.out.print(\"Testing the SVM with liner kernenl on chunk learning...\");\n File chunklearningHome = new File(new File(learningHome, \"test\"),\n \"chunklearning\");\n String configFileURL = new File(chunklearningHome, \"engines-svm.xml\")\n .getAbsolutePath();\n String corpusDirName = new File(chunklearningHome, \"data-ontonews\")\n .getAbsolutePath();\n //Remove the label list file, feature list file and chunk length files.\n String wdResults = new File(chunklearningHome,\n ConstantParameters.SUBDIRFORRESULTS).getAbsolutePath();\n emptySavedFiles(wdResults);\n String inputASN = \"Key\";\n loadSettings(configFileURL, corpusDirName, inputASN, inputASN);\n // Set the evaluation mode\n RunMode runM=RunMode.EVALUATION;\n learningApi.setLearningMode(runM);\n controller.execute();\n // Using the evaluation mode for testing\n EvaluationBasedOnDocs evaluation = learningApi.getEvaluation();\n // Compare the overall results with the correct numbers\n assertEquals(\"Wrong value for correct: \", 44, (int)Math.floor(evaluation.macroMeasuresOfResults.correct));\n assertEquals(\"Wrong value for partial: \", 10, (int)Math.floor(evaluation.macroMeasuresOfResults.partialCor));\n assertEquals(\"Wrong value for spurious: \", 11, (int)Math.floor(evaluation.macroMeasuresOfResults.spurious));\n assertEquals(\"Wrong value for missing: \", 40, (int)Math.floor(evaluation.macroMeasuresOfResults.missing));\n\n System.out.println(\"completed\");\n // Remove the resources\n clearOneTest();\n }", "public void infer() {\n runTime.setStartTime(System.currentTimeMillis());\n runTime.setIter(newModel.test_iters);\n System.out.println(\"Sampling \" + newModel.test_iters + \" testing iterations!\");\n\n for (int currentIter = 1; currentIter <= newModel.test_iters; currentIter++) {\n System.out.println(\"Iteration \" + currentIter + \"...\");\n\n for (int d = 0; d < newModel.D; d++) {\n\n for (int n = 0; n < newModel.corpus.docs[d].length; n++){\n HiddenVariable hv = infSZSampling(d, n);\n newModel.sAssign[d][n] = hv.sentiment;\n newModel.zAssign[d][n] = hv.topic;\n }\n } // end for each document\n } // end iterations\n runTime.setEndTime(System.currentTimeMillis());\n System.out.println(\"Gibbs sampling for inference completed!\");\n System.out.println(\"Saving the inference outputs!\");\n\n computeNewPi();\n computeNewTheta();\n computeNewPhi();\n newModel.computePerplexity();\n newModel.evaluateSentiment();\n newModel.saveModel(oldModel.modelName + \"-inference\", runTime);\n newModel.corpus.localDict.writeWordMap(option.model_dir + File.separator + oldModel.modelName + \"-inference\" + Model.wordMapSuffix);\n\n }", "public void dormbr_(CHARACTER VECT,CHARACTER SIDE,CHARACTER TRANS,INTEGER M,INTEGER N,INTEGER K,double[] A,INTEGER LDA,double[] TAU,double[] C,INTEGER LDC,double[] WORK,INTEGER LWORK,INTEGER INFO);", "@Test(timeout = 4000)\n public void test85() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.stopwordsTipText();\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(\"The file containing the stopwords (if this is a directory then the default ones are used).\", string0);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test(timeout = 4000)\n public void test50() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.getStopwords();\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n }", "@Test(timeout = 4000)\n public void test81() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.LNormTipText();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(\"The LNorm to use for document length normalization.\", string0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n \n naiveBayesMultinomialText0.m_normalize = true;\n boolean boolean0 = naiveBayesMultinomialText0.getNormalizeDocLength();\n assertTrue(boolean0);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.m_lnorm = (double) (-2);\n double double0 = naiveBayesMultinomialText0.getLNorm();\n assertEquals((-2.0), double0, 0.01);\n }", "public boolean execBMC(){\r\n\t\tboolean result = true;\r\n\t\tXMLFileWriter writer = new XMLFileWriter(modelFile);\r\n\t\twriter.save();\r\n\t\t\r\n\t\tRuntime run = Runtime.getRuntime();\r\n\t\ttry {\r\n\t\t\tProcess p = run.exec(cmdBMC);\r\n\t\t\t\r\n\t\t\t/**必须要处理外部命令的标准输入输出**/\r\n\t\t\tBufferedInputStream in = new BufferedInputStream(p.getInputStream()); \r\n BufferedReader inBr = new BufferedReader(new InputStreamReader(in)); \r\n String lineStr; \r\n while ((lineStr = inBr.readLine()) != null) \r\n System.out.println(lineStr);\r\n \r\n //当前程序等待外部命令执行完后再继续执行\r\n\t\t\tif(p.waitFor() != 0){\r\n\t\t\t\tresult = false;\t\t//非正常退出\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(\"IOException when executing BMC cmd\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tcatch (InterruptedException e) {\r\n\t\t\tSystem.out.println(\"InterruptedException when executing BMC cmd\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "@Override\n public GraphObs generateBAGraph(int size, int linksPerStep, boolean onlymax, \n int observations, int obsLength, int diff, boolean zeroPoint)\n {\n if(observations < 1)\n {\n System.err.println(\"# of false observations needs to be positive\");\n observations = 1; // can't use a GraphObs with no observations\n }\n GraphObs grOb = new GraphObs();\n vertInfo = new ArrayList();\n \n // First step is to generate the basic graph with correct form but \n // without initialized bounds (since we might need to add a T0 later)\n id = 0;\n Graph gr = new Graph();\n gr.reverseNegativeEdge(false);\n Vertex first = new Vertex(id);\n gr.addVertex(first);\n id++;\n Vertex second = new Vertex(id);\n gr.addVertex(second);\n id++;\n gr.addEdge(second, first, 0, 0);\n // Keep this direction for all the vertices to add (new to old)\n BuildVertex bv = new BuildVertex();\n bv.vert = first;\n bv.degree = 1;\n vertInfo.add(bv);\n bv = new BuildVertex();\n bv.vert = second;\n bv.degree = 1;\n vertInfo.add(bv);\n numEdges = 1; \n \n nodes = 2;\n edges = 1;\n \n if(size < 3)\n {\n System.err.println(\"Graph generation is only for larger graphs \"\n + \"ie. > 2\");\n grOb.graph = gr;\n return grOb;\n }\n if(linksPerStep > size)\n {\n System.err.println(\"Can't have more edges than vertices for this\"\n + \" AB method\");\n linksPerStep = size;\n }\n for(int i = 2; i < size; i++) // already 2 vertices\n {\n int links = Math.min(i, linksPerStep);\n BAaddVertex(gr, links, onlymax);\n }\n \n // Store settings\n GraphGenSettings gs = new GraphGenSettings();\n gs.BAGraph(size, linksPerStep, onlymax, observations, obsLength, diff, \n zeroPoint);\n \n /**\n * Because this Class is made to construct Problems simply for\n * performance testing, this part is different from GraphGen.\n * The networks just have some random initialization, and the errors are\n * calculated very simple.\n */\n \n grOb.graph = initializeBounds(gr);\n \n addErrors(grOb, gs);\n \n grOb.success = true;\n \n grOb.settings = gs;\n \n return grOb;\n }", "public void train(){\n recoApp.training(idsToTest);\n }", "public static void main(String[] args) {\n\t\tif (args.length != 3) {\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Please enter: ngramSize, inputFile, outputFile\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tint ngramSize = Integer.parseInt(args[0]);\n\t\t\tString inFile = args[1];\n\t\t\tString outFile = args[2];\n\n\t\t\tBerkeleyKNLanguageModel.makeKneserNeyBinaryFromText(ngramSize,\n\t\t\t\t\tinFile, outFile);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tDataSet ds, testDs;\n\t\tNBFileReader fr = new NBFileReader();\n\n\t\tNBMain = new NaiveBayesMain();\n\t\tNBMain.parseArguments(args);\n\n\t\tHashMap<String, HashMap<String, Integer>> confusionMatrix = new HashMap<String, HashMap<String,Integer>>();\n\t\t\n\t\tds = fr.readFile(NBMain.getTrainFile());\n\t\ttestDs = fr.readFile(NBMain.getTestFile());\n\t\t\n\t\tNaiveBayes nbobj = new NaiveBayes(ds,NBMain.getClassVariable());\n\t\t\n\t\tnbobj.setLabelCount(NBMain.getClassVariable());\n\t\t\n\t\tnbobj.trainNB(NBMain.getClassVariable());\n\n\t\tSystem.out.println(\"===================================================================\");\n\t\tSystem.out.println(\"Predictions: \");\n\t\tSystem.out.println(\"===================================================================\");\n\t\tSystem.out.println();\n\t\tint correctClass = nbobj.classifyNB(testDs, confusionMatrix);\n\n\t\t\n\t\t//train\n\n\t}", "@Test\n public void testDecodeRuleset(){\n System.out.println(\"DecodeRulesetTest:B36/S125\");\n \n String birth = \"36\";\n String stillAlive = \"125\";\n \n boolean[] born = {false, false, false, true, false, false, true, false, false};\n boolean[] survives = {false, true, true, false, false, true, false, false, false};\n \n ng.decodeRuleset(birth, stillAlive);\n assertArrayEquals(born, ng.getBorn());\n assertArrayEquals(survives, ng.getSurvives());\n }", "public static void predictBatch() throws IOException {\n\t\tsvm_model model;\n\t\tString modelPath = \"./corpus/trainVectors.scale.model\";\n\t\tString testPath = \"./corpus/testVectors.scale\";\n\t\tBufferedReader reader = new BufferedReader(new FileReader(testPath));\n\t\tmodel = svm.svm_load_model(modelPath);\n\t\tString oneline;\n\t\tdouble correct = 0.0;\n\t\tdouble total = 0.0;\n\t\twhile ((oneline = reader.readLine()) != null) {\n\t\t\tint pos = oneline.indexOf(\" \");\n\t\t\tint classid = Integer.valueOf(oneline.substring(0, pos));\n\t\t\tString content = oneline.substring(pos + 1);\n\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\tint length = st.countTokens();\n\t\t\tint i = 0;\n\t\t\tsvm_node[] svm_nodes = new svm_node[length];\n\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\tString tmp = st.nextToken();\n\t\t\t\tint indice = Integer\n\t\t\t\t\t\t.valueOf(tmp.substring(0, tmp.indexOf(\":\")));\n\t\t\t\tdouble value = Double\n\t\t\t\t\t\t.valueOf(tmp.substring(tmp.indexOf(\":\") + 1));\n\t\t\t\tsvm_nodes[i] = new svm_node();\n\t\t\t\tsvm_nodes[i].index = indice;\n\t\t\t\tsvm_nodes[i].value = value;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tint predict_result = (int) svm.svm_predict(model, svm_nodes);\n\t\t\tif (predict_result == classid)\n\t\t\t\tcorrect++;\n\t\t\ttotal++;\n\t\t}\n\n\t\tSystem.out.println(\"Accuracy is :\" + correct / total);\n\n\t}", "public NGram getBigram() {\n if (QuestionNGram_Type.featOkTst && ((QuestionNGram_Type)jcasType).casFeat_bigram == null)\n jcasType.jcas.throwFeatMissing(\"bigram\", \"edu.cmu.deiis.types.QuestionNGram\");\n return (NGram)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((QuestionNGram_Type)jcasType).casFeatCode_bigram)));}", "@Test(timeout = 4000)\n public void test54() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n double double0 = naiveBayesMultinomialText0.getLNorm();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(2.0, double0, 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.getStemmer();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test(timeout = 4000)\n public void test49() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.getLowercaseTokens();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "private static long BBT(int n, long[] strg) {\n\t\tif (n == 0 || n == 1)\n\t\t\treturn 1;\n\t\tif (strg[n] != 0)\n\t\t\treturn strg[n];\n\t\tstrg[n] = ((BBT(n - 1, strg) % mod) * (2 * (BBT(n - 2, strg) % mod + BBT(n - 1, strg) % mod) % mod)) % mod;\n\t\treturn strg[n];\n\n\t}", "private void train() throws IOException {\n\t\thamContent = new String();// the content of ham training files\n\t\tspamContent = new String();// the content of spam training files\n\t\tvocabulary = new ArrayList<String>();// all the\n\t\t\t\t\t\t\t\t\t\t\t\t// vocabulary\n\t\t\t\t\t\t\t\t\t\t\t\t// within\n\t\t\t\t\t\t\t\t\t\t\t\t// training\n\t\t\t\t\t\t\t\t\t\t\t\t// files\n\t\thamSenderDomainHash = new HashMap<String, Integer>();\n\t\thamTimeHash = new HashMap<String, Integer>();\n\t\thamReplyHash = new HashMap<String, Integer>();\n\t\thamNonCharNumHash = new HashMap<String, Integer>();\n\t\tspamSenderDomainHash = new HashMap<String, Integer>();\n\t\tspamTimeHash = new HashMap<String, Integer>();\n\t\tspamReplyHash = new HashMap<String, Integer>();\n\t\tspamNonCharNumHash = new HashMap<String, Integer>();\n\n\t\thamWordProb = new HashMap<String, Double>();\n\t\tspamWordProb = new HashMap<String, Double>();\n\t\tclassProb = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < 24; i++) {\n\t\t\thamTimeHash.put(String.valueOf(i), 0);\n\t\t\tspamTimeHash.put(String.valueOf(i), 0);\n\t\t}\n\t\tint numSpam = 0, numHam = 0, numFile = 0;// numbers of training files\n\t\tString buff;// file reading tmp buffer\n\n\t\t/* get all the files in the directory */\n\t\tFile directory = new File(inputDirectory);\n\t\tFile[] files = directory.listFiles();\n\n\t\t/*\n\t\t * assign the content of hams and spams while counting the number of\n\t\t * files\n\t\t */\n\t\tfor (File f : files) {\n\t\t\tif (f.getName().startsWith(\"spam\")) {\n\t\t\t\tString readbuffer = readFile(f, 1);\n\t\t\t\tif (!spamTime.equals(\"-1\")) {\n\t\t\t\t\tspamSenderDomainHash.put(spamSenderDomain, 0);\n\t\t\t\t\thamSenderDomainHash.put(spamSenderDomain, 0);\n\t\t\t\t\tspamNonCharNumHash.put(spamNonCharNum, 0);\n\t\t\t\t\thamNonCharNumHash.put(spamNonCharNum, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (f.getName().startsWith(\"ham\")) {\n\t\t\t\tString readbufferString = readFile(f, 0);\n\t\t\t\tif (!hamTime.equals(\"-1\")) {\n\t\t\t\t\tspamSenderDomainHash.put(hamSenderDomain, 0);\n\t\t\t\t\thamSenderDomainHash.put(hamSenderDomain, 0);\n\t\t\t\t\tspamNonCharNumHash.put(hamNonCharNum, 0);\n\t\t\t\t\thamNonCharNumHash.put(hamNonCharNum, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (File f : files) {\n\t\t\tnumFile++;\n\t\t\t// System.out.println(f.getName());\n\t\t\tif (f.getName().startsWith(\"spam\")) {\n\t\t\t\tnumSpam++; // add to the number of spams\n\t\t\t\tString readbuffer = readFile(f, 1);\n\t\t\t\tif (!spamNonCharNumHash.containsKey(spamNonCharNum))\n\t\t\t\t\tspamNonCharNumHash.put(spamNonCharNum, 1);\n\t\t\t\telse if (spamNonCharNumHash.containsKey(spamNonCharNum))\n\t\t\t\t\tspamNonCharNumHash.put(spamNonCharNum,\n\t\t\t\t\t\t\tspamNonCharNumHash.get(spamNonCharNum) + 1);\n\t\t\t\tif (!spamTime.equals(\"-1\")) {\n\t\t\t\t\tif (!spamSenderDomainHash.containsKey(spamSenderDomain)\n\t\t\t\t\t\t\t&& !(spamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (spamSenderDomain.length() <= 3))\n\t\t\t\t\t\tspamSenderDomainHash.put(spamSenderDomain, 1);\n\t\t\t\t\telse if (spamSenderDomainHash.containsKey(spamSenderDomain)\n\t\t\t\t\t\t\t&& !(spamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (spamSenderDomain.length() <= 3))\n\t\t\t\t\t\tspamSenderDomainHash.put(spamSenderDomain,\n\t\t\t\t\t\t\t\tspamSenderDomainHash.get(spamSenderDomain) + 1);\n\t\t\t\t\tif (!spamTimeHash.containsKey(spamTime))\n\t\t\t\t\t\tspamTimeHash.put(spamTime, 1);\n\t\t\t\t\telse if (spamTimeHash.containsKey(spamTime))\n\t\t\t\t\t\tspamTimeHash.put(spamTime,\n\t\t\t\t\t\t\t\tspamTimeHash.get(spamTime) + 1);\n\t\t\t\t\tif (!spamReplyHash.containsKey(spamReply))\n\t\t\t\t\t\tspamReplyHash.put(spamReply, 1);\n\t\t\t\t\telse if (spamReplyHash.containsKey(spamReply))\n\t\t\t\t\t\tspamReplyHash.put(spamReply,\n\t\t\t\t\t\t\t\tspamReplyHash.get(spamReply) + 1);\n\n\t\t\t\t}\n\t\t\t\tspamContent += readbuffer.toLowerCase();\n\t\t\t\tspamContent = spamContent.replaceAll(\"[^a-zA-Z$\\n]+\", \" \");\n\n\t\t\t} else if (f.getName().startsWith(\"ham\")) { // the same thing for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ham\n\t\t\t\tnumHam++;\n\t\t\t\tString readbuffer = readFile(f, 0);\n\t\t\t\tif (!hamNonCharNumHash.containsKey(hamNonCharNum))\n\t\t\t\t\thamNonCharNumHash.put(hamNonCharNum, 1);\n\t\t\t\telse if (hamNonCharNumHash.containsKey(hamNonCharNum))\n\t\t\t\t\thamNonCharNumHash.put(hamNonCharNum,\n\t\t\t\t\t\t\thamNonCharNumHash.get(hamNonCharNum) + 1);\n\t\t\t\tif (!hamTime.equals(\"-1\")) {\n\t\t\t\t\tif (!hamSenderDomainHash.containsKey(hamSenderDomain)\n\t\t\t\t\t\t\t&& !(hamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (hamSenderDomain.length() <= 3))\n\t\t\t\t\t\thamSenderDomainHash.put(hamSenderDomain, 1);\n\t\t\t\t\telse if (hamSenderDomainHash.containsKey(hamSenderDomain)\n\t\t\t\t\t\t\t&& !(hamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (hamSenderDomain.length() <= 3))\n\t\t\t\t\t\thamSenderDomainHash.put(hamSenderDomain,\n\t\t\t\t\t\t\t\thamSenderDomainHash.get(hamSenderDomain) + 1);\n\n\t\t\t\t\tif (!hamTimeHash.containsKey(hamTime))\n\t\t\t\t\t\thamTimeHash.put(hamTime, 1);\n\t\t\t\t\telse if (hamTimeHash.containsKey(hamTime))\n\t\t\t\t\t\thamTimeHash.put(hamTime, hamTimeHash.get(hamTime) + 1);\n\t\t\t\t\tif (!hamReplyHash.containsKey(hamReply))\n\t\t\t\t\t\thamReplyHash.put(hamReply, 1);\n\t\t\t\t\telse if (hamReplyHash.containsKey(hamReply))\n\t\t\t\t\t\thamReplyHash.put(hamReply,\n\t\t\t\t\t\t\t\thamReplyHash.get(hamReply) + 1);\n\n\t\t\t\t}\n\t\t\t\thamContent += readbuffer.toLowerCase();\n\t\t\t\thamContent = hamContent.replaceAll(\"[^a-zA-Z$\\n]+\", \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"file read complete!!!\");\n\t\t// System.out.println(hamSenderDomainHash);\n\t\t// System.out.println(hamTimeHash);\n\t\t// System.out.println(hamReplyHash);\n\t\t// System.out.println(hamNonCharNumHash);\n\t\t// System.out.println(spamSenderDomainHash);\n\t\t// System.out.println(spamTimeHash);\n\t\t// System.out.println(spamReplyHash);\n\t\t// System.out.println(spamNonCharNumHash);\n\t\t// System.out.println(spamContent);\n\t\t// System.out.println(hamContent);\n\n\t\t/* calculate probabilities */\n\t\tpHam = (double) numHam / (double) numFile;\n\t\tpSpam = (double) numSpam / (double) numFile;\n\t\t// System.out.println(numHam);\n\t\t// System.out.println(numSpam);\n\t\t// System.out.println(numFile);\n\n\t\tclassProb.put(\"hamProb\", pHam);\n\t\tclassProb.put(\"spamProb\", pSpam);\n\n\t\t/* get vocabulary and its length */\n\t\tString[] hamWord = hamContent.split(\"\\\\s+\");\n\t\tHashMap<String, Integer> hamWordFreq = new HashMap<String, Integer>();\n\t\tfor (int i = 0; i < hamWord.length; i++) {\n\t\t\tif (hamWordFreq.containsKey(hamWord[i]))\n\t\t\t\thamWordFreq.put(hamWord[i], hamWordFreq.get(hamWord[i]) + 1);\n\t\t\tif (!hamWordFreq.containsKey(hamWord[i]))\n\t\t\t\thamWordFreq.put(hamWord[i], 1);\n\t\t}\n\t\thamWordCount = hamWord.length;\n\t\tString[] spamWord = spamContent.split(\"\\\\s+\");\n\t\tHashMap<String, Integer> spamWordFreq = new HashMap<String, Integer>();\n\t\tfor (int i = 0; i < spamWord.length; i++) {\n\t\t\tif (spamWordFreq.containsKey(spamWord[i]))\n\t\t\t\tspamWordFreq\n\t\t\t\t\t\t.put(spamWord[i], spamWordFreq.get(spamWord[i]) + 1);\n\t\t\tif (!spamWordFreq.containsKey(spamWord[i]))\n\t\t\t\tspamWordFreq.put(spamWord[i], 1);\n\t\t}\n\t\tspamWordCount = spamWord.length;\n\t\tSystem.out.println(hamWordFreq.size());\n\t\tSystem.out.println(spamWordFreq.size());\n\t\tSystem.out.println(\"count get!!!\");\n\t\t// System.out.println(hamWordCount);\n\t\t// System.out.println(spamWordCount);\n\t\tfor (int i = 0; i < hamWordCount; i++) {\n\t\t\tif (!vocabulary.contains(hamWord[i]) && !hamWord[i].equals(\"\"))\n\t\t\t\tvocabulary.add(hamWord[i]);\n\t\t}\n\t\t// System.out.println(hamWordFreq);\n\t\tfor (int i = 0; i < spamWordCount; i++)\n\t\t\tif (!vocabulary.contains(spamWord[i]) && !spamWord[i].equals(\"\"))\n\t\t\t\tvocabulary.add(spamWord[i]);\n\t\tvocabLen = vocabulary.size();\n\t\tSystem.out.println(\"vocab init\");\n\t\t/* remove unnecessary words */\n\t\tfor (int i = 0; i < vocabulary.size(); i++) {\n\t\t\tint hamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\thamwordFreq = hamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\thamwordFreq = 0;\n\t\t\t}\n\t\t\tint spamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\tspamwordFreq = spamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\tspamwordFreq = 0;\n\t\t\t}\n\t\t\tif ((hamwordFreq <= 3) && (spamwordFreq <= 3)) {\n\t\t\t\tvocabulary.remove(i);\n\t\t\t\ti--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (((double) ((double) hamwordFreq / (double) hamWordCount) >= 0.005)\n\t\t\t\t\t&& ((double) ((double) spamwordFreq / (double) spamWordCount) >= 0.005)) {\n\t\t\t\t// System.out.println(vocabulary.get(i));\n\t\t\t\tvocabulary.remove(i);\n\t\t\t\ti--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"vocab complete!!!\");\n\t\tSystem.out.println(vocabulary.size());\n\t\tvocabLen = vocabulary.size();\n\t\tfor (int i = 0; i < vocabulary.size(); i++) {\n\t\t\tint hamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\thamwordFreq = hamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\thamwordFreq = 0;\n\t\t\t}\n\t\t\tint spamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\tspamwordFreq = spamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\tspamwordFreq = 0;\n\t\t\t}\n\t\t\thamWordProb.put(\n\t\t\t\t\tvocabulary.get(i),\n\t\t\t\t\tjava.lang.Math.log((double) (hamwordFreq + 1)\n\t\t\t\t\t\t\t/ (double) (hamWordCount + vocabLen)));\n\t\t\tspamWordProb.put(\n\t\t\t\t\tvocabulary.get(i),\n\t\t\t\t\tjava.lang.Math.log((double) (spamwordFreq + 1)\n\t\t\t\t\t\t\t/ (double) (spamWordCount + vocabLen)));\n\t\t\t// System.out.println(i);\n\n\t\t}\n\t\t// System.out.println(hamWordCount);\n\t\t// System.out.println(hamContent);\n\t\t// System.out.println(hamWordProb.size());\n\t\t// System.out.println(spamWordProb.size());\n\t\t// System.out.println(vocabulary.size());\n\t\t//\n\t\t// System.out.println(hamWordProb.size());\n\t\t// System.out.println(vocabulary);\n\t\t// System.out.println(vocabLen);\n\t\tSystem.out.println(\"word prob complete!!!\");\n\t}" ]
[ "0.57713157", "0.57362133", "0.53631324", "0.5171012", "0.5159594", "0.5019969", "0.49647185", "0.49232173", "0.49177969", "0.49060103", "0.48739144", "0.48335424", "0.48141503", "0.47976828", "0.4759222", "0.47372195", "0.47265813", "0.46710664", "0.4607795", "0.45763102", "0.45757467", "0.45701215", "0.45666885", "0.456218", "0.45609862", "0.45476252", "0.45374227", "0.45303217", "0.45264095", "0.45201406", "0.4516306", "0.44971618", "0.44964105", "0.44886628", "0.4487149", "0.44847468", "0.44675013", "0.44558695", "0.4453644", "0.44513142", "0.44483668", "0.44465855", "0.4437265", "0.4436792", "0.4428448", "0.4427341", "0.44198895", "0.4408423", "0.44074988", "0.43984982", "0.43950012", "0.43879244", "0.43856505", "0.43825492", "0.43784574", "0.43769607", "0.43760994", "0.43657944", "0.4360226", "0.4356588", "0.43549776", "0.4347137", "0.43389735", "0.4336914", "0.4319849", "0.43126732", "0.42849493", "0.42768404", "0.4274178", "0.4269528", "0.4265382", "0.4248137", "0.42388728", "0.4238673", "0.42289406", "0.42278683", "0.42267504", "0.42161605", "0.42150065", "0.4210246", "0.42101794", "0.4207092", "0.42059225", "0.4181367", "0.41780174", "0.41718474", "0.416988", "0.41623402", "0.41620412", "0.4161623", "0.4158541", "0.41475523", "0.41458955", "0.41401747", "0.41397607", "0.4138648", "0.41378126", "0.41365123", "0.41363856", "0.4136355" ]
0.66693926
0
Get size of the log file.
public Long sizeInKB() { return this.sizeInKB; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "public long size() {\n return file.length();\n }", "public long getFileSize()\n throws IOException\n {\n return file.length();\n }", "public static long size(File file) {\n\t\treturn file.length();\n\t}", "public long getFileSize();", "public long getFileSize();", "public long getLogSize() {\n\t\treturn Appender.SIZE_UNDEFINED;\n\t}", "long getFileSize();", "public final long getFileSize() {\n\t\treturn m_info.getSize();\n\t}", "public long getFileSize(){\n\t return new File(outputFileName).length();\n }", "private Long getFileSize() {\n\t\t// retornamos el tamano del fichero\n\t\treturn this.fileSize;\n\t}", "public long getSize() {\r\n return mFile.getSize();\r\n }", "public long size() {\n return this.filePage.getSizeInfile();\n }", "public int getLogFileSizeLimit() {\n return agentConfig.getLogFileSizeLimit();\n }", "public long length() {\n return _file.length();\n }", "long sizeInBytes() throws IOException;", "public long getFileSize() {\r\n\t\treturn dFileSize;\r\n\t}", "public long getFileSize() {\n return fileSize_;\n }", "public long getFileSize()\r\n {\r\n return lFileSize;\r\n }", "public long getFileSize() {\n\t\treturn mFileSize;\n\t}", "public long getSizeFromFile(File file) {\n\t\tlong size = 0;\n\t\tif (file != null) {\n\t\t\tsize = file.length();\n\t\t}\n\t\treturn size;\n\t}", "public long getFileSize() {\n return fileSize_;\n }", "public long getFileSize() {\r\n return fileSize;\r\n }", "long getFileLength(String path) throws IOException;", "public long getFileLength() {\n\n return fileLength;\n\n }", "long getSize() throws IOException;", "public static long getFileSize(String path) {\n if (path == null || path.isEmpty()) {\n return -1;\n }\n File file = new File(path);\n return (file.exists() && file.isFile() ? file.length() : -1);\n }", "public long getDbFileSize() {\r\n\tlong result = -1;\r\n\r\n\ttry {\r\n\t File dbFile = new File(fileName);\r\n\t if (dbFile.exists()) {\r\n\t\tresult = dbFile.length();\r\n\t }\r\n\t} catch (Exception e) {\r\n\t // nothing todo here\r\n\t}\r\n\r\n\treturn result;\r\n }", "public int getFileSize(){\n\t\treturn fileSize;\n\t}", "public final long length() throws IOException {\r\n\t\treturn f.length();\r\n\t}", "public long size() {\n try {\n return Files.size(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to get the size of staged document!\", e);\n }\n }", "public abstract long size() throws IOException;", "public long getFileSize() {\n return this.originalFileSize;\n }", "public String getFileSize() {\n return fileSize;\n }", "public final long getFileLength()\n\t\tthrows IOException {\n\t\t\n\t\t//\tGet the file length\n\t\t\n\t\tFile tempFile = new File(getTemporaryFile());\n\t\treturn tempFile.length();\n\t}", "public int getLogCollectionMaxFileSize();", "@Override\n public long size() {\n if (!isRegularFile()) {\n throw new IllegalStateException(\"not a regular file!\");\n }\n return this.fileSize;\n }", "public static long getFileSize(String filePath) {\n\t\treturn new File(filePath).length();\n\t}", "public long size(String path);", "public long getFileSize(String fileName)\n {\n long size = -1;\n\n File file = new File(fileLocation.getAbsolutePath() + File.separatorChar\n + fileName);\n\n if (file.isFile())\n {\n size = file.length();\n }\n\n return size;\n }", "public static long getFileSize(String fileName) {\n return new File(fileName).length();\n }", "@Override\n\tpublic long getSize()\n\t{\n\t\tif (size >= 0)\n\t\t{\n\t\t\treturn size;\n\t\t}\n\t\telse if (cachedContent != null)\n\t\t{\n\t\t\treturn cachedContent.length;\n\t\t}\n\t\telse if (dfos.isInMemory())\n\t\t{\n\t\t\treturn dfos.getData().length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn dfos.getFile().length();\n\t\t}\n\t}", "public long getFileSize(String filename) {\n\t\treturn 0;\n\t}", "public static int size_infos_log_src() {\n return (16 / 8);\n }", "public void determineFileSize() {\n \t//Creating scanner object\n \tScanner scan = new Scanner(System.in);\n \tSystem.out.println(\"Please enter the path of the file you'd like to determint the size of\");\n \t\n \t//Capturing file path as filePath variable\n \tString filePath = scan.next();\n \t//using Java Nio\n \tPath path = Paths.get(filePath);\n\t\t\n \ttry {\n\t\t\tLong fileSize = Files.size(path);\n\t\t\tSystem.out.println(String.format(\"%s, bytes\", fileSize));\n\t\t\tSystem.out.println(String.format(\"%s, kilobytes\", fileSize/1024));\n\n\t\t\t\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \tscan.close();\n \t\n }", "long getSize() throws IOException {\n return fileRWAccessSize.get();\n }", "long getSize() throws FileSystemException;", "@Override\n\tpublic long contentLength() throws IOException {\n\t\treturn Files.size(this.path);\n\t}", "public Integer getFileSize(Long key) {\n File file = new File(MUSIC_FILE_PATH + File.separator + key + \".mp3\");\n return (int)file.length();\n }", "static public int getMaxLogStoreSize() {\n return (null == logFileMaxSize) ? DEFAULT_logFileMaxSize : logFileMaxSize;\n }", "protected long getDataFileSize() throws IOException\r\n {\r\n long size = 0;\r\n\r\n storageLock.readLock().lock();\r\n\r\n try\r\n {\r\n if (dataFile != null)\r\n {\r\n size = dataFile.length();\r\n }\r\n }\r\n finally\r\n {\r\n storageLock.readLock().unlock();\r\n }\r\n\r\n return size;\r\n }", "public long getInstrumentedFileSize() {\n if (this.rewrittenFile != null) return this.rewrittenFile.length();\n else return -1;\n }", "private int getFileSize(File file) {\r\n\t\tFileInputStream fis = null;\r\n\t\ttry {\r\n\t\t\tfis = new FileInputStream(file);\r\n\t\t\tint size = fis.available();\r\n\t\t\tfis.close();\r\n\t\t\treturn size;\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "public int getSize()\n\t{\n\t\treturn bytes.length;\n\t}", "int getTransactionLogMaxSize() {\n\t\treturn transactionLog.getMaxSize();\n\t}", "public int size() {\n return bytes.length;\n }", "long getMaxFileSizeBytes();", "public static long getDownloadingFileSize() {\n\t\treturn downloadingFileSize;\n\t}", "public float getFileSize() {\n return fileSize_;\n }", "public long size() {\n\t\treturn size;\n\t}", "public long getSize() {\n\t\treturn size;\n\t}", "public long getSize()\n {\n return getLong(\"Size\");\n }", "@Override\n public synchronized long size(Path file) throws FileNotFoundException\n {\n File f = file.toFile(root);\n if (!f.exists() || f.isDirectory())\n throw new FileNotFoundException(\"File not found or is a directory\");\n return f.length(); \n }", "long getWorkfileSize();", "public Long sizeInBytes() {\n return this.sizeInBytes;\n }", "public long getSize() {\r\n\t\treturn size;\r\n\t}", "public int getFileSize (String filePath) throws RemoteException {\r\n\t\tint size;\r\n\t\tFile myFile = new File(filePath);\r\n\t\tsize = (int)myFile.length();\r\n\t\treturn size;\r\n\r\n\t\t\t\t\r\n\t}", "public int getSize() {\n\t\treturn smilFiles.size();\n\t}", "public long getMaximumFileLength() {\n return (httpFileUploadManager == null)\n ? 0 : httpFileUploadManager.getDefaultUploadService().getMaxFileSize();\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize();", "public float getFileSize() {\n return fileSize_;\n }", "public synchronized long size() {\n\t\treturn size;\n\t}", "long getSize();", "public long getSize() {\n return size;\n }", "public long getTxnSize() {\n return snapLog.getTotalLogSize();\n }", "public long getSize() {\r\n return size;\r\n }", "long getFileSize(String path) throws NotFoundException;", "public final long getSize() { return size; }", "public int size() {\n return files.size();\n }", "@ManagedAttribute(description = \"Size in bytes\")\n\tpublic long getSizeInBytes() {\n\t\ttry {\n\t\t\treturn store.estimateSize().bytes();\n\t\t} catch (IOException e) {\n\t\t\treturn -1;\n\t\t}\n\t}", "@XmlElement\n public long getFileSize() {\n return this.fileSize;\n }", "int getFileCount();", "public void showFileSize(long size);", "public long getMaximumFileSize()\r\n\t{\r\n\t\treturn maxFileSize;\r\n\t}", "public static long length(final String fileName) {\n\n return FileSystem.getInstance(fileName).length(fileName);\n }", "public java.lang.Integer getApplicationFileLength() {\r\n return applicationFileLength;\r\n }", "public int GetSize() {\n\t\tif(this.V == 0) {\n\t\t\t\n\t\t\t// Read from settings file\n\t\t\ttry {\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"settings.txt\"));\n\t\t\t\tString line;\n\t\t\t\tif((line = br.readLine()) != null) {\n\t\t\t\t\tthis.V = Integer.parseInt(line.split(\" \")[1]);\n\t\t\t\t}\n\t\t\t} catch(IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn this.V;\n\t}", "public Long getSize(Job job) {\n File dir = getFileDir(job);\n if (dir != null && dir.exists()) {\n return FileUtils.sizeOfDirectory(dir);\n } else {\n return 0L;\n }\n }", "public int getLengthInBytes()\n {\n return lengthInBytes;\n }", "synchronized final long getMaxFileSize() {\n return this.maxFileSize;\n }", "public int getRecordSize() {\n\t\treturn this.buffer.getRecordSize();\n\t\t}", "public final int getRecordSize()\n\t{\n\t\treturn tarBuffer.getRecordSize();\n\t}", "public long getSize() {\n return size.get();\n }", "public double fileSizeMB(String filePath) throws NumberFormatException, IOException {\n \tFile file = new File(filePath.replace(\"\\\\\", \"/\"));\n if(file.exists()) {\n // fileWriterPrinter(\"FILE SIZE: \" + file.length() + \" Bit\");\n // fileWriterPrinter(\"FILE SIZE: \" + file.length()/1024 + \" Kb\");\n fileWriterPrinter(\"FILE SIZE: \" + ((double) file.length()/(1024*1024)) + \" Mb\");\n return (double) file.length()/(1024*1024);\n } else { fileWriterPrinter(\"File doesn't exist\"); return 0; }\n \n }", "private Long computeSize(InputStreamWrapper stream) throws IOException {\n long size = 0;\n try (InputStream inStream = stream.getStream()) {\n byte[] buffer = new byte[1024 * 1024]; // 1MB\n int chunkBytesRead;\n while ((chunkBytesRead = inStream.read(buffer)) != -1) {\n size += chunkBytesRead;\n }\n }\n\n return size;\n }", "public int getLength() {\n return mySize.getLength();\n }" ]
[ "0.7482842", "0.7455372", "0.7303238", "0.7239331", "0.7154052", "0.7154052", "0.7106782", "0.70743304", "0.70683956", "0.7059132", "0.70067084", "0.69776654", "0.69516337", "0.6946751", "0.68871856", "0.68620294", "0.683643", "0.68110687", "0.680522", "0.67981625", "0.6782855", "0.6780667", "0.67632926", "0.6744869", "0.67314154", "0.6656798", "0.6628325", "0.66220653", "0.6621443", "0.66096777", "0.65631956", "0.65515846", "0.6542618", "0.6537715", "0.6536323", "0.65328413", "0.6517586", "0.65126383", "0.6509649", "0.65002954", "0.64978313", "0.64878", "0.6450056", "0.64490974", "0.6448156", "0.6431617", "0.6426092", "0.64150774", "0.6354268", "0.634311", "0.63262576", "0.63160443", "0.6283221", "0.62734455", "0.6236911", "0.62333345", "0.62087435", "0.62050325", "0.6202289", "0.6193486", "0.61910546", "0.6184678", "0.6182324", "0.61738926", "0.61657965", "0.6158493", "0.6155845", "0.6154152", "0.6150291", "0.61471075", "0.61471075", "0.61471075", "0.61471075", "0.6144596", "0.6141131", "0.611794", "0.61128676", "0.6109538", "0.6105375", "0.6094299", "0.60757047", "0.6060603", "0.6058141", "0.6046461", "0.60463434", "0.6041616", "0.60289294", "0.6028494", "0.6017198", "0.6016384", "0.60124487", "0.60023683", "0.599876", "0.5991996", "0.59865916", "0.59824467", "0.59706634", "0.5961284", "0.59602594", "0.5955987" ]
0.62676126
54
Set size of the log file.
public LogFileInner withSizeInKB(Long sizeInKB) { this.sizeInKB = sizeInKB; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLogCollectionMaxFileSize(int size);", "public void setLogFileSizeLimit(int logFileSizeLimit) {\n agentConfig.setLogFileSizeLimit(logFileSizeLimit);\n logConfigChanged();\n }", "public void setMaxLogSize(int size) {\n mEditLog.setMaxLogSize(size);\n }", "public void setFileSize(long fileSize)\r\n {\r\n lFileSize = fileSize;\r\n }", "public void setSize(TSizeInBytes size) {\n\n\t\tthis.size = size;\n\t}", "public void setSize(long size) {\r\n\t\tthis.size = size;\r\n\t}", "private void setFileSize(final Long fileSize) {\n\t\t// almacenamos el tamano del fichero\n\t\tthis.fileSize = fileSize;\n\t}", "public void setFileSize(long fileSize) {\n this.fileSize = fileSize;\n }", "private void set_size(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t}", "@Override\n public void setSize(final long size) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"324a1517-24fc-4321-b6db-b6298682fdff\");\n if (size < 0) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"7216d875-4e8a-4414-96cb-4aced232dd32\");\n throw new IllegalArgumentException(\"invalid entry size\");\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"7b4aac03-5acf-4fa5-b192-8b1ca4b2eb07\");\n this.size = size;\n }", "public void setMaxFileSize(int sINGLESIZE) {\n\t\t\r\n\t}", "public void setSize(long value) {\n this.size = value;\n }", "public MemoryLogger(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int _size)\r\n {\r\n size = _size;\r\n }", "public Builder setFileSize(long value) {\n \n fileSize_ = value;\n onChanged();\n return this;\n }", "public void setSize(String size) {\r\n //System.out.print(\"Setting Size...\");\r\n this.Size = size;\r\n }", "public void setLength(long newLength) throws IOException {\n flush();\n this.randomAccessFile.setLength(newLength);\n if (newLength < this.fileOffset) {\n this.fileOffset = newLength;\n }\n }", "@Override\n\tpublic void setBufferSize(int size) {\n\t}", "public void setSize(int size) {\r\n _size = size;\r\n }", "public void setSize(int size) {\n\t\t _size = size;\n\t}", "public void setFileSize(long fileSize) {\n \t\n \t// Check if the file size has changed\n \t\n \tif ( getFileSize() != fileSize) {\n \t\t\n \t\t// Update the file size\n \t\t\n \t\tsuper.setFileSize( fileSize);\n \t\t\n \t\t// Queue a low priority state update\n \t\t\n \t\tqueueLowPriorityUpdate( UpdateFileSize);\n \t}\n }", "public void setSize(int size) {\n\t\tif (size < 0) {\n\t\t throw new IllegalArgumentException(\"Log cache size can't be negative\");\n\t\t}\n\t\tint delta = this.size - size;\n\t\tthis.size = size;\n\t\tif (delta <= 0) {\n\t\t return;\n\t\t}\n\t\tif (messages.size() < size) {\n\t\t return;\n\t\t}\n\t\twhile (delta-- > 0) {\n\t\t messages.removeFirst();\n\t\t}\n\t}", "public void set_size(int s);", "static public void setMaxLogStoreSize(final int bytes) {\n // TODO: also check if bytes is bigger than remaining disk space?\n if (bytes >= 10000) {\n logFileMaxSize = bytes;\n }\n if (null != context) {\n SharedPreferences prefs = context.getSharedPreferences (SHARED_PREF_KEY, Context.MODE_PRIVATE);\n prefs.edit ().putInt (SHARED_PREF_KEY_logFileMaxSize, logFileMaxSize).commit();\n }\n }", "public void setSize(String size) {\n this.size = size;\n }", "public void setSize(int size){\n this.size = size;\n }", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\r\n this.size = size;\r\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setLogDiskSpaceLimit(int logDiskSpaceLimit) {\n agentConfig.setLogDiskSpaceLimit(logDiskSpaceLimit);\n logConfigChanged();\n }", "protected void setMaxSize(int size) {\n maxSize = size;\n }", "public void testSetSize_1()\n\t\tthrows Exception {\n\t\tFiles fixture = new Files();\n\t\tfixture.setAbsolutePath(\"\");\n\t\tfixture.setType(\"\");\n\t\tfixture.setReadable(\"\");\n\t\tfixture.setSize(\"\");\n\t\tfixture.setWritable(\"\");\n\t\tfixture.setExecutable(\"\");\n\t\tfixture.setMtime(\"\");\n\t\tString value = \"\";\n\n\t\tfixture.setSize(value);\n\n\t\t\n\t}", "public static void setRecorderVideoSize(Size size){\n\t}", "public void setSize(int size) {\n this.size = size;\n }", "public void setFileSize(String fileSize) {\n this.fileSize = fileSize;\n }", "public FileObject size(Integer size) {\n this.size = size;\n return this;\n }", "public com.autodesk.ws.avro.Call.Builder setObjectSize(java.lang.Long value) {\n validate(fields()[6], value);\n this.object_size = value;\n fieldSetFlags()[6] = true;\n return this; \n }", "public void setRecordSize(int recordSize)\r\n\t{\r\n\t\tthis.recordSize = recordSize;\r\n\t}", "public void setSize(String size) {\r\n this.size = size == null ? null : size.trim();\r\n }", "public TarArchiveEntry setEntrySize(long size) {\n if (size < 0) {\n throw new IllegalArgumentException(\"size is out of range: \" + size);\n }\n this.size = size;\n return this;\n }", "public synchronized void truncateFile(long siz) throws IOException {\n\t\tLock l = df.getReadLock();\n\t\tl.lock();\n\t\ttry {\n\t\t\tif (SDFSLogger.isDebug())\n\t\t\t\tSDFSLogger.getLog().debug(\"Truncating File\");\n\t\t\tif (siz < df.getMetaFile().length()) {\n\t\t\t\tdf.truncate(siz);\n\t\t\t\t/*\n\t\t\t\t * WritableCacheBuffer writeBuffer = df.getWriteBuffer(siz); int\n\t\t\t\t * endPos = (int) (siz - writeBuffer.getFilePosition());\n\t\t\t\t * DedupChunk nextDk = df.getHash(writeBuffer.getEndPosition() +\n\t\t\t\t * 1, false); while (nextDk != null) {\n\t\t\t\t * SDFSLogger.getLog().debug(\"Removing chunk at position \" +\n\t\t\t\t * nextDk.getFilePosition());\n\t\t\t\t * df.removeHash(nextDk.getFilePosition()); nextDk =\n\t\t\t\t * df.getHash(nextDk.getFilePosition() + nextDk.getLength() + 1,\n\t\t\t\t * true); } writeBuffer.truncate(endPos); //\n\t\t\t\t * df.writeCache(writeBuffer,true);\n\t\t\t\t */\n\n\t\t\t}\n\t\t\tdf.getMetaFile().setLastModified(System.currentTimeMillis());\n\t\t\tdf.getMetaFile().setLength(siz, true);\n\t\t} finally {\n\t\t\tl.unlock();\n\t\t}\n\t}", "@Override\n public void setAEBufferSize(int size) {\n if (size < 1000 || size > 1000000) {\n log.warning(\"ignoring unreasonable aeBufferSize of \" + size + \", choose a more reasonable size between 1000 and 1000000\");\n return;\n }\n this.aeBufferSize = size;\n prefs.putInt(\"CypressFX2.aeBufferSize\", aeBufferSize);\n }", "public void setSize(Integer size) {\n this.size = size;\n }", "public void setBufferSize(int size) {\n this.response.setBufferSize(size);\n }", "public void setSize(double size) \n {\n this.size = size;\n }", "void setStreamBuffer(int size) {\r\n\t\tif(size>0)\r\n\t\t\tbuffer = new byte[size];\r\n\t\telse\r\n\t\t\tbuffer = new byte[this.size];\r\n\t}", "public void setLocalSize(int size);", "public static void setDiskCacheSize(long size) {\n sDiskCacheSize = size;\n }", "public void setSize(int value) {\n\t\tthis.size = value;\n\t}", "private void setSize(FireSize size) throws InvalidFireSizeException {\n if (!isValidFireSize(size)) {\n throw new InvalidFireSizeException(String.format(\"\\\"%s\\\" isn't a valid fire size for a fire emergency.\", size));\n }\n this.size = size;\n }", "public synchronized void updateFileSize( long passedSize ){\n \n fileSize = passedSize;\n if( fileSize >= 0 && fileByteCounter >= fileSize )\n finishFileTransfer(); \n }", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final Builder size(long size) {\n this.size = size;\n return this;\n }", "public void setTargetFileSize(Long targetFileSize) {\n this.targetFileSize = targetFileSize;\n }", "public static void setLength(final RandomAccessFile file, final long newLength) throws IOException {\n\n try {\n trace(\"setLength\", null, file);\n file.setLength(newLength);\n }\n catch (final IOException e) {\n final long length = file.length();\n if (newLength < length) { throw e; }\n final long pos = file.getFilePointer();\n file.seek(length);\n long remaining = newLength - length;\n final int maxSize = 1024 * 1024;\n final int block = (int) Math.min(remaining, maxSize);\n final byte[] buffer = new byte[block];\n while (remaining > 0) {\n final int write = (int) Math.min(remaining, maxSize);\n file.write(buffer, 0, write);\n remaining -= write;\n }\n file.seek(pos);\n }\n }", "void setLogFile(File log);", "void setStatisticsHistorySize(int historySize);", "public Builder setFileSize(float value) {\n \n fileSize_ = value;\n onChanged();\n return this;\n }", "public void setSize(@Nullable String size) {\n this.size = size;\n }", "public abstract void adjustSize(long size);", "public void setSizeMessage(String sizeMessage) {\n\t\tthis.sizeMessage = sizeMessage;\n\t}", "void setTransactionLogMaxSize(int maxSize) {\n\t\ttransactionLog.setMaxSize(maxSize);\n\t\t\n\t\tif (maxSize == 0) {\n\t\t\ttransactionMonitor = null;\n\t\t} else {\n\t\t\ttransactionMonitor = new TransactionMonitor(transactionLog);\n\t\t}\n\t}", "private void setSize(int s){\n\t\tsize = s;\n\t}", "public void showFileSize(long size);", "void setBufferSize(int bufferSize);", "public void setContentLength(long contentLength)\r\n/* 175: */ {\r\n/* 176:260 */ set(\"Content-Length\", Long.toString(contentLength));\r\n/* 177: */ }", "public void setTotalMaxFileSize(int tOTALMAXSIZE) {\n\t\t\r\n\t}", "public void setSize(double s)\n\t{\n\t\tsize = s;\n\t}", "protected void setArraySize(int arraySize){\r\n\t \tthis.arraySize = arraySize;\r\n\t }", "private void setMemorySize() { }", "@Element \n public void setSize(String size) {\n this.size = size;\n }", "public void setKeySize(int keySize) {\n this.keySize = keySize;\n }", "public void setContentLength(Long contentLength) {\n\t\tif (!this.headerGenerated) {\n\t\t\tthis.contentLength = contentLength;\n\t\t}\n\t}", "public void set_fieldsize(AST fieldsize);", "@Override\n public void setBufferSize(int arg0) {\n\n }", "public void setSIZE(java.lang.String SIZE) {\n this.SIZE = SIZE;\n }", "public void setSize(int size) {\n\t members = size;\n\t}", "public void setSize(int size) {\n\tthis.sizeNumber = sizeNumber;\r\n}", "@Override\r\n\tpublic void setSequenceSize(int size) {\n\t\tthis.sequence = \"Sequence length: \"+size;\r\n\t\tupdate();\r\n\t}", "public void setAudiofileSize(java.lang.Integer value) {\r\n\t\tBase.set(this.model, this.getResource(), AUDIOFILESIZE, value);\r\n\t}", "@Override\n\tpublic void setLen(ByteBuffer fileBytes) {\n\t\tthis.len = fileBytes.getInt();\n\t}", "public void setSize(int size);", "public void open() {\r\n if (mFailedOpen) {\r\n return;\r\n }\r\n\r\n File base = new File(mBaseFileName);\r\n if (mMaxLogSizeBytes > 0 && base.length() > (mMaxLogSizeBytes / mNumSegments - 1024)) {\r\n Log.d(LOG_TAG, \"Log file exceeds maximum size\");\r\n close();\r\n renameLogs();\r\n open();\r\n } else if (mCurrentFileStream == null) {\r\n try {\r\n mCurrentFileStream = new FileOutputStream(mBaseFileName, true);\r\n } catch (FileNotFoundException e) {\r\n Log.e(LOG_TAG, \"Could not open log file \" + e.getMessage());\r\n mFailedOpen = true;\r\n mCurrentFileStream = null;\r\n }\r\n }\r\n }", "@Override\n\tpublic void SetLength(long value)\n\t{\n\t\tthrow new UnsupportedOperationException(\"TarInputStream SetLength not supported\");\n\t}", "public void setMaxFileSize(String value)\r\n\t{\r\n\t\tmaxFileSize = OptionConverter.toFileSize(value, maxFileSize + 1);\r\n\t}", "public Builder setMaxUploadSizeInBytes(long value) {\n \n maxUploadSizeInBytes_ = value;\n onChanged();\n return this;\n }", "public void updateRecordCurrentSize(final Record record) {\n String recordPath = getPathForRecord(record);\n File recordFolder = new File(recordPath);\n if (recordFolder.exists()) {\n File[] recordFiles = recordFolder.listFiles();\n long totalSizeKB = 0;\n for (File eachRecordFile : recordFiles) {\n totalSizeKB += (eachRecordFile.length() / 1024);\n }\n record.recordSizeKB = totalSizeKB;\n record.totalSizeKB = Math.max(record.totalSizeKB, record.recordSizeKB);\n }\n }", "public void setSize(VideoSize size) {\n this.size = size;\n }", "public void setSize(String size) {\n\t\tthrow new UnsupportedOperationException(\"readonly\");\n\t}", "void setLength( long length );", "public void setSize(int newSize);", "public void setSize(int newSize);", "public void setSizeV(long s){\n\t\tthis.sizeV = s;\n\t}", "public long getLogSize() {\n\t\treturn Appender.SIZE_UNDEFINED;\n\t}", "public void setGameSize(int size) throws ConfigurationException {\n\t\tif (size < MINIMAL_SIZE || size > MAXIMAL_SIZE) {\n\t\t\tthrow ConfigurationException.wrongSizeBounds(MINIMAL_SIZE, MAXIMAL_SIZE, size);\n\t\t}\n\t\tgameSize = size;\n\t}", "public void initialize(int size) {\n setMaxSize(size);\n }", "public static void setupElementLogger(String elementId, long logSize) throws IOException {\n\t\tint maxFileSize = (int) (logSize * 1_000_000); \n\t\tint logFileCount = Math.round(logSize);\n\t\tfinal File logDirectory = new File(Configuration.getLogDiskDirectory());\n\n\t\tlogDirectory.mkdirs();\n\n\t\tUserPrincipalLookupService lookupservice = FileSystems.getDefault().getUserPrincipalLookupService();\n\t\tfinal GroupPrincipal group = lookupservice.lookupPrincipalByGroupName(\"iofog\");\n\t\tFiles.getFileAttributeView(logDirectory.toPath(), PosixFileAttributeView.class,\n\t\t\t\tLinkOption.NOFOLLOW_LINKS).setGroup(group);\n\t\tSet<PosixFilePermission> perms = PosixFilePermissions.fromString(\"rwxrwx---\");\n\t\tFiles.setPosixFilePermissions(logDirectory.toPath(), perms);\n\n\t\tfinal String logFilePattern = logDirectory.getPath() + \"/\" + elementId + \".%g.log\";\n\t\tLogger logger = elementLogger.get(elementId);\n\t\t\n\t\tif (logger != null) {\n\t\t\tfor (Handler f : logger.getHandlers())\n\t\t\t\tf.close();\n\t\t} \n\t\t\n\t\tHandler logFileHandler = new FileHandler(logFilePattern, maxFileSize / logFileCount, logFileCount);\n\t\n\t\tlogFileHandler.setFormatter(new LogFormatter());\n\t\n\t\tlogger = Logger.getLogger(elementId);\n\t\tlogger.addHandler(logFileHandler);\n\n\t\tlogger.setUseParentHandlers(false);\n\n\t\telementLogger.put(elementId, logger);\n\t}" ]
[ "0.7295174", "0.6978789", "0.69163173", "0.6853997", "0.665501", "0.66449183", "0.66301346", "0.6616974", "0.6609586", "0.6567497", "0.64654887", "0.6337932", "0.63299626", "0.63242394", "0.6323389", "0.62928444", "0.6283385", "0.624703", "0.6234269", "0.62071717", "0.61992574", "0.6188463", "0.6178585", "0.615436", "0.6120744", "0.6116364", "0.6113126", "0.6113126", "0.6113126", "0.6113126", "0.61073023", "0.61016625", "0.61016625", "0.6075673", "0.6073786", "0.60579765", "0.6051924", "0.6051517", "0.60244226", "0.60211366", "0.5995806", "0.5986316", "0.5971168", "0.5928762", "0.5916531", "0.59122413", "0.59117997", "0.5904074", "0.59035045", "0.5861812", "0.58594143", "0.58436704", "0.58309126", "0.58229697", "0.5794133", "0.57910573", "0.5774365", "0.57717294", "0.5771138", "0.5749349", "0.57424855", "0.5733253", "0.57209086", "0.57131886", "0.5710113", "0.57029873", "0.5684119", "0.5680262", "0.5672527", "0.56498736", "0.56429654", "0.5637175", "0.56307554", "0.562996", "0.56269526", "0.5626624", "0.5624467", "0.5606343", "0.5576741", "0.556241", "0.5560024", "0.55575037", "0.55343497", "0.55343336", "0.55264753", "0.5514454", "0.55063725", "0.55045867", "0.54926276", "0.5492041", "0.5483788", "0.5468256", "0.5449677", "0.5449542", "0.5449542", "0.54416674", "0.5436835", "0.54270935", "0.54247963", "0.54148716" ]
0.6344874
11
Get creation timestamp of the log file.
public DateTime createdTime() { return this.createdTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DateTime getCreatedTimestamp() {\n\t\treturn getDateTime(\"sys_created_on\");\n\t}", "long getCreationTime();", "long getCreationTime();", "long getCreationTime();", "public long getCreationTime();", "public BundleTimestamp creation_ts() {\r\n\t\treturn creation_ts_;\r\n\t}", "public long getCreationTime() {\n return creationTime_;\n }", "public Long getCreationTimestamp() {\n return creationTimestamp;\n }", "public long getCreationTime() {\n return creationTime_;\n }", "long getCreationTime(String path) throws IOException;", "public long getCreationTime()\n {\n return m_metaInf.getCreationTime();\n }", "public long getCreationTime() {\n return creationTime;\n }", "public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}", "public Date getCreateTimestamp() {\r\n return createTimestamp;\r\n }", "public Date getCreateTimestamp() {\n return createTimestamp;\n }", "@ZAttr(id=790)\n public Date getCreateTimestamp() {\n return getGeneralizedTimeAttr(Provisioning.A_zimbraCreateTimestamp, null);\n }", "public long getCreationTime() {\n return this.creationTime;\n }", "public static String timestamp() {\n\t\tString t = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\").format(new Date());\n\t\t// File f=new\n\t\t// File(String.format(\"%s.%s\",t,RandomStringUtils.randomAlphanumeric(8)));\n\t\tSystem.out.println(\"Time is :\" + t);\n\t\treturn t;\n\t}", "long getCreationTimeUtc(String path) throws IOException;", "public java.util.Date getCreationTimestamp() {\n return this.creationTimestamp;\n }", "@DISPID(110)\r\n\t// = 0x6e. The runtime will prefer the VTID if present\r\n\t@VTID(105)\r\n\tjava.util.Date creationDateTime();", "String timeCreated();", "public Date getCreationTime() {\n\n\t\treturn createdAtTime;\n\t}", "public Date getCreationTime() {\n\t\treturn creationTime;\n\t}", "public static String getPrintToFileTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd_HHmmss\");\n return sdf.format(System.currentTimeMillis());\n }", "public long getCreateTime() {\n return createTime_;\n }", "long getCreatedTime();", "public long getCreateTime() {\n return createTime_;\n }", "public Date getCreationTime()\n\t{\n\t\treturn creationTime;\n\t}", "public long getCreatedMillis()\n {\n return m_dtCreated;\n }", "public static String getTimestamp() {\r\n\t\t\r\n\t\treturn new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t}", "@Override\n\tpublic long getCreationTime() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long getCreationTime() {\n\t\treturn 0;\n\t}", "public Date getCreationTime() {\n return creationTime;\n }", "public Timestamp getCreated();", "public Timestamp getCreated();", "public Timestamp getCreated();", "public Timestamp getCreated();", "public Timestamp getCreated();", "public Timestamp getCreated();", "public Timestamp getCreated();", "public Timestamp getCreated();", "public Timestamp getCreated();", "public Timestamp getCreated();", "public Timestamp getCreated();", "public Timestamp getCreated();", "public Timestamp getCreated();", "public Date getCreationDate() {\n return m_module.getConfiguration().getCreationDate();\n }", "public DateTime getCreatedTimestamp() {\n\t\treturn this.createdTimestamp;\n\t}", "public long getCreationTimeSeconds() {\n return creationTimeSeconds;\n }", "public long getCreateTime() {\n return this.createTime;\n }", "public int getCreateTime() {\n return createTime_;\n }", "public Date getCreationTime() {\n return creationTime;\n }", "public Date getCreationTime() {\n return creationTime;\n }", "public int getCreateTime() {\n return createTime_;\n }", "public Long getCreateTime() {\n\t\treturn createTime;\n\t}", "public LocalDateTime getCreationTime() {\n\t\treturn creationTime;\n\t}", "@ZAttr(id=790)\n public String getCreateTimestampAsString() {\n return getAttr(Provisioning.A_zimbraCreateTimestamp, null);\n }", "public int getCreatedTime() {\n return instance.getCreatedTime();\n }", "public Timestamp getCreateTime() {\n return createTime;\n }", "public String getCreatetime() {\n\t\treturn createtime;\n\t}", "public String getCreatetime() {\n\t\treturn createtime;\n\t}", "public long getCreationDate() {\n return creationDate_;\n }", "public java.lang.String getCreatetime () {\n\t\treturn createtime;\n\t}", "public Instant getCreationTime() {\n return creation;\n }", "public java.sql.Timestamp getCreated() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.sql.Timestamp) __getCache(\"created\")));\n }", "public DateTime creationTime() {\n return this.creationTime;\n }", "public static String createTimeStamp(){\n return new SimpleDateFormat( \"yyyy.MM.dd.HH.mm.ss\").format(new Date());\n }", "public java.util.Date getCreationTime() {\n return this.creationTime;\n }", "public java.util.Date getCreationTime() {\n return this.creationTime;\n }", "public java.util.Date getCreationTime() {\n return this.creationTime;\n }", "public Long getCreatetime() {\n return createtime;\n }", "public long getCreatedTime() {\n return createdTime;\n }", "public String getCreateTime() {\r\n\t\treturn createTime;\r\n\t}", "public String getCreateTime() {\r\n\t\treturn createTime;\r\n\t}", "public String getCreateTime() {\r\n\t\treturn createTime;\r\n\t}", "public String getCreateTime() {\r\n\t\treturn createTime;\r\n\t}", "public Long getTimeCreated() {\r\n\t\treturn timeCreated;\r\n\t}", "public Date getCreationTime()\n {\n return created;\n }", "public Long getCreateTime() {\n return createTime;\n }", "public Date getCreateTime() {\n\t\treturn this.createTime;\n\t}", "@Nonnull\n @CheckReturnValue\n default OffsetDateTime creationTime() {\n return Utils.creationTimeOf(idAsLong());\n }", "public java.sql.Timestamp getLastModified() {\r\n\t\treturn new java.sql.Timestamp(file.lastModified());\r\n\t}", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getCreateTime() {\n return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;\n }", "public DateTime getCreationTime() { return creationTime; }", "public DateTime getCreationTime() {\n return created;\n }", "public abstract long getCreatedTime();", "public String getCreateTime() {\r\n return createTime;\r\n }", "Date getDateCreated();", "public int getCreatedTime() {\n return createdTime_;\n }", "long getCreateTime();", "long getCreateTime();", "public Timestamp getCreated() {\n return created;\n }", "public Date getCreateTime() {\r\n\t\treturn createTime;\r\n\t}", "public Date getCreateTime() {\r\n\t\treturn createTime;\r\n\t}", "public long getCreationDate() {\n return creationDate_;\n }", "public Date getCreateTime() {\n\t\treturn createTime;\n\t}", "public Date getCreateTime() {\n\t\treturn createTime;\n\t}", "public Date getCreateTime() {\n\t\treturn createTime;\n\t}", "public Date getCreateTime() {\n\t\treturn createTime;\n\t}" ]
[ "0.6676509", "0.6643545", "0.6643545", "0.6643545", "0.6614783", "0.65313834", "0.6522318", "0.6513693", "0.6497626", "0.64620906", "0.6430085", "0.64084715", "0.6372423", "0.6319247", "0.62874734", "0.6277673", "0.6276816", "0.6273653", "0.62406397", "0.61992896", "0.6190787", "0.6181882", "0.61521786", "0.6148926", "0.6147927", "0.6143509", "0.614263", "0.61388254", "0.613635", "0.6125219", "0.6112771", "0.608171", "0.608171", "0.6076541", "0.60382205", "0.60382205", "0.60382205", "0.60382205", "0.60382205", "0.60382205", "0.60382205", "0.60382205", "0.60382205", "0.60382205", "0.60382205", "0.60382205", "0.60382205", "0.60360867", "0.60358196", "0.60271704", "0.60189885", "0.6012615", "0.60105056", "0.60105056", "0.6005319", "0.59770924", "0.5977068", "0.5970829", "0.5942039", "0.593078", "0.59235644", "0.59235644", "0.59209025", "0.5914862", "0.591144", "0.5908762", "0.5897111", "0.5892467", "0.5889105", "0.5889105", "0.5889105", "0.5878973", "0.5877243", "0.58680755", "0.58680755", "0.58680755", "0.58680755", "0.58669883", "0.5863147", "0.586267", "0.586202", "0.58613163", "0.58593285", "0.58460945", "0.58460945", "0.5839524", "0.5836621", "0.58346474", "0.5832919", "0.5832078", "0.58275765", "0.58227867", "0.58227867", "0.5821184", "0.58209586", "0.58209586", "0.5820896", "0.5819348", "0.5819348", "0.5819348", "0.5819348" ]
0.0
-1
Get last modified timestamp of the log file.
public DateTime lastModifiedTime() { return this.lastModifiedTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.sql.Timestamp getLastModified() {\r\n\t\treturn new java.sql.Timestamp(file.lastModified());\r\n\t}", "public Date getLastModified() {\n\t\treturn new Date(file.lastModified());\n\t}", "long getLastModifiedTime() throws FileSystemException;", "public Timestamp getLastModified() {\r\n\t\treturn lastModified;\r\n\t}", "public final Date getLastModifiedAt( )\n\t{\n\t\treturn new Date( this.data.getLong( \"lastModifiedAt\" ) );\n\t}", "public Long getLastModifiedTime() {\n return this.lastModifiedTime;\n }", "public long getLastModified()\n\t{\n\t\treturn lastModified;\n\t}", "public Date getLastmodifieddate() {\n return lastmodifieddate;\n }", "public Long getLastModifiedDate()\r\n\t{\r\n\t\treturn lastModifiedDate;\r\n\t}", "public Integer getLastmodifiedTime() {\r\n return lastmodifiedTime;\r\n }", "public long lastModified() {\n return _file.lastModified();\n }", "public long getLastModified()\n {\n return( lastModified );\n }", "public long getLastModified() { return lastModified; }", "public long getLastModified() {\n return lastModified;\n }", "public Timestamp getLastModifiedByTimestamp() {\n\t\treturn new Timestamp(this.lastModifiedByTimestamp.getTime());\n\t}", "public Date getLastModified() {\n\t\treturn header.getDate(HttpHeader.LAST_MODIFIED);\n\t}", "String getLastModified();", "public Timestamp getLastModifiedOn() {\r\n\t\treturn lastModifiedOn;\r\n\t}", "public Date getLastModifyTime() {\n return lastModifyTime;\n }", "public Date getLastModifiedDate() {\n\t\treturn this.lastModifiedDate;\n\t\t\n\t}", "public java.util.Date getLastModifiedTime() {\n return this.lastModifiedTime;\n }", "public java.util.Date getLastModifiedTime() {\n return this.lastModifiedTime;\n }", "public Date getLastModified() {\n return _lastModified;\n }", "long getLastUpdatedTime();", "public abstract long getLastModified();", "public long getLastModified() throws RepositoryException {\n return this.contentFile.lastModified();\n }", "public String getLastModifiedDate() {\r\n\t\treturn lastModifiedDate;\r\n\t}", "public String getLastModified()\n {\n return lastModified;\n }", "long getLastWriteTime(String path) throws IOException;", "public java.util.Date getLastModified () {\r\n\t\treturn lastModified;\r\n\t}", "@Override\n public long getLastModifiedTime() {\n return this.processor.getLastModifiedTime();\n }", "public long getLastModified() { return _entry!=null? _entry.getLastModified() : 0; }", "private static File getLastModifiedFile(File logDir) {\n File[] files = logDir.listFiles();\n if (files == null) {\n Log.e(LOG_TAG, \"getLastModifiedFile(): This file dir is invalid. logDir= \" + logDir.getAbsolutePath());\n return null;\n }\n //Create a new file if no file exists in this folder\n if (files.length == 0) {\n File file = new File(logDir, fileNameFormat.format(new Date()) + \".txt\");\n return file;\n }\n\n //Find the last modified file\n long lastModifiedTime = 0;\n File lastModifiedFile = null;\n for (File f : files) {\n if (lastModifiedTime <= f.lastModified()) {\n lastModifiedTime = f.lastModified();\n lastModifiedFile = f;\n }\n }\n return lastModifiedFile;\n }", "public Timestamp getLastLogintime() {\n return lastLogintime;\n }", "long getLastAccessedTime();", "@Override\n\tpublic long lastModified() throws IOException {\n\t\t// We can not use the superclass method since it uses conversion to a File and\n\t\t// only a Path on the default file system can be converted to a File...\n\t\treturn Files.getLastModifiedTime(this.path).toMillis();\n\t}", "public long getLastModified(){\n\t\tDate lastMod;\n\t\tIterator<ArrayList<String>> i = headerLines.iterator();\n\t\twhile(i.hasNext()){\n\t\t\tArrayList<String> headerLines = i.next();\n\t\t\tString headerName = headerLines.get(0);\n\t\t\tif (headerName.matches(\"Last-Modified:\")){\n\t\t\t\tString headerData = headerLines.get(1);\n\t\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"E, dd MMM yyyy HH:mm:ss z\");\n\t\t\t\ttry {\n\t\t\t\t\tlastMod = dateFormat.parse(headerData.trim());\n\t\t\t\t\treturn lastMod.getTime();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn (long) -1;\n\t}", "public long getLastModified()\r\n/* 283: */ {\r\n/* 284:424 */ return getFirstDate(\"Last-Modified\");\r\n/* 285: */ }", "public static long getLastModified(final String fileName) {\n\n return FileSystem.getInstance(fileName).getLastModified(fileName);\n }", "public com.google.protobuf.Timestamp getLastModifiedAt() {\n if (lastModifiedAtBuilder_ == null) {\n return lastModifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastModifiedAt_;\n } else {\n return lastModifiedAtBuilder_.getMessage();\n }\n }", "public Date getLastModifiedDate() {\n return lastModifiedDate != null ? new Date(lastModifiedDate.getTime()) : null;\n }", "public String getLastModified() {\n return lastModified;\n }", "@Override\n public long getModificationTime() {\n if (exists()) {\n try {\n if (((Node)item).hasProperty(JcrConstants.JCR_LASTMODIFIED)) {\n return ((Node)item).getProperty(JcrConstants.JCR_LASTMODIFIED).getLong();\n }\n } catch (RepositoryException e) {\n log.warn(\"Error while accessing jcr:lastModified property\");\n }\n }\n // fallback: return 'now'\n return new Date().getTime();\n }", "public Date getLastlogintime() {\n return lastlogintime;\n }", "long getLastWriteTimeUtc(String path) throws IOException;", "public LocalDateTime getLastModified() {\n return lastModified;\n }", "public static long getModifiedDate(String filename) {\n boolean fromJar = filename.startsWith(jarPrefix());\n return fromJar ? 0 : new File(filename).lastModified();\n }", "public java.util.Date getLastModifiedDate() {\n return this.lastModifiedDate;\n }", "public long getLastModify() {\r\n\t\treturn lastModify;\r\n\t}", "@java.lang.Override\n public com.google.protobuf.Timestamp getLastModifiedAt() {\n return lastModifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastModifiedAt_;\n }", "public java.util.Date getLastModifiedDateTime() {\n return this.lastModifiedDateTime;\n }", "public long getLastUpdateDate() {\n return (Long)content.get(LAST_UPDATE_DATE);\n }", "long getLastAccessTime(String path) throws IOException;", "public Date getLastModifyDate() {\n return lastModifyDate;\n }", "public long getLastModified(Object templateSource)\r\n/* 60: */ {\r\n/* 61:89 */ Resource resource = (Resource)templateSource;\r\n/* 62: */ try\r\n/* 63: */ {\r\n/* 64:91 */ return resource.lastModified();\r\n/* 65: */ }\r\n/* 66: */ catch (IOException ex)\r\n/* 67: */ {\r\n/* 68:94 */ if (this.logger.isDebugEnabled()) {\r\n/* 69:95 */ this.logger.debug(\"Could not obtain last-modified timestamp for FreeMarker template in \" + \r\n/* 70:96 */ resource + \": \" + ex);\r\n/* 71: */ }\r\n/* 72: */ }\r\n/* 73:98 */ return -1L;\r\n/* 74: */ }", "public Date getLastModified ()\n throws ContentObjectException \n {\n try\n {\n final String METHOD_NAME = \"getLastModified\";\n this.logDebug(METHOD_NAME + \": 1/2: Started\");\n this.ensureDbHelper();\n ResultSet resultSet =\n this.dbHelper.queryDatum(this.type, this.id, DbColumn.LAST_MODIFIED);\n if ( ! resultSet.next() )\n throw new SQLException\n (this.getIdentification() + \": \" + METHOD_NAME + \": Empty ResultSet\");\n Date lastModified = resultSet.getTimestamp(DbColumn.LAST_MODIFIED);\n this.logDebug(METHOD_NAME + \": 2/2: Done. lastModified = \" + lastModified);\n return lastModified;\n }\n catch (Exception exception)\n {\n throw new ContentObjectException(exception);\n }\n }", "public long getLastUpdatedTime() {\n return lastUpdatedTime;\n }", "public long modified() {\n return lastModified;\n }", "public long getLastUpdateTs() {\n return lastUpdateTs;\n }", "Date getWorkfileLastChangedDate();", "alluxio.proto.journal.File.InodeLastModificationTimeEntry getInodeLastModificationTime();", "public alluxio.proto.journal.File.InodeLastModificationTimeEntry getInodeLastModificationTime() {\n if (inodeLastModificationTimeBuilder_ == null) {\n return inodeLastModificationTime_;\n } else {\n return inodeLastModificationTimeBuilder_.getMessage();\n }\n }", "public java.lang.CharSequence getLASTMODIFIEDDT() {\n return LAST_MODIFIED_DT;\n }", "public java.lang.CharSequence getLASTMODIFIEDDT() {\n return LAST_MODIFIED_DT;\n }", "public java.util.Calendar getLastModifiedDate() {\r\n return lastModifiedDate;\r\n }", "public java.util.Calendar getLastModifiedDate() {\n return lastModifiedDate;\n }", "public Long getLastModifiedUser() {\n\t\treturn this.lastModifiedUser;\n\t\t\n\t}", "public Date getModifiedTime() {\n return modifiedTime;\n }", "long getLastAccessTimeUtc(String path) throws IOException;", "public java.time.ZonedDateTime getLastModifiedAt() {\n return this.lastModifiedAt;\n }", "public java.time.ZonedDateTime getLastModifiedAt() {\n return this.lastModifiedAt;\n }", "long getLastModifiedDate(String path) throws NotFoundException;", "public Timestamp getLastUpdatedDate() {\n return (Timestamp) getAttributeInternal(LASTUPDATEDDATE);\n }", "public abstract Date getLastModified() throws AccessException;", "public InstantFilter getLastModifiedDate() {\n\t\treturn lastModifiedDate;\n\t}", "public long getLastAccessTime();", "public java.lang.String getLastChangedTime() {\n\t\treturn lastChangedTime;\n\t}", "public String getLastmodifiedTimeView() {\r\n if (lastmodifiedTime != null) {\r\n lastmodifiedTimeView = DateUtils.dateToStr(lastmodifiedTime, DateUtils.YMD_DASH);\r\n }\r\n return lastmodifiedTimeView;\r\n }", "public static long getLastModified(String path) {\n if (HttpUtils.isRemoteURL(path)) {\n String resp = null;\n try {\n URL url = HttpUtils.createURL(path);\n if (path.startsWith(\"ftp:\")) {\n String host = url.getHost();\n FTPClient ftp = FTPUtils.connect(host, url.getUserInfo(), new UserPasswordInputImpl());\n ftp.pasv();\n FTPReply reply = ftp.executeCommand(\"MDTM \" + url.getPath());\n resp = reply.getReplyString();\n return ftpDateFormat.parse(resp).getTime();\n } else {\n return HttpUtils.getInstance().getLastModified(url);\n }\n\n } catch (MalformedURLException e) {\n log.error(\"Malformed url \" + path, e);\n } catch (IOException e) {\n log.error(\"Error getting modified date for \" + path, e);\n } catch (ParseException e) {\n log.error(\"Error parsing Last-Modified \" + resp, e);\n } catch (NumberFormatException e) {\n log.error(\"Error parsing Last-Modified \" + resp, e);\n }\n return 0;\n\n } else {\n File f = new File(path);\n return f.exists() ? f.lastModified() : 0;\n }\n }", "public String getTheLastModificationDate(final Document resource) throws Exception {\r\n\r\n // get last-modification-date\r\n NamedNodeMap atts = resource.getDocumentElement().getAttributes();\r\n Node lastModificationDateNode = atts.getNamedItem(\"last-modification-date\");\r\n return (lastModificationDateNode.getNodeValue());\r\n\r\n }", "public Time lastModifiedTime()\n\t{\n\t\tResource resource = getResource();\n\t\tif (resource instanceof IModifiable)\n\t\t{\n\t\t\treturn ((IModifiable)resource).lastModifiedTime();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "public Timestamp getModifiedDate() {\r\n return (Timestamp) getAttributeInternal(MODIFIEDDATE);\r\n }", "public String getModifiedTime() {\n return modifiedTime;\n }", "public java.util.Date getLastModificationTime() {\n return this.lastModificationTime;\n }", "public long getModificationTime()\n {\n return modDate * 1000L;\n }", "public java.util.Calendar getLastModified() {\n return localLastModified;\n }", "@java.lang.Override\n public com.google.protobuf.TimestampOrBuilder getLastModifiedAtOrBuilder() {\n return getLastModifiedAt();\n }", "public Date getLastModifiedDate() {\n\n\t\tDate lastTransactionDate = null;\n\t\tfor ( ErpTransactionModel transaction : sale.getTransactions() ) {\n\t\t\tif (lastTransactionDate == null || lastTransactionDate.before(transaction.getTransactionDate())) {\n\t\t\t\tlastTransactionDate = transaction.getTransactionDate();\n\t\t\t}\n\t\t}\n\t\treturn lastTransactionDate;\n\t}", "public Timestamp getLastUpdated() {\n return lastUpdated;\n }", "@Override\n\tpublic synchronized Date getLastUpdate() {\n\t\treturn getDiskLastModifiedDate();\n\t}", "public long getLastWriteTime() {\n return LAST_WRITE_TIME;\n }", "public String getLastModifiedBy() {\n return this.lastModifiedBy;\n }", "@XmlElement\n @Nullable\n public String getFileLastModified() {\n return this.fileLastModified;\n }", "public String getLastModifiedBy() {\n\t\treturn this.lastModifiedBy;\n\t}", "long getLastAccessed( );", "public alluxio.proto.journal.File.InodeLastModificationTimeEntry getInodeLastModificationTime() {\n return inodeLastModificationTime_;\n }", "public String getDatemodified() {\n\t\treturn datemodified;\n\t}", "@java.lang.Override\n public long getModifiedTimestamp() {\n return modifiedTimestamp_;\n }", "public Date getModificationTime() {\n\n\t\treturn lastModificationAtTime;\n\t}", "@ApiModelProperty(required = true, value = \"The date this file was last modified in ISO 8601 format.\")\n public DateTime getLastModified() {\n return lastModified;\n }" ]
[ "0.77353126", "0.7573152", "0.7226913", "0.7108754", "0.7091353", "0.7064178", "0.7032357", "0.6937787", "0.6934109", "0.6919915", "0.69191045", "0.6913278", "0.6909998", "0.68976325", "0.6887946", "0.68832844", "0.68669546", "0.68404675", "0.68191946", "0.6819051", "0.68038034", "0.68038034", "0.6791989", "0.6781533", "0.67616343", "0.67279774", "0.6720302", "0.6712655", "0.66937923", "0.6686722", "0.66831046", "0.6682578", "0.667688", "0.6663738", "0.66564703", "0.66564554", "0.66546327", "0.66536653", "0.6647636", "0.6611272", "0.66006655", "0.6594093", "0.6585157", "0.656211", "0.65593076", "0.6551655", "0.6526014", "0.65164065", "0.6504397", "0.64908785", "0.6482141", "0.6469964", "0.6408443", "0.6398044", "0.6396623", "0.63949496", "0.6386264", "0.6386076", "0.6381983", "0.6367046", "0.6366528", "0.6364534", "0.6358525", "0.6329912", "0.63101995", "0.6290364", "0.6287622", "0.6274287", "0.62541074", "0.6251998", "0.6251998", "0.6244344", "0.62308013", "0.62227285", "0.62222946", "0.6220356", "0.621199", "0.62119263", "0.6191951", "0.6170723", "0.61682117", "0.6165105", "0.6139567", "0.6130634", "0.6119562", "0.6113682", "0.61121017", "0.6104966", "0.6098316", "0.60916555", "0.6084915", "0.6078101", "0.6066569", "0.60646564", "0.60620344", "0.60541856", "0.60472244", "0.60420656", "0.6023921", "0.60116154" ]
0.612528
84
Get type of the log file.
public String logFileType() { return this.logFileType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getFiletype() {\n return filetype;\n }", "public String getFiletype() {\n return filetype;\n }", "public String getFILE_TYPE() {\r\n return FILE_TYPE;\r\n }", "public String getFileType(){\n\t\treturn type;\n\t}", "public String getType()\n {\n return VFS.FILE_TYPE;\n }", "public String getFileType() {\n return fileType;\n }", "public int getLogType(int index)\n {\n return m_Log.get(index).getType();\n }", "protected FileType doGetType()\n {\n return m_type;\n }", "public FileType getFileType() {\n return fileType;\n }", "private String getTypeFromExtension()\n {\n String filename = getFileName();\n String ext = \"\";\n\n if (filename != null && filename.length() > 0)\n {\n int index = filename.lastIndexOf('.');\n if (index >= 0)\n {\n ext = filename.substring(index + 1);\n }\n }\n\n return ext;\n }", "public TFileType getFileType() {\n\n\t\treturn type;\n\t}", "public String getFileType()\n {\n if (m_fileOptions.m_type == null ||\n m_fileOptions.m_type.length() <= 0)\n {\n return getTypeFromExtension();\n }\n\n return m_fileOptions.m_type;\n }", "public Integer getFileType() {\n return fileType;\n }", "@Override\n\tpublic String getTypeName() throws RemoteException {\n\t\treturn \"HDFS TEXT FILE\";\n\t}", "public static String getFileType(){\n\t\t//Get the selected file type\n\t\tString type = (String) fileType.getSelectedItem();\n\t\t//Re-enable the combobox, since download has already started\n\t\tfileType.setEnabled(true);\n\t\t//Reset the default file type\n\t\tfileType.setSelectedIndex(0);\n\t\treturn type;\n\t}", "public String getContentType() {\r\n return mFile.getContentType();\r\n }", "public static String getType() {\n type = getProperty(\"type\");\n if (type == null) type = \"png\";\n return type;\n }", "public TrimString getFileSystemType() {\n\t\treturn(_type);\n\t}", "private static TYPE getFileType(final String path, final ServiceContext context) {\n return PROJECT_FILE;\n }", "String getFileMimeType();", "public String getFileSystemType() {\n return this.fileSystemType;\n }", "@DISPID(19)\r\n\t// = 0x13. The runtime will prefer the VTID if present\r\n\t@VTID(21)\r\n\tjava.lang.String logFilename();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "public String getFileContentType() {\r\n return (String) getAttributeInternal(FILECONTENTTYPE);\r\n }", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "public edu.umich.icpsr.ddi.FileTypeType getFileType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileTypeType target = null;\n target = (edu.umich.icpsr.ddi.FileTypeType)get_store().find_element_user(FILETYPE$8, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public static String getType() {\n\t\treturn type;\n\t}", "public String getFileFormat()\r\n\t{\r\n\t\treturn this.getSerializer().getFileFormat();\r\n\t}", "private void getDetailsOfFiles(){\n\t\tString path = tfile.getAbsolutePath();\n\t\t\n\t\ttype = path.substring(path.lastIndexOf('.')+1);\n\t\t\n\t\tif(path.contains(\"/\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"/\")+1);\n\t\t}else if(path.contains(\"\\\\\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"\\\\\")+1);\n\t\t}\n\t}", "private int getFileType(SourceFile sourceFile)\n\t{\n\t\tString name = sourceFile.getName();\n\t\tString pkg = sourceFile.getPackageName();\n\n\t\tif (name.startsWith(\"<\") && name.endsWith(\">\") || name.equals(\"GeneratedLocale\")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n\t\t\treturn SYNTHETIC_FILE;\n\n for (final String frameworkPkg : FRAMEWORK_FILE_PACKAGES )\n {\n // look for packages starting with pkgName\n if (pkg.startsWith(frameworkPkg + '\\\\') || //$NON-NLS-1$\n pkg.startsWith(frameworkPkg + '/') || //$NON-NLS-1$\n pkg.equals(frameworkPkg)) //$NON-NLS-1$\n {\n return FRAMEWORK_FILE;\n }\n }\n\n if (name.startsWith(\"Actions for\")) //$NON-NLS-1$\n return ACTIONS_FILE;\n\n return AUTHORED_FILE;\n}", "@Override\n\tpublic String getContentType(File file) {\n\t\treturn null;\n\t}", "public static FileType getType(final File file) {\n if (FileUtils.isLink(file)) {\n return SYMLINK;\n } else if (file.isDirectory()) {\n return DIRECTORY;\n } else if (file.isFile()) {\n return FILE;\n }\n return FILE;\n }", "public static int fileType(File file) {\n for (String type : imageType) {\n if (file.getName().toLowerCase().endsWith(type)) {\n return Template.Code.CAMERA_IMAGE_CODE;\n }\n }\n\n for (String type : videoType) {\n if (file.getName().toLowerCase().endsWith(type)) {\n return Template.Code.CAMERA_VIDEO_CODE;\n }\n }\n\n for (String type : audioType) {\n if (file.getName().toLowerCase().endsWith(type)) {\n return Template.Code.AUDIO_CODE;\n }\n }\n return Template.Code.FILE_MANAGER_CODE;\n\n }", "public final String type() {\n return type;\n }", "private String getType( )\n\t{\n\t\treturn this.getModuleName( ) + \"$\" + this.getSimpleName( ) + \"$\" + this.getSystem( );\n\t}", "public FileType getShownType() {\r\n\treturn shownType;\r\n }", "public abstract String getFileFormatName();", "public void testGetType_1()\n\t\tthrows Exception {\n\t\tFiles fixture = new Files();\n\t\tfixture.setAbsolutePath(\"\");\n\t\tfixture.setType(\"\");\n\t\tfixture.setReadable(\"\");\n\t\tfixture.setSize(\"\");\n\t\tfixture.setWritable(\"\");\n\t\tfixture.setExecutable(\"\");\n\t\tfixture.setMtime(\"\");\n\n\t\tString result = fixture.getType();\n\n\t\t\n\t\tassertEquals(\"\", result);\n\t}", "public static String getFileType() {return \"json\";}", "public String getLogDestinationType() {\n return this.logDestinationType;\n }", "public AbstractRequestLogger requestLog(String type) throws ConfigurationException {\n if (type.equals(RequestLogType.DATABASE.toString())) {\n return this.applicationContext.getBean(RequestDatabaseLogger.class);\n } else if (type.equals(RequestLogType.FILE.toString())) {\n return applicationContext.getBean(RequestFileLogger.class);\n } else {\n throw new ConfigurationException();\n }\n }", "private String fileType(String username,String folderName,String fileName){\n //从数据库中获取用户ID\n int userId=userService.getUserIdByname(username);\n //根据用户ID和文件夹名获取文件夹ID\n int folderId=folderService.getFolderIdByName(folderName,userId);\n //根据文件夹id和文件夹名获取文件实体,再取出type\n String fileType= tableService.getTableByName(fileName,folderId).getType();\n return fileType;\n }", "public OutlookAttachmentType getType()\n {\n return getConstant(\"Type\", OutlookAttachmentType.class);\n }", "public String type();", "@Override\n\tpublic java.lang.Class<projectdb.tables.records.ChangelogRecord> getRecordType() {\n\t\treturn projectdb.tables.records.ChangelogRecord.class;\n\t}", "public interface FileType {\n\tString name();\n}", "public String getFilecontentContentType() {\n return filecontentContentType;\n }", "public static FileType valueOf(File file){\r\n\t\tString fileName = file.getName().toUpperCase();\r\n\t\treturn FileType.valueOf(fileName.substring(fileName.lastIndexOf(\".\")+1));\r\n\t}", "public String getMimeType ()\n {\n final String METHOD_NAME = \"getMimeType\";\n this.logDebug(METHOD_NAME + \"1/2: Started\");\n\n String mimeType = null;\n try\n {\n\tint contentType = this.document.getContentType();\n\tif ( contentType >= 0 ) mimeType = MediaType.nameFor[contentType];\n }\n catch (Exception exception)\n {\n\tthis.logWarn(METHOD_NAME + \"Failed to retrieve mime type\", exception);\n }\n\n this.logDebug(METHOD_NAME + \" 2/2: Done. mimeType = \" + mimeType);\n return mimeType;\n }", "public String getMime_type()\r\n {\r\n return getSemanticObject().getProperty(data_mime_type);\r\n }", "public String getMIMEType(String format)\n\t{\n\t\treturn engine.getMIMEType(format);\n\t}", "String getMimeType();", "String getContentType(String fileExtension);", "public String type(){\n\t\treturn type;\n\t}", "protected String getContentType()\n {\n if (fullAttachmentFilename == null)\n {\n return null;\n }\n String ext = FilenameUtils.getExtension(fullAttachmentFilename);\n if (ext == null)\n {\n return null;\n }\n if (ext.equalsIgnoreCase(\"pdf\"))\n {\n return \"application/pdf\";\n } else if (ext.equalsIgnoreCase(\"zip\"))\n {\n return \"application/zip\";\n } else if (ext.equalsIgnoreCase(\"jpg\"))\n {\n return \"image/jpeg\";\n\n } else if (ext.equalsIgnoreCase(\"jpeg\"))\n {\n return \"image/jpeg\";\n\n } else if (ext.equalsIgnoreCase(\"html\"))\n {\n return \"text/html\";\n\n } else if (ext.equalsIgnoreCase(\"png\"))\n {\n return \"image/png\";\n\n } else if (ext.equalsIgnoreCase(\"gif\"))\n {\n return \"image/gif\";\n\n }\n log.warn(\"Content type not found for file extension: \" + ext);\n return null;\n }", "abstract protected String getLogFileName();", "public int getEntityType(){\n\t\tIterator<ArrayList<String>> i = headerLines.iterator();\n\t\twhile(i.hasNext()){\n\t\t\tArrayList<String> headerLines = i.next();\n\t\t\tString headerName = headerLines.get(0);\n\t\t\tif (headerName.matches(\"Content-Type:\")){\n\t\t\t\tString headerData = headerLines.get(1);\n\t\t\t\tif(headerData.contains(\"text\")){\n\t\t\t\t\treturn TEXT;\n\t\t\t\t} else if (headerData.contains(\"pdf\")){\n\t\t\t\t\treturn PDF;\n\t\t\t\t} else if (headerData.contains(\"gif\")){\n\t\t\t\t\treturn GIF;\n\t\t\t\t} else if (headerData.contains(\"jpeg\")){\n\t\t\t\t\treturn JPEG;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}" ]
[ "0.72317153", "0.71420276", "0.69573444", "0.691275", "0.6720469", "0.6586126", "0.65576416", "0.65562785", "0.6460583", "0.64186954", "0.6403535", "0.63700116", "0.6335525", "0.61570233", "0.6051805", "0.6041477", "0.59631103", "0.5915389", "0.5908417", "0.5864669", "0.5810778", "0.57794183", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.57790965", "0.5765405", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.5749862", "0.57354355", "0.57227015", "0.56864756", "0.5683394", "0.5679587", "0.56789625", "0.56641793", "0.56627226", "0.56440514", "0.5631606", "0.56265324", "0.5617964", "0.5605833", "0.5604013", "0.55964833", "0.5594417", "0.5585504", "0.5569291", "0.5556125", "0.55530536", "0.5537168", "0.5532423", "0.5525951", "0.5522387", "0.55219775", "0.5519434", "0.55184114", "0.5509451", "0.5508756", "0.55041367", "0.5500779", "0.55007166" ]
0.80352294
0
Set type of the log file.
public LogFileInner withLogFileType(String logFileType) { this.logFileType = logFileType; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFileType(TFileType type) {\n\n\t\tthis.type = type;\n\t}", "public void setFileType(FileType typ) {\n fileType = typ;\n }", "void setLogFile(File log);", "public void setFileType(String fileType) {\r\n\t\tthis.fileType = fileType;\r\n\t}", "public void setFileType(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), FILETYPE, value);\r\n\t}", "public void setFiletype(java.lang.String filetype) {\n this.filetype = filetype;\n }", "public void setFileType(Integer fileType) {\n this.fileType = fileType;\n }", "public void setFILE_TYPE(String FILE_TYPE) {\r\n this.FILE_TYPE = FILE_TYPE == null ? null : FILE_TYPE.trim();\r\n }", "public void set_type(String t)\n {\n type =t;\n }", "public String logFileType() {\n return this.logFileType;\n }", "public void setFileType(edu.umich.icpsr.ddi.FileTypeType fileType)\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileTypeType target = null;\n target = (edu.umich.icpsr.ddi.FileTypeType)get_store().find_element_user(FILETYPE$8, 0);\n if (target == null)\n {\n target = (edu.umich.icpsr.ddi.FileTypeType)get_store().add_element_user(FILETYPE$8);\n }\n target.set(fileType);\n }\n }", "final public void setType(String type)\n {\n setProperty(TYPE_KEY, (type));\n }", "public static void setType(String type) {\n Globals.type = type;\n setProperty(\"type\", type);\n }", "public void setFiletype(String filetype) {\n this.filetype = filetype == null ? null : filetype.trim();\n }", "public void setFileType( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), FILETYPE, value);\r\n\t}", "public static void setFileType(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.set(model, instanceResource, FILETYPE, value);\r\n\t}", "void setType(String type) {\n this.type = type;\n }", "public void setFileType(String fileType) {\n this.fileType = fileType == null ? null : fileType.trim();\n }", "public static void setFileType( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, FILETYPE, value);\r\n\t}", "public final void setType(String type){\n\t\tthis.type = type;\t\n\t}", "void setType(java.lang.String type);", "public void setType(String type);", "public void setType(String type);", "public void setType(String type);", "void setType(Type type)\n {\n this.type = type;\n }", "public void setType(String type){\n \tthis.type = type;\n }", "private void setType(String type) {\n mType = type;\n }", "public void setType(Type t) {\n type = t;\n }", "public void setType(String t) {\n\ttype = t;\n }", "public void setType(String type){\r\n if(type == null){\r\n throw new IllegalArgumentException(\"Type can not be null\");\r\n }\r\n this.type = type;\r\n }", "public void setLogfileInfo(LogfileInfo info) {\n logfileInfo = info;\n }", "public void set_type(String type)\r\n\t{\r\n\t\tthis.type = type;\r\n\t}", "public void set_type(String type) throws Exception{\n\t\tthis.type = type;\n\t}", "public void setType(String type) \n {\n this.type = type;\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(Object type)\r\n {\r\n\tthis.type = type;\r\n }", "public void setType( String type )\n {\n this.type = type;\n }", "public void setType(type type) {\r\n\t\tthis.Type = type;\r\n\t}", "public void setType (String type) {\n this.type = type;\n }", "public void setType (String type) {\n this.type = type;\n }", "public void setType (String type) {\n this.type = type;\n }", "public final void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setLogFile(String logFile)\r\n\t{\r\n\t\tm_logFile = logFile;\r\n\t}", "public void setType(String type) {\n this.type = type;\n }", "private void setFile() {\n\t}", "public void setFileClass(Class<?> fileClass)\r\n {\r\n sFileClass = fileClass;\r\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type){\n this.type = type;\n }", "public void setType(String t) {\n\t\tthis.type = t;\n\t}", "public void setType(String type) {\r\r\n\t\tthis.type = type;\r\r\n\t}", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType( String type ) {\n this.type = type;\n }", "public void setType (String typ) {\n type = typ;\n }", "public void setType(Type t) {\n\t\ttype = t;\n\t}", "public void setType(String type){\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n m_Type = type;\n }", "public void setType(Type type){\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "@Override\n public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\r\n\t\tthis.type = type;\r\n\t}", "public void setType(String type) {\r\n\t\tthis.type = type;\r\n\t}", "public void setType(String type) {\r\n\t\tthis.type = type;\r\n\t}", "public void setType(String type)\n\t{\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\r\n\t\tthis.type=type;\r\n\t}", "File(String path, String type)\n {\n this.path=path;\n this.type=type;\n }", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(String type) {\n\n this.type = type;\n }", "public void setType(String val) {\n type = val;\n }", "public void setType(java.lang.String type) {\n this.type = type;\n }" ]
[ "0.7009904", "0.6999953", "0.67038053", "0.6435851", "0.636555", "0.63231283", "0.63122326", "0.63117456", "0.630252", "0.62181365", "0.6208189", "0.62008667", "0.61831117", "0.6120205", "0.6115846", "0.6101954", "0.60729903", "0.6065605", "0.60592884", "0.6030031", "0.6008808", "0.59799683", "0.59799683", "0.59799683", "0.5976752", "0.59741855", "0.59639275", "0.5952413", "0.59410894", "0.59308755", "0.5911086", "0.5884932", "0.58833516", "0.5882406", "0.5862635", "0.5860422", "0.5854095", "0.58511144", "0.5840397", "0.5840397", "0.5840397", "0.58376366", "0.582711", "0.582711", "0.582711", "0.582711", "0.58269095", "0.58250767", "0.5819416", "0.58174616", "0.5815065", "0.5815065", "0.5811392", "0.58104956", "0.5810228", "0.5807154", "0.5805045", "0.5805037", "0.57864547", "0.5783545", "0.57793254", "0.5776653", "0.57758665", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.57530606", "0.575191", "0.575191", "0.5748658", "0.5748331", "0.5748331", "0.5748331", "0.57278705", "0.57259053", "0.5723049", "0.5703169", "0.5703169", "0.5703169", "0.56989896", "0.5698336", "0.5683268" ]
0.57039714
94
Get the url to download the log file from.
public String url() { return this.url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "public String getSourceDownloadUrl();", "public String getDownloadUrl() {\n return downloadUrl;\n }", "public String getDownloadLink() {\r\n\t\tString site = MySoup.getSite();\r\n\t\tString authKey = MySoup.getAuthKey();\r\n\t\tString passKey = MySoup.getPassKey();\r\n\t\tString downloadLink = site + \"torrents.php?action=download&id=\" + id + \"&authkey=\" + authKey + \"&torrent_pass=\" + passKey;\r\n\t\treturn downloadLink;\r\n\t}", "String getNoticeFileUrl();", "public String getPackageDownloadUrl();", "public URL getURL()\n {\n if( url == null )\n {\n // Check if the file is online or inside the JAR:\n if( filename.matches( SoundSystemConfig.PREFIX_URL ) )\n {\n // Online\n try\n {\n url = new URL( filename );\n }\n catch( Exception e )\n {\n errorMessage( \"Unable to access online URL in \" +\n \"method 'getURL'\" );\n printStackTrace( e );\n return null;\n }\n }\n else\n {\n // Inside the JAR\n url = getClass().getClassLoader().getResource(\n SoundSystemConfig.getSoundFilesPackage() + filename );\n }\n }\n return url;\n }", "String getURL(FsItem f);", "private String downloadFile(String url) throws Exception {\n StringBuilder builder = new StringBuilder();\n \n URL u = new URL(url);\n URLConnection conn = u.openConnection();\n BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n String line;\n while ((line = rd.readLine()) != null) {\n builder.append(line);\n }\n \n return builder.toString();\n }", "java.lang.String getArtifactUrl();", "public String getDownloadRequestUrl()\r\n {\r\n String requestUrl;\r\n if ( downloadURI != null )\r\n {\r\n try\r\n {\r\n // dont use whole uri.. only file and query part..!?\r\n requestUrl = URLUtil.getPathQueryFromUri( downloadURI );\r\n return requestUrl;\r\n }\r\n catch (URIException e)\r\n {// failed to use uri.. try other request urls..\r\n NLogger.warn( NLoggerNames.Download_Candidate, e, e );\r\n }\r\n }\r\n \r\n if ( resourceURN != null )\r\n {\r\n requestUrl = URLUtil.buildName2ResourceURL( resourceURN );\r\n }\r\n else\r\n {\r\n // build standard old style gnutella request.\r\n String fileIndexStr = String.valueOf( fileIndex );\r\n StringBuffer urlBuffer = new StringBuffer( 6 + fileIndexStr.length()\r\n + fileName.length() );\r\n urlBuffer.append( \"/get/\" );\r\n urlBuffer.append( fileIndexStr );\r\n urlBuffer.append( '/' ); \r\n urlBuffer.append( URLCodecUtils.encodeURL( fileName ) );\r\n requestUrl = urlBuffer.toString();\r\n }\r\n return requestUrl;\r\n }", "private String getDownloadRecording() throws Exception {\n return curl + \" \" + downloadParams + \" \" + prefixLocalIpAddress + getLocalIpAddress() + \":\" + defaultPort + \" \" + downloadRecording;\n }", "public String getLogCollectionUploadServerUrl();", "public URL getURL() throws IOException {\r\n\t\tthrow new FileNotFoundException(getDescription() + \" cannot be resolved to URL\");\r\n\t}", "public static File getDownloadingFile() {\n\t\treturn downloadingFile;\n\t}", "private URL fileToURL() {\n String message = null;\n if (!file.exists()) {\n message = \"File \" + file + \" does not exist\";\n }\n if (message == null && !(file.isFile())) {\n message = \"File \" + file + \" is not a file\";\n }\n if (message == null) {\n try {\n return FileUtils.getFileUtils().getFileURL(file);\n } catch (Exception ex) {\n message =\n \"File \" + file + \" cannot use as URL: \"\n + ex.toString();\n }\n }\n // Here if there is an error\n switch (onError) {\n case OnError.FAIL_ALL:\n throw new BuildException(message);\n case OnError.FAIL:\n // Fall Through\n case OnError.REPORT:\n log(message, Project.MSG_WARN);\n break;\n case OnError.IGNORE:\n // log at a lower level\n log(message, Project.MSG_VERBOSE);\n break;\n default:\n // Ignore the problem\n break;\n }\n return null;\n }", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "public String getUrlDataFile() {\n\t\treturn urlDataFile;\n\t}", "public String get_url() throws Exception {\n\t\treturn this.url;\n\t}", "public final String getUrl() {\n return properties.get(URL_PROPERTY);\n }", "public String getURL() {\r\n\t\treturn dURL.toString();\r\n\t}", "@AutoEscape\n\tpublic String getFileUrl();", "public String getFileUrl(String fileId) throws IOException {\n final String targetUrl = getTargetUrl(fileId);\n return targetUrl + \"/\" + fileId;\n }", "public String getArchiveStatusForwardUrl()\n {\n String methosName = \"getArchiveStatusForwardUrl\";\n ConfigurationStore config = ConfigurationStore.getInstance();\n String archiveStatusForwardURL = config.getProperty(IISATProperty.CATEGORY, IISATProperty.ARCHIVE_STATUS_RESPONSE_URL, null);\n _logger.logMessage(methosName, null, \"URL retrieve is \"+archiveStatusForwardURL);\n \n return archiveStatusForwardURL;\n }", "public static String getDotUrl()\n {\n return \"http://log.tusumobi.com/dot\";\n }", "public java.lang.String getUrl () {\r\n\t\treturn url;\r\n\t}", "java.net.URL getUrl();", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public URL getURL() {\r\n try {\r\n return new URL(\"http://www.bluej.org/doc/writingextensions.html\");\r\n } catch (Exception eee) {\r\n // The link is either dead or otherwise unreachable\r\n System.out.println(\"Simple extension: getURL: Exception=\" + eee.getMessage());\r\n return null;\r\n }\r\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n return s;\n }\n }", "public static String getDownloadDirectory() {\n return downloadDirectory;\n }", "public String getUrl() {\n Object ref = url_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "private URL getURL(String filename) {\n\t\tURL url = null;\r\n\t\ttry { \r\n\t\t\turl = this.getClass().getResource(filename);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn url;\r\n\t}", "URL getStreamURL() throws IOException;", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n }\n return s;\n }\n }", "public java.lang.String getURL() {\n return URL;\n }", "public static URL getURL(String cfgFilename) {\n File file = new File(cfgFilename);\n try {\n return file.toURI().toURL();\n } catch(MalformedURLException ex) {\n LOGGER.error(\"config failed, configFilename = \" + cfgFilename, ex);\n return null;\n }\n }", "public String getUrl() {\n Object ref = url_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getUrl(Slave slave) {\n try {\n return slave.getComputer().getTimeline().getLastBuild().getUrl();\n } catch (NullPointerException e) {\n return \"NoLastBuild\";\n }\n }", "public String getUrl() {\n Object ref = url_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n url_ = s;\n return s;\n }\n }", "public String getURL(Version version) {\n return getUrl() + version.getDocument().getDocumentURL();\n }", "private String downloadURL(String url) {\n\t\ttry {\n\t\t\tHttpClient client = new DefaultHttpClient();\n\t\t\tHttpGet request = new HttpGet(url);\n\t\t\t// Get the response\n\t\t\tResponseHandler<String> responseHandler = new BasicResponseHandler();\n\t\t\tString response_str = client.execute(request, responseHandler);\n\t\t\treturn response_str;\n\n\t\t\t// Makes sure that the InputStream is closed after the app is\n\t\t\t// finished using it.\n\t\t} catch (IOException e) {\n\t\t\tLog.d(\"WL\", \"Error\");\n\t\t\te.printStackTrace();\n\t\t\treturn \"Error\";\n\t\t}\n\t}", "public String getYTDLDownloadLink() {\n return \"https://yt-dl.org/downloads/latest/youtube-dl\";\n }", "private String downloadUrl(String strUrl) throws IOException {\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try {\n URL url = new URL(strUrl);\n\n urlConnection = (HttpURLConnection) url.openConnection();\n\n urlConnection.connect();\n\n iStream = urlConnection.getInputStream();\n\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n StringBuffer sb = new StringBuffer();\n\n String line = \"\";\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n data = sb.toString();\n\n br.close();\n\n } catch (Exception e) {\n FirebaseCrashlytics.getInstance().recordException(e);\n Log.d(\"Exception\", e.toString());\n } finally {\n iStream.close();\n urlConnection.disconnect();\n }\n return data;\n }", "public String getUrl() {\r\n\t\t\treturn url;\r\n\t\t}", "public String getURL() {\n\t\treturn prop.getProperty(\"URL\");\n\t}", "public String getUrl() {\n Object ref = url_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "@Nullable public URL getUpdateURL(final PluginVersion version) {\n final Pair<URL, String> p = downloadInfo.get(version);\n if (p == null) {\n return null;\n }\n return p.getFirst();\n }", "public File newLogFile() {\n File flog = null;\n try {\n this.logFileName = getTimestamp() + \".xml\";\n this.pathToLogFile = logFileFolder + logFileName;\n URL logURL = new URL(this.pathToLogFile);\n flog = new File(logURL.toURI());\n if (!flog.exists()) {\n flog.createNewFile();\n }\n } catch (Exception ex) {\n log.error(\"newLogFile :\"+ ex.getMessage());\n } finally{\n this.fLogFile = flog;\n return flog;\n }\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n return s;\n }\n }", "private String downloadURL(String myurl) {\n\t\ttry {\n\t\t\tHttpClient client = new DefaultHttpClient();\n\t\t\tHttpGet request = new HttpGet(myurl);\n\t\t\t// Get the response\n\t\t\tResponseHandler<String> responseHandler = new BasicResponseHandler();\n\t\t\tString response_str = client.execute(request, responseHandler);\n\t\t\treturn response_str;\n\n\t\t\t// Makes sure that the InputStream is closed after the app is\n\t\t\t// finished using it.\n\t\t} catch (IOException e) {\n\t\t\tLog.d(\"WL\", \"Error\");\n\t\t\treturn \"Error\";\n\t\t}\n\t}", "public String getLogfileLocation() {\n return logfileLocation;\n }", "public abstract String getDataFileUrl ();", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "String download(String path) throws IOException;", "public String getUrl() {\n\t\tif (prop.getProperty(\"url\") == null)\n\t\t\treturn \"\";\n\t\treturn prop.getProperty(\"url\");\n\t}", "public java.lang.String getUrl() {\n return url;\n }", "@Override\r\n public String getURL() {\n return url;\r\n }", "@NonNull\n private File getDownloadLocation() {\n System.out.println(\"Hello. in download start\");\n File root = android.os.Environment.getExternalStorageDirectory();\n File file = new File(root.getAbsolutePath() + \"/V2A\");\n if (!file.exists()) {\n file.mkdirs();\n }\n System.out.println(file.toString());\n System.out.println(\"Hello. in download end\");\n //Toast.makeText(this, \"Starting Download\", Toast.LENGTH_SHORT).show();\n\n return file;\n\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "public String getUrl() {\n\t\t\treturn url;\n\t\t}", "public String getURL();", "Path getLogFilePath();", "public String getURL()\n {\n return getURL(\"http\");\n }", "public void setLogFilesUrls() {\n String s = \"\";\n s = s + makeLink(\"NODE-\" + getNodeName() + \"-out.log\");\n s = s + \"<br>\" + makeLink(\"NODE-\" + getNodeName() + \"-err.log\");\n s = s + \"<br>\" + makeLink(\"log-\" + getNodeName() + \".html\");\n logFilesUrls = s;\n }", "URL getUrl();", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public static File getFileByTarget(String target) {\r\n return new File(TraceloggerConfig.getLogFilesPath() + \"\\\\\" + target + \".csv\");\r\n }", "public String url() {\n return server.baseUri().toString();\n }", "String generalFileName(String url);", "public String getLogFile() {\n return logFile;\n }", "public String getLogFile() {\n return agentConfig.getLogFile();\n }", "protected String getURL(String path) throws Exception\n {\n URL url = getResource(path);\n return url.toString();\n }", "Uri getUrl();", "@Nonnull public String getURL() {\n return url;\n }", "public String getURL() {\r\n return url;\r\n }", "public String getUrl()\n {\n return url;\n }", "public LogFileInner withUrl(String url) {\n this.url = url;\n return this;\n }", "public String getUrl() { /* (readonly) */\n return mUrl;\n }", "public String getURL(int lessonId) {\n\t\tString url = \"\";\n\t\ttry {\n\t\t\tString encodedFilename = URLEncoder.encode(filename, \"utf-8\");\n\t\t\t\n\t\t\turl = AcademyProperties.getInstance().getFileProviderUrl();\n\t\t\turl += \"lesson=\" + lessonId + \"&file=\" + encodedFilename;\n\t\t} catch(UnsupportedEncodingException e) {\n\t\t\tLog.e(\"cloudacademy\", \"Cannot encode filename: \" + filename);\n\t\t}\n\t\t\n\t\treturn url;\n\t}", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }" ]
[ "0.7224198", "0.6979112", "0.64656746", "0.6336869", "0.6300287", "0.6137503", "0.61163247", "0.6096837", "0.60885644", "0.60724324", "0.60606676", "0.6010953", "0.6003594", "0.5972699", "0.59635514", "0.5962069", "0.5919026", "0.5883338", "0.58715445", "0.58566666", "0.5847671", "0.58427167", "0.58303595", "0.578789", "0.5773789", "0.5723453", "0.5717892", "0.5709338", "0.5709338", "0.5697194", "0.56932586", "0.56861866", "0.5678276", "0.5678276", "0.5667652", "0.5659983", "0.5657393", "0.56479204", "0.56399846", "0.56323963", "0.5629563", "0.5629563", "0.5619198", "0.56111646", "0.5609546", "0.56007165", "0.55974305", "0.5595834", "0.5590075", "0.5576582", "0.55691105", "0.5567962", "0.55639285", "0.55565614", "0.55488217", "0.5545693", "0.5543136", "0.55409914", "0.5540456", "0.5533421", "0.5529642", "0.5529642", "0.5527649", "0.55241054", "0.5520502", "0.55174476", "0.5515838", "0.551497", "0.551497", "0.55101204", "0.55047435", "0.550399", "0.5502286", "0.54968935", "0.549392", "0.5491191", "0.5491191", "0.5491191", "0.5491191", "0.5491191", "0.5491191", "0.5491191", "0.5491191", "0.5491191", "0.5487583", "0.548654", "0.5465721", "0.5459353", "0.54525244", "0.54519224", "0.5446944", "0.5441279", "0.5440414", "0.54356825", "0.54342324", "0.5434143", "0.5431399", "0.54235", "0.54235", "0.54235", "0.54235" ]
0.0
-1
Set the url to download the log file from.
public LogFileInner withUrl(String url) { this.url = url; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLogFilesUrls() {\n String s = \"\";\n s = s + makeLink(\"NODE-\" + getNodeName() + \"-out.log\");\n s = s + \"<br>\" + makeLink(\"NODE-\" + getNodeName() + \"-err.log\");\n s = s + \"<br>\" + makeLink(\"log-\" + getNodeName() + \".html\");\n logFilesUrls = s;\n }", "public void setFileUrl(String fileUrl);", "public sparqles.avro.discovery.DGETInfo.Builder setURL(java.lang.CharSequence value) {\n validate(fields()[2], value);\n this.URL = value;\n fieldSetFlags()[2] = true;\n return this; \n }", "public void setURL(String _url) { url = _url; }", "public FilenameURL( String filename )\n {\n // grab a handle to the message logger:\n logger = SoundSystemConfig.getLogger();\n\n this.filename = filename;\n url = null;\n }", "public void setURL(String url);", "public void setHTTP_URL(String url) {\r\n\t\ttry {\r\n\t\t\tURL u = new URL(url);\r\n\t\t\tu.toURI();\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\tthis.settings.setProperty(\"HTTP_URL\", url);\r\n\t\tthis.saveChanges();\r\n\t}", "public void setUrl(URL url)\n {\n this.url = url;\n }", "private void setURL(String url) {\n try {\n URL setURL = new URL(url);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t\tthis.handleConfig(\"url\", url);\n\t}", "public void setDownloadUrl(String downloadUrl) {\n this.downloadUrl = downloadUrl == null ? null : downloadUrl.trim();\n }", "public void setUrl(String url);", "public void setUrl(String url);", "public void download(String url,File targetFile)throws Exception{\n\t\tdownload(url, targetFile,60*10);\n\t}", "@Override\n public void setUrl(String url) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Directory manager \" + directoryManager);\n }\n try {\n super.setUrl(directoryManager.replacePath(url));\n } catch (Exception e) {\n LOGGER.error(\"Exception thrown when setting URL \", e);\n throw new IllegalStateException(e);\n }\n }", "public void set_url(String url) throws Exception{\n\t\tthis.url = url;\n\t}", "public String getDownloadUrl() {\n return downloadUrl;\n }", "public void setURL(java.lang.String URL) {\n this.URL = URL;\n }", "public void setUrl( String url )\n {\n this.url = url;\n }", "public void setUrl( String url )\n {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setURL(String URL) {\n mURL = URL;\n }", "public void setUrl(String url) {\n if(url != null && !url.endsWith(\"/\")){\n url += \"/\";\n }\n this.url = url;\n }", "public FilenameURL( URL url, String identifier )\n {\n // grab a handle to the message logger:\n logger = SoundSystemConfig.getLogger();\n\n filename = identifier;\n this.url = url;\n }", "public void setUrl(String url) {\r\n\t\tthis.url = url;\r\n\t}", "public void setUrl(String url) {\r\n\t\tthis.url = url;\r\n\t}", "public void setUrl(String url)\n {\n this.url = url;\n }", "public final GetHTTP setUrl(final String url) {\n properties.put(URL_PROPERTY, url);\n return this;\n }", "public void setUrl (java.lang.String url) {\r\n\t\tthis.url = url;\r\n\t}", "public static void setFilename(String filename) {\n DownloadManager.filename = filename;\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "void setUrl(String url) {\n this.url = Uri.parse(url);\n }", "public void setURL(String url) {\n\t\tthis.url = url;\n\t}", "public void setUrl(String url){\n\t\t_url=url;\n\t}", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(Uri url) {\n this.urlString = url.toString();\n }", "public void setUrl(java.lang.String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t}", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t}", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t}", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t}", "public void setUrlDataFile(String urlDataFile) {\n\t\tthis.urlDataFile = urlDataFile;\n\t}", "public void setURL(String url) {\n\t\tboolean changed = url==null ? this.url!=null : !url.equals(this.url);\n\t\tif (changed) {\n\t\t\tstop();\n\t\t\tthis.url = url;\n\t\t\tstart();\n\t\t}\n\t}", "void setLogFile(File log);", "public abstract void setOutputUrl(String outputUrl);", "public void setUrl(String url){\n this.URL3 = url;\n }", "public String getSourceDownloadUrl();", "public void setServer(URL url) {\n\n\t}", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "public void setUrl(String url) {\n\n\t\ttry {\n\t\t\tthis.url = new URL(url);\n\t\t\tif (url.startsWith(\"https\")) {\n\t\t\t\tthis.httpsEnabled = true;\n\t\t\t}\n\t\t}\n\t\tcatch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setLogCollectionUploadServerUrl(String serverUrl);", "private void setUrl(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000002;\n url_ = value;\n }", "public void setLogfile( String logfilename )\n {\n // guard\n {\n if( this.isopen() )\n {\n log.warn( \"Changing logfilename while logfile has already been opened.\" );\n }\n }\n\n this.logfilename = logfilename;\n }", "public void setURL(String url)\n throws ConfigException\n {\n DriverConfig driver;\n \n if (_driverList.size() > 0)\n driver = _driverList.get(0);\n else\n throw new ConfigException(L.l(\"The driver must be assigned before the URL.\"));\n \n driver.setURL(url);\n }", "public void setServerUrl(String newUrl) {\n if(newUrl == null){\n return;\n }\n props.setProperty(\"url\", newUrl);\n saveProps();\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n url_ = value;\n onChanged();\n return this;\n }", "public void setLogFile(String logFile) {\n agentConfig.setLogFile(logFile);\n logConfigChanged();\n }", "public StockEvent setUrl(String url) {\n this.url = url;\n return this;\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n url_ = value;\n onChanged();\n return this;\n }", "T setUrlTarget(String urlTarget);", "private void setUrl(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000001;\n url_ = value;\n }", "public native final void setUrl(String url)/*-{\n this.url = url;\n }-*/;", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n url_ = value;\n onChanged();\n return this;\n }", "public void setLogFile(String logFile) {\n this.logFile = logFile;\n }", "public URL setURL(URL url) {\r\n if (url == null)\r\n throw new IllegalArgumentException(\r\n \"A null url is not an acceptable value for a PackageSite\");\r\n URL oldURL = url;\r\n myURL = url;\r\n return oldURL;\r\n }", "public Builder setUrl(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n url_ = value;\n onChanged();\n return this;\n }", "public void setUrl(String url) {\n\t\tthis.url = utf8URLencode(url);\n\t}", "public void setLogFile(String logFile)\r\n\t{\r\n\t\tm_logFile = logFile;\r\n\t}", "void setRemoteUrl(String name, String url, String GIT_DIR) throws GitException, InterruptedException;", "public void setUrl(String tmp) {\n this.url = tmp;\n }", "@Override\r\n public String getURL() {\n return url;\r\n }", "public void setFileTransferServer(String serverUrl);", "public void setUrl(String url) {\n\t\tthis.url = url == null ? null : url.trim();\n\t}", "public void setUrl(String Url) {\n this.Url = Url;\n }", "public void setUrl(String url) throws BuildException {\n jdbcUrl = url;\n }", "private void setUrlBytes(\n com.google.protobuf.ByteString value) {\n url_ = value.toStringUtf8();\n bitField0_ |= 0x00000002;\n }", "public static void setDownloadDirectory(String downloadDirectory) {\n DownloadManager.downloadDirectory = downloadDirectory;\n }", "public void setURL(java.lang.CharSequence value) {\n this.URL = value;\n }", "public static void setOfficialFileWebpage(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, OFFICIALFILEWEBPAGE, value);\r\n\t}", "private void setUrlBytes(\n com.google.protobuf.ByteString value) {\n url_ = value.toStringUtf8();\n bitField0_ |= 0x00000001;\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n url_ = value;\n onChanged();\n return this;\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n url_ = value;\n onChanged();\n return this;\n }", "public void setUrl(String url, OgemaHttpRequest req) {\n\t\tgetData(req).setUrl(url);\n\t}", "public void setUrl(String url) {\n this.url = url == null ? null : url.trim();\n }", "public void setUrl(String url) {\n this.url = url == null ? null : url.trim();\n }", "public void setUrl(String url) {\n this.url = url == null ? null : url.trim();\n }", "public void setUrl(String url) {\n this.url = url == null ? null : url.trim();\n }", "public void setUrl(String url) {\n this.url = url == null ? null : url.trim();\n }", "public void setUrl(String url) {\n this.url = url == null ? null : url.trim();\n }", "public void setUrl(String url) {\n this.url = url == null ? null : url.trim();\n }" ]
[ "0.667164", "0.6429597", "0.6222365", "0.61989325", "0.6178106", "0.61490446", "0.6141437", "0.6133224", "0.61321706", "0.60706663", "0.6019131", "0.5997284", "0.5997284", "0.5977125", "0.5966233", "0.5928665", "0.59033537", "0.5892055", "0.5890883", "0.5890883", "0.58867717", "0.588548", "0.5860215", "0.5796671", "0.5793589", "0.5793589", "0.57902867", "0.5783", "0.57795066", "0.5778765", "0.5776893", "0.5776893", "0.5776893", "0.57710665", "0.57460797", "0.57320297", "0.5712333", "0.5712333", "0.5712333", "0.5712333", "0.5712333", "0.5712333", "0.5712333", "0.5712333", "0.5710727", "0.570704", "0.5693987", "0.5676735", "0.5676735", "0.5676735", "0.5676735", "0.5670499", "0.5660055", "0.56572247", "0.5643561", "0.5642799", "0.5624491", "0.5613599", "0.56039584", "0.5570695", "0.5562481", "0.556001", "0.5554352", "0.5540049", "0.5515203", "0.54978216", "0.54971796", "0.5494463", "0.54803777", "0.547668", "0.54755056", "0.5475161", "0.54698986", "0.54677135", "0.5461812", "0.54557973", "0.54494035", "0.5442707", "0.54393137", "0.54238224", "0.54139864", "0.54077315", "0.5406464", "0.539605", "0.538069", "0.5380618", "0.5377809", "0.53630626", "0.5358164", "0.5355204", "0.5343892", "0.5343892", "0.5340038", "0.53318316", "0.53318316", "0.53318316", "0.53318316", "0.53318316", "0.53318316", "0.53318316" ]
0.64107776
2
Total number of acknowledgments sent to Cloud Pubsub
public long getMessageAckCount() { return messageMetrics.acks.get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getMessagesCount();", "int getMessagesCount();", "int getMessagesCount();", "long getReceivedEventsCount();", "int getMsgCount();", "int getMsgCount();", "int getSubscriptionCount();", "public int getNumAnnouncements(){\n return message.length;\n }", "int getMessageCount();", "int getMessageCount();", "int getMessageCount();", "int getMessageCount();", "int getMessageCount();", "int getDeliveredCount();", "public long getMessageNackCount() {\n return messageMetrics.nacks.get();\n }", "int getPayloadCount();", "@Override\r\n\tpublic int countTopics() {\n\t\treturn 0;\r\n\t}", "@Override\n public int numberOfMessages() {\n return messages.size();\n }", "public int getTotalNumOfMsg(){ return allmessage.size();}", "int getNetTransferMsgsCount();", "public int getMessagesCount() {\n return messages_.size();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "@Override\n\tpublic int numberOfMessages() {\n\t\treturn 0;\n\t}", "public int getMsgCount() {\n return instance.getMsgCount();\n }", "public int getMsgCount() {\n return instance.getMsgCount();\n }", "public synchronized int getMessageCount() {\n return _references.size();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "public int getMessagesCount() {\n return messages_.size();\n }", "public int getMsgCount() {\n return msg_.size();\n }", "public int getMsgCount() {\n return msg_.size();\n }", "public int getTotalMessageCount(){\n Query query = new Query(\"Message\");\n Query query2 = new Query(\"Question\");\n PreparedQuery results = datastore.prepare(query);\n PreparedQuery results2 = datastore.prepare(query2);\n return results.countEntities(FetchOptions.Builder.withLimit(1000)) + results2.countEntities(FetchOptions.Builder.withLimit(1000));\n}", "private int getMessageCount() {\r\n return mMessages.length;\r\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public Integer getMessageCount() {\r\n return messageCount;\r\n }", "int getMessageIdCount();", "long incrementInMsgs() {\n return inMsgs.incrementAndGet();\n }", "public int getSubscriptionCount()\n {\n int count;\n\n synchronized (lock)\n {\n count = (subscriptions != null) ? subscriptions.size() : 0;\n }\n\n return count;\n }", "public static int countReceivedBytes() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countSentBytes(messageClassType);\n\n\treturn sum;\n }", "int getNumEvents() {\n int cnt = eventCount;\n for (Entry entry : queue) {\n cnt += entry.eventCount;\n }\n return cnt;\n }", "public int getDeliveredCount() {\n return delivered_.size();\n }", "long getTotalAcceptCount();", "int getConsumerCount() {\n return mNoOfConsumers;\n }", "public long getMessageReceivedCount() {\n return messageMetrics.received.get();\n }", "public Integer CounterPublishNum(int count){\r\n\t\treturn ++count;\r\n\t}", "long getRequestsCount();", "public static int countReceivedMessages() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countReceivedMessages(messageClassType);\n\n\treturn sum;\n }", "int getRequestsCount();", "int getRequestsCount();", "public int getNrSubscribers()\r\n {\r\n return subscriberInfos.size();\r\n }", "public int getNumberOfRegisteredMessages() {\n return registeredMessages.size();\n }", "int getQos();", "public int getTotalMessageCount() {\n Query query = new Query(\"Message\");\n PreparedQuery results = datastore.prepare(query);\n return results.countEntities(FetchOptions.Builder.withLimit(1000));\n }", "public int totalMsgsPerSec()\n\t{\n\t\treturn _totalMsgsPerSec;\n\t}", "int getTotalCreatedConnections();", "public Integer subscriptionCount() {\n return this.subscriptionCount;\n }", "@Override\r\n\tprotected int count() {\n\t\treturn service.count();\r\n\t}", "public void incMessagesSent() {\n this.messagesSent++;\n }", "@Override\n public abstract long getReceivedBytesCount();", "public AsyncResult<Integer> requestNumberOfMessages() {\r\n ServiceDiscoveryManager serviceDiscoveryManager = xmppSession.getManager(ServiceDiscoveryManager.class);\r\n return serviceDiscoveryManager.discoverInformation(null, OfflineMessage.NAMESPACE).thenApply(infoDiscovery -> {\r\n if (!infoDiscovery.getExtensions().isEmpty()) {\r\n DataForm dataForm = infoDiscovery.getExtensions().get(0);\r\n if (dataForm != null) {\r\n for (DataForm.Field field : dataForm.getFields()) {\r\n if (\"number_of_messages\".equals(field.getVar())) {\r\n String numberOfMessages = field.getValues().get(0);\r\n return Integer.valueOf(numberOfMessages);\r\n }\r\n }\r\n }\r\n }\r\n return 0;\r\n });\r\n }", "public int getNewMessageCount() {\n return messages.size() + droppedMessages.size();\n }", "public synchronized int getCount() throws MessagingException {\n/* 244 */ parse();\n/* 245 */ return super.getCount();\n/* */ }", "public int getMessageIdCount() {\n return messageId_.size();\n }", "public long getPendingMessageCount() {\n return (long) this.incUpdateQueue.size();\n }", "int getReqCount();", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public void incTotalOfQueueEntries() {\n totalOfQueueEntries++;\n }", "public int getDeliveredCount() {\n if (deliveredBuilder_ == null) {\n return delivered_.size();\n } else {\n return deliveredBuilder_.getCount();\n }\n }", "int getEnqueuedBlockRequestsNumber() {\n int count = 0;\n for (StdPeerMessage pm : sendQueue) {\n if (pm.type == StdPeerMessage.REQUEST) {\n count++;\n }\n }\n return count;\n }", "public static int count() {\n return postEncryptedPaymentRequestCount;\n }", "public int getDataMessagesReceived() {\n\t\tint contador = 0;\n\t\tfor (Contacto c : currentUser.getContacts()) {\n\t\t\tcontador += (c.getMessages().size() - c.getMsgsByUser(currentUser.getId()));\n\t\t}\n\t\treturn contador;\n\t}", "org.jboss.mq.server.MessageCounter[] getMessageCounter() throws java.lang.Exception;", "public int getAcknowledgement() {\n if (loadBurst) {\n inputQueueSize++;\n return 1;\n } else {\n try {\n commonRead(1);\n return buffer[0];\n } catch (IOException | NullPointerException e) {\n e.printStackTrace();\n return 3;\n }\n }\n }", "int getUncommittedEventCount();", "public int getMessageIdCount() {\n return instance.getMessageIdCount();\n }", "long getListenerCount();", "public int getMessagesCount() {\n if (messagesBuilder_ == null) {\n return messages_.size();\n } else {\n return messagesBuilder_.getCount();\n }\n }", "int getResponseCount();", "int getReaultCount();", "int getResponsesCount();", "long countByExample(PrivateMessageExample example);", "int getPeerCount();", "@Override\r\n\tpublic int count(Integer bno) {\n\t\treturn replyMapper.count(bno); \r\n\t}", "public int getCount() {\n return queue.size();\n }", "public int countTransmission(){\n\t\treturn this.curPackets.size();\n\t}", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n reqCount = (int) dataSnapshot.getChildrenCount();\n reqCount++;\n newcount+=reqCount;\n Log.d(\"REQUEST COUNT\", \"\"+reqCount);\n\n }", "public synchronized int messageCount() {\n \tfinal Query q = mDB.query();\n q.constrain(MessageReference.class);\n q.descend(\"mBoard\").constrain(this).identity();\n return q.execute().size();\n }", "public int getNetTransferMsgsCount() {\n return netTransferMsgs_.size();\n }", "void onSqsRequestSuccess(String internalQueueName, int messagesCount);", "public int getMessagesCount() {\n if (messagesBuilder_ == null) {\n return messages_.size();\n } else {\n return messagesBuilder_.getCount();\n }\n }", "@Override\r\n\tpublic int selectMessageTotal() {\n\t\treturn messageMapper.selectMessageCount();\r\n\t}" ]
[ "0.6889388", "0.6889388", "0.6889388", "0.68034244", "0.6745167", "0.6745167", "0.6674739", "0.65853566", "0.6578513", "0.6578513", "0.6578513", "0.6578513", "0.6578513", "0.6558859", "0.6471495", "0.6455666", "0.64294016", "0.6415289", "0.6343104", "0.63370126", "0.62973726", "0.6262159", "0.6262159", "0.62183183", "0.6216013", "0.6216013", "0.6211557", "0.61931074", "0.61931074", "0.61885256", "0.618228", "0.618228", "0.618012", "0.6146155", "0.6138325", "0.6138325", "0.6138325", "0.6138325", "0.6138325", "0.61371565", "0.6122181", "0.60998523", "0.6010563", "0.60056156", "0.60031366", "0.5998602", "0.59717757", "0.59681594", "0.5962408", "0.59605545", "0.5956202", "0.59526104", "0.5925371", "0.5925371", "0.5907129", "0.5903443", "0.5883091", "0.58807063", "0.58713067", "0.58613044", "0.58570254", "0.5852909", "0.5851538", "0.5836865", "0.58319056", "0.5811883", "0.5808609", "0.58030283", "0.57959884", "0.57789576", "0.5777674", "0.5777674", "0.5777674", "0.5777674", "0.5777674", "0.5775751", "0.5748548", "0.5736321", "0.5732289", "0.5720912", "0.5693687", "0.5689236", "0.56811416", "0.5674571", "0.56495255", "0.5638919", "0.5637046", "0.56288916", "0.5620569", "0.56202906", "0.56116647", "0.5608257", "0.5608138", "0.5605125", "0.5600258", "0.5600062", "0.5597962", "0.559666", "0.55875933", "0.5580031" ]
0.66601425
7
Total number of negative acknowledgments sent to Cloud Pubsub. Might occur during connector shutdown.
public long getMessageNackCount() { return messageMetrics.nacks.get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int numberOfMessages() {\n\t\treturn 0;\n\t}", "public long getMessageAckCount() {\n return messageMetrics.acks.get();\n }", "int getMessageCount();", "int getMessageCount();", "int getMessageCount();", "int getMessageCount();", "int getMessageCount();", "long getReceivedEventsCount();", "public static int countUnseenMessagesFromAppliance() {\r\n\t\t// System.out.println(\"CustomerBAL.countUnseenMessagesFromAppliance()\");\r\n\t\tint count = 0;\r\n\r\n\t\ttry (Connection connection = Connect.getConnection();) {\r\n\t\t\tif (connection != null) {\r\n\t\t\t\tCallableStatement prepareCall = connection\r\n\t\t\t\t\t\t.prepareCall(\"{CALL count_unseen_status_messages_from_appliance()}\");\r\n\t\t\t\tResultSet resultSet = prepareCall.executeQuery();\r\n\t\t\t\t// End Stored Procedure\r\n\t\t\t\twhile (resultSet.next()) {\r\n\t\t\t\t\tcount = resultSet.getInt(1);\r\n\t\t\t\t}\r\n\t\t\t\t// rs.close();\r\n\t\t\t\t// con.close();\r\n\t\t\t\tconnection.close();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn count;\r\n\r\n\t}", "int getMsgCount();", "int getMsgCount();", "int getMessagesCount();", "int getMessagesCount();", "int getMessagesCount();", "int getNetTransferMsgsCount();", "private int getMaxReconsumeTimes() {\n if (this.defaultMQPushConsumer.getMaxReconsumeTimes() == -1) {\n return Integer.MAX_VALUE;\n } else {\n return this.defaultMQPushConsumer.getMaxReconsumeTimes();\n }\n }", "int getDeliveredCount();", "public Integer getMessageCount() {\r\n return messageCount;\r\n }", "public int getMsgCount() {\n return instance.getMsgCount();\n }", "public int getMsgCount() {\n return instance.getMsgCount();\n }", "@Override\n public int numberOfMessages() {\n return messages.size();\n }", "int getPayloadCount();", "public int getAcksCount() {\n return acks_.size();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "public int unacked() { return unackSize; }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "@Override\r\n\tpublic int countTopics() {\n\t\treturn 0;\r\n\t}", "UnsignedInteger getDeliveryFailures();", "public long getMessageReceivedCount() {\n return messageMetrics.received.get();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "public int getNumAnnouncements(){\n return message.length;\n }", "private int getMessageCount() {\r\n return mMessages.length;\r\n }", "public int getMessagesCount() {\n return messages_.size();\n }", "public int getDeliveredCount() {\n return delivered_.size();\n }", "public int getMsgCount() {\n return msg_.size();\n }", "public int getMsgCount() {\n return msg_.size();\n }", "public long getPendingMessageCount() {\n return (long) this.incUpdateQueue.size();\n }", "public int getSystemMessageCount(){\n\t\treturn iMessageCount;\n\t}", "org.jboss.mq.server.MessageCounter[] getMessageCounter() throws java.lang.Exception;", "public int getMessagesCount() {\n return messages_.size();\n }", "int getUncommittedEventCount();", "public synchronized int getMessageCount() {\n return _references.size();\n }", "int getConsumerCount() {\n return mNoOfConsumers;\n }", "public int getNewMessageCount() {\n return messages.size() + droppedMessages.size();\n }", "int getEnqueuedBlockRequestsNumber() {\n int count = 0;\n for (StdPeerMessage pm : sendQueue) {\n if (pm.type == StdPeerMessage.REQUEST) {\n count++;\n }\n }\n return count;\n }", "@Override\n public int getPayloadByteCount(int valueCount) {\n return 0;\n }", "@Override\n public long getResponseQueueSize() {\n return 0;\n }", "@Override\n public abstract long getReceivedBytesCount();", "public int totalMsgsPerSec()\n\t{\n\t\treturn _totalMsgsPerSec;\n\t}", "public int getScheduledMessageCount() throws Exception\n {\n return destination.queue.getScheduledMessageCount();\n }", "public static int countReceivedBytes() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countSentBytes(messageClassType);\n\n\treturn sum;\n }", "public int getNetTransferMsgsCount() {\n return netTransferMsgs_.size();\n }", "@Nonnegative\n @CheckReturnValue\n public abstract int getRemainingRequests();", "@Override\n public int getResponseQueueLength() {\n return 0;\n }", "@Override\n public int getMessageSize()\n {\n return 0;\n }", "int getQos();", "public int UnassignedCount() {\n \t\treturn jobqueue.size();\n \t}", "public final int getPendingCount()\n/* */ {\n/* 508 */ return this.pending;\n/* */ }", "public int getAcknowledgement() {\n if (loadBurst) {\n inputQueueSize++;\n return 1;\n } else {\n try {\n commonRead(1);\n return buffer[0];\n } catch (IOException | NullPointerException e) {\n e.printStackTrace();\n return 3;\n }\n }\n }", "@Override\r\n\tpublic long count() {\n\t\treturn 0;\r\n\t}", "public int getUnreadMessagesCount() {\n if (pendingIncomingMessages != null){\n\n /*\n * Return the size of the cache\n */\n return pendingIncomingMessages.size();\n\n }\n\n /*\n * Empty cache return 0\n */\n return 0;\n }", "long getTotalAcceptCount();", "@Override\n\tpublic int getMessageCounter() {\n\t\treturn counter;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "public Integer ClearPublishNum(){\r\n\t\treturn 0;\r\n\t}", "public synchronized int getCount() throws MessagingException {\n/* 244 */ parse();\n/* 245 */ return super.getCount();\n/* */ }", "public int getAvailableCount();", "int getNumEvents() {\n int cnt = eventCount;\n for (Entry entry : queue) {\n cnt += entry.eventCount;\n }\n return cnt;\n }", "public int getDeliveredCount() {\n if (deliveredBuilder_ == null) {\n return delivered_.size();\n } else {\n return deliveredBuilder_.getCount();\n }\n }", "public Integer maxMessages();", "public static int countReceivedMessages() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countReceivedMessages(messageClassType);\n\n\treturn sum;\n }", "@Override\n\tpublic long procount() {\n\t\treturn 0;\n\t}", "public static int getPendingRequests() {\n\t\treturn writeQueue.size() + requestsBeingSending.intValue();\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 getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "@Override\r\n\t\tpublic int count() {\n\t\t\treturn 0;\r\n\t\t}", "public static int getUnseenCountAlertsForAdmin() {\r\n\t\tSystem.out.println(\"CustomerBAL.getUnseenCountAlertsForAdmin()\");\r\n\t\tint count = 0;\r\n\t\tConnection con = connection.Connect.getConnection();\r\n\t\ttry {\r\n\r\n\t\t\t/*\r\n\t\t\t * String query =\r\n\t\t\t * \"SELECT COUNT(msg_seen) FROM appliance_message m JOIN appliance ap ON m.msg_from = ap.appliance_GSMno WHERE msg_seen = 0\"\r\n\t\t\t * ; ps2 = (PreparedStatement) con2.prepareStatement(query); rs2 =\r\n\t\t\t * ps2.executeQuery();\r\n\t\t\t */\r\n\r\n\t\t\t// Begin Stored Procedure -- Jeevan\r\n\t\t\tCallableStatement prepareCall = con\r\n\t\t\t\t\t.prepareCall(\"{CALL get_unseen_count_alerts_for_admin()}\");\r\n\t\t\tResultSet resultSet = prepareCall.executeQuery();\r\n\t\t\t// End Stored Procedure\r\n\r\n\t\t\twhile (resultSet.next()) {\r\n\t\t\t\tcount = resultSet.getInt(1);\r\n\t\t\t}\r\n\t\t\tresultSet.close();\r\n\t\t\tprepareCall.close();\r\n\t\t\t// con.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int getTotalNumOfMsg(){ return allmessage.size();}", "public int count() throws Exception {\n\t\treturn 0;\r\n\t}", "int getSubscriptionCount();", "public int getDataMessagesReceived() {\n\t\tint contador = 0;\n\t\tfor (Contacto c : currentUser.getContacts()) {\n\t\t\tcontador += (c.getMessages().size() - c.getMsgsByUser(currentUser.getId()));\n\t\t}\n\t\treturn contador;\n\t}" ]
[ "0.67627", "0.67247856", "0.639182", "0.639182", "0.639182", "0.639182", "0.639182", "0.6311712", "0.6305022", "0.6301559", "0.6301559", "0.62935555", "0.62935555", "0.62935555", "0.62800777", "0.626623", "0.6212558", "0.61873615", "0.6126585", "0.6126585", "0.61176085", "0.6108712", "0.6097079", "0.6097079", "0.60498697", "0.604591", "0.604591", "0.604591", "0.604591", "0.604591", "0.60304224", "0.6029283", "0.6027218", "0.60187525", "0.60187525", "0.60054994", "0.5997411", "0.59559554", "0.59491694", "0.5944915", "0.5944915", "0.5932627", "0.59032923", "0.5898788", "0.58838546", "0.58781517", "0.58719575", "0.58699405", "0.5867065", "0.5842186", "0.5836941", "0.58235574", "0.5817431", "0.58063257", "0.5797225", "0.57949567", "0.5792722", "0.5774009", "0.5763107", "0.5762779", "0.5730012", "0.5727393", "0.57253265", "0.5716522", "0.5714038", "0.570409", "0.5696869", "0.569387", "0.56700766", "0.56700766", "0.56700766", "0.56700766", "0.56700766", "0.56700766", "0.56700766", "0.56700766", "0.5647021", "0.56457585", "0.56349444", "0.5632347", "0.56298864", "0.5628957", "0.5603748", "0.5600233", "0.5593911", "0.55836916", "0.55836916", "0.55836916", "0.55836916", "0.55832875", "0.55832875", "0.55832875", "0.55832875", "0.55832875", "0.5579098", "0.5574509", "0.55704343", "0.5568123", "0.55629295", "0.55411434" ]
0.6839643
0
Total number of messages received from Cloud Pubsub
public long getMessageReceivedCount() { return messageMetrics.received.get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getMessagesCount();", "int getMessagesCount();", "int getMessagesCount();", "long getReceivedEventsCount();", "int getMsgCount();", "int getMsgCount();", "public int getTotalMessageCount(){\n Query query = new Query(\"Message\");\n Query query2 = new Query(\"Question\");\n PreparedQuery results = datastore.prepare(query);\n PreparedQuery results2 = datastore.prepare(query2);\n return results.countEntities(FetchOptions.Builder.withLimit(1000)) + results2.countEntities(FetchOptions.Builder.withLimit(1000));\n}", "public int getMessagesCount() {\n return messages_.size();\n }", "int getSubscriptionCount();", "int getMessageCount();", "int getMessageCount();", "int getMessageCount();", "int getMessageCount();", "int getMessageCount();", "public int getTotalNumOfMsg(){ return allmessage.size();}", "public static int countReceivedMessages() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countReceivedMessages(messageClassType);\n\n\treturn sum;\n }", "@Override\n public int numberOfMessages() {\n return messages.size();\n }", "public int getMessagesCount() {\n return messages_.size();\n }", "public int getTotalMessageCount() {\n Query query = new Query(\"Message\");\n PreparedQuery results = datastore.prepare(query);\n return results.countEntities(FetchOptions.Builder.withLimit(1000));\n }", "public Integer getMessageCount() {\r\n return messageCount;\r\n }", "private int getMessageCount() {\r\n return mMessages.length;\r\n }", "public static int countReceivedBytes() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countSentBytes(messageClassType);\n\n\treturn sum;\n }", "int getNetTransferMsgsCount();", "public int totalMsgsPerSec()\n\t{\n\t\treturn _totalMsgsPerSec;\n\t}", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMessageCount() {\n return message_.size();\n }", "public int getMsgCount() {\n return instance.getMsgCount();\n }", "public int getMsgCount() {\n return instance.getMsgCount();\n }", "public int getMsgCount() {\n return msg_.size();\n }", "public int getMsgCount() {\n return msg_.size();\n }", "public AsyncResult<Integer> requestNumberOfMessages() {\r\n ServiceDiscoveryManager serviceDiscoveryManager = xmppSession.getManager(ServiceDiscoveryManager.class);\r\n return serviceDiscoveryManager.discoverInformation(null, OfflineMessage.NAMESPACE).thenApply(infoDiscovery -> {\r\n if (!infoDiscovery.getExtensions().isEmpty()) {\r\n DataForm dataForm = infoDiscovery.getExtensions().get(0);\r\n if (dataForm != null) {\r\n for (DataForm.Field field : dataForm.getFields()) {\r\n if (\"number_of_messages\".equals(field.getVar())) {\r\n String numberOfMessages = field.getValues().get(0);\r\n return Integer.valueOf(numberOfMessages);\r\n }\r\n }\r\n }\r\n }\r\n return 0;\r\n });\r\n }", "int getPayloadCount();", "public int getDataMessagesReceived() {\n\t\tint contador = 0;\n\t\tfor (Contacto c : currentUser.getContacts()) {\n\t\t\tcontador += (c.getMessages().size() - c.getMsgsByUser(currentUser.getId()));\n\t\t}\n\t\treturn contador;\n\t}", "int getDeliveredCount();", "public int getNumAnnouncements(){\n return message.length;\n }", "public int getSubscriptionCount()\n {\n int count;\n\n synchronized (lock)\n {\n count = (subscriptions != null) ? subscriptions.size() : 0;\n }\n\n return count;\n }", "@Override\n\tpublic int numberOfMessages() {\n\t\treturn 0;\n\t}", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }", "public int getMessagesCount() {\n if (messagesBuilder_ == null) {\n return messages_.size();\n } else {\n return messagesBuilder_.getCount();\n }\n }", "public synchronized int getMessageCount() {\n return _references.size();\n }", "public int getUnreadChatMessageCount();", "@Override\n public abstract long getReceivedBytesCount();", "public int getPublishMessageTotalRows(int userid){\r\n\t\tif(userid==0){\r\n\t\t\treturn baseDAO.queryFactory(new RealActivity(), \"t_realactivity\", \" \").size();\r\n\t\t}else{\r\n\t\t\treturn baseDAO.queryFactory(new RealActivity(), \"t_realactivity\", \" and userId=\"+userid).size();\r\n\t\t}\r\n\t\t/*return ALLPageNum;*/\r\n\t}", "@Override\r\n\tpublic int countTopics() {\n\t\treturn 0;\r\n\t}", "public int getMessagesCount() {\n if (messagesBuilder_ == null) {\n return messages_.size();\n } else {\n return messagesBuilder_.getCount();\n }\n }", "public Integer subscriptionCount() {\n return this.subscriptionCount;\n }", "int getMessageIdCount();", "public int getNumberOfRegisteredMessages() {\n return registeredMessages.size();\n }", "public Integer CounterPublishNum(int count){\r\n\t\treturn ++count;\r\n\t}", "@Override\r\n\tpublic int selectMessageTotal() {\n\t\treturn messageMapper.selectMessageCount();\r\n\t}", "public final int size()\n\t{\n\t\tif (messages == null)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn messages.size();\n\t\t}\n\t}", "public synchronized int getCount() throws MessagingException {\n/* 244 */ parse();\n/* 245 */ return super.getCount();\n/* */ }", "public synchronized int messageCount() {\n \tfinal Query q = mDB.query();\n q.constrain(MessageReference.class);\n q.descend(\"mBoard\").constrain(this).identity();\n return q.execute().size();\n }", "int getPeerCount();", "public static int countReceivedMessages(\n\t Class<? extends TrackedMessage> messageClassType) {\n\treturn TrackedMessage.countReceivedMessages(messageClassType, -1);\n }", "long countByExample(PrivateMessageExample example);", "long getTotalAcceptCount();", "public int getUnreadMessagesCount() {\n if (pendingIncomingMessages != null){\n\n /*\n * Return the size of the cache\n */\n return pendingIncomingMessages.size();\n\n }\n\n /*\n * Empty cache return 0\n */\n return 0;\n }", "public int getDataMessagesSent() {\n\t\tint contador = 0;\n\t\tfor (Contacto c : currentUser.getContacts()) {\n\t\t\tcontador += (c.getMsgsByUser(currentUser.getId()));\n\t\t}\n\t\treturn contador;\n\t}", "int getNumOfStorageMessage();", "int getNumOfStorageMessage();", "long incrementInMsgs() {\n return inMsgs.incrementAndGet();\n }", "public int getCount() {\n\t\treturn channelCountMapper.getCount();\n\t}", "int getTotalCreatedConnections();", "public long getMessageNackCount() {\n return messageMetrics.nacks.get();\n }", "public int getMessageIdCount() {\n return messageId_.size();\n }", "public int getCount() {\n return this.chatMessageList.size();\n }", "public int getNetTransferMsgsCount() {\n return netTransferMsgs_.size();\n }", "long getRequestsCount();", "public static int countRecievedBytes(\n\t Class<? extends TrackedMessage> messageClassType) {\n\treturn TrackedMessage.countReceivedBytes(messageClassType, -1);\n }", "public void incMessagesSent() {\n this.messagesSent++;\n }", "int getNumEvents() {\n int cnt = eventCount;\n for (Entry entry : queue) {\n cnt += entry.eventCount;\n }\n return cnt;\n }", "public int getNewMessageCount() {\n return messages.size() + droppedMessages.size();\n }", "org.jboss.mq.server.MessageCounter[] getMessageCounter() throws java.lang.Exception;", "public int getMessageIdCount() {\n return instance.getMessageIdCount();\n }", "int getChannelStatisticsCount();", "int getChannelsCount();", "public int getNrSubscribers()\r\n {\r\n return subscriberInfos.size();\r\n }", "public long getTotalPosts();", "int getRequestsCount();", "int getRequestsCount();", "public int getNetTransferMsgsCount() {\n if (netTransferMsgsBuilder_ == null) {\n return netTransferMsgs_.size();\n } else {\n return netTransferMsgsBuilder_.getCount();\n }\n }", "public int getSystemMessageCount(){\n\t\treturn iMessageCount;\n\t}", "@Override\r\n\tprotected int count() {\n\t\treturn service.count();\r\n\t}", "public abstract int getMessageSize();", "int getResponseCount();", "public int getMessagesSent() {\n return this.messagesSent;\n }", "public int getTotalPayload() {\n return totalPayload;\n }", "public static int countSentMessages() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countSentMessages(messageClassType);\n\n\treturn sum;\n }", "int getResponsesCount();", "long getMessageFrequency();", "public void getSubscriberCount(SuccessSubscriberCallback callback) throws NoApiKeyException {\n try {\n if (app.getApiKey() == null) {\n throw new NoApiKeyException();\n }\n final CloseableHttpClient httpclient = HttpClients.createDefault();\n final HttpGet httpGet = new HttpGet(\"https://api.justyo.co/subscribers_count/?api_token=\" + app.getApiKey());\n final CloseableHttpResponse response = httpclient.execute(httpGet);\n final InputStream is = response.getEntity().getContent();\n final String json = IOUtils.toString(is, \"UTF-8\");\n EntityUtils.consume(response.getEntity());\n response.close();\n final String result = parseJsonResult(json);\n try {\n final long subs = Long.parseLong(result);\n callback.setSubscribers(subs);\n informCallback(callback, true);\n } catch(java.lang.NumberFormatException ex) {\n callback.setError(result);\n informCallback(callback, false);\n }\n } catch (IOException ex) {\n Logger.getLogger(YoCommunicator.class.getName()).log(Level.SEVERE, null, ex);\n callback.setError(\"IOException\");\n informCallback(callback, false);\n }\n }", "@Override\n\tpublic int getMessageCounter() {\n\t\treturn counter;\n\t}" ]
[ "0.7401984", "0.7401984", "0.7401984", "0.70941865", "0.6996139", "0.6996139", "0.69912523", "0.6887557", "0.6874986", "0.68248487", "0.68248487", "0.68248487", "0.68248487", "0.68248487", "0.6804611", "0.67781335", "0.6762268", "0.6757327", "0.6738152", "0.6634228", "0.6604492", "0.6577721", "0.65731615", "0.6571994", "0.6560564", "0.6560564", "0.6560564", "0.6560564", "0.6560564", "0.6506962", "0.6506962", "0.6470436", "0.6470436", "0.6431727", "0.64266884", "0.642", "0.6378546", "0.62930053", "0.62812084", "0.6280079", "0.6226556", "0.6226556", "0.6226556", "0.6226556", "0.6226556", "0.62156713", "0.6206074", "0.62032413", "0.61911184", "0.6179989", "0.61793613", "0.61718816", "0.6159012", "0.61387295", "0.6089834", "0.6080635", "0.6054186", "0.60496104", "0.6048632", "0.603181", "0.6019935", "0.6000048", "0.5997984", "0.5977311", "0.5971038", "0.5935501", "0.5933421", "0.5933421", "0.5911723", "0.58992106", "0.5894801", "0.58909065", "0.5888381", "0.58870476", "0.5881224", "0.5878731", "0.5870428", "0.5862128", "0.5861692", "0.5849479", "0.58466756", "0.5832184", "0.5815906", "0.58109695", "0.58013827", "0.57946587", "0.57769364", "0.57769364", "0.5768753", "0.57551503", "0.5750486", "0.5750332", "0.5726933", "0.57213753", "0.5718352", "0.5717427", "0.5716883", "0.571317", "0.5711689", "0.5708036" ]
0.66433954
19
do anything with response
@Override public void onResponse(JSONArray response) { for (int i =0; i < response.length();i++){ try { arrayList.add(new cardData(response.getJSONObject(i).getString("category"), imageEndpoint+response.getJSONObject(i).getString("image"))); } catch (JSONException e) { e.printStackTrace(); } } recyclerView = findViewById(R.id.recyclerView2); GridLayoutManager layoutManager = new GridLayoutManager(SecondActivity.this, 2); recyclerView.setLayoutManager(layoutManager); RecyclerView.Adapter adapter = new SecondRecyclerAdapter(SecondActivity.this, arrayList); recyclerView.setAdapter(adapter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void faild_response();", "@Override\n\tpublic void processResponse(Response response)\n\t{\n\t\t\n\t}", "@Override\n\tpublic void handleResponse() {\n\t\t\n\t}", "void execute(final T response);", "@Override\n public void processResult(HttpResponseMessage response) {\n }", "public void parseResponse();", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "public void onResponse(Response response) throws Exception;", "@Override\r\n\tpublic void service(Request request,Response response) {\n\t\tresponse.print(\"lalaa\");\r\n\r\n\t\t\r\n\t}", "@Override\n public void onResponse(Response response) throws IOException {\n }", "@Override\n\t\t\tpublic void handle(Response response) throws Exception\n\t\t\t{\n\t\t\t\tif(response ==null){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(response.getStatusCode()==200){\n\t\t\t\t\tSystem.out.println(\"push seccuess\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public abstract String getResponse();", "protected void handleSuccessMessage(Response response) {\n\t\tonRequestResponse(response);\n\t}", "protected abstract void handleOk();", "@Override\n\t\t\t\t\tpublic void onResponse(String response) {\n\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onResponse(HttpResponse resp) {\n\t\t\t\t\t\tLog.i(\"HttpPost\", \"Success\");\r\n\r\n\t\t\t\t\t}", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n//\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "protected abstract void askResponse();", "public abstract void actionReal(HttpResponseCallback callback);", "@Override\n public void onResponse(String response) {\n\n if (response.equals(update_success)) {\n return;\n }\n if (response.equals(update_fail)) {\n return;\n }\n if (response.equals(non_value)) {\n return;\n }\n if (response.equals(wrong_query)) {\n return;\n }\n if (response.equals(non_post)) {\n\n }\n }", "@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\t getResponse();\n\t\t\t\t\t\t }", "@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}", "public abstract HTTPResponse finish();", "@Override\n public void onResponse(String response, int id) {\n processData(response);\n\n }", "@Override\n public void onResponse(String response) {\n Utils.logApiResponseTime(calendar, tag + \" \" + url);\n mHandleSuccessResponse(tag, response);\n\n }", "void sendResponseMessage(HttpResponse response) throws IOException;", "private void getResponse() {\n response = new Response();\n\n getResponseCode();\n getResponseMessage();\n getResponseBody();\n\n LOG.info(\"--- RESPONSE ---\");\n LOG.info(\"Code: \" + response.getResponseCode());\n LOG.info(\"Message: \" + response.getResponseMessage());\n LOG.info(\"Body: \" + response.getResponseBody());\n LOG.info(\"*************************************\");\n }", "@Override\n public void onResponse(Object response) {\n activity.gotHelper(\"Succes!\");\n }", "@Override\n \t\t\t\tpublic void finished(Response response) {\n \t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n \t\t\t\t}", "@Override\n \t\t\t\tpublic void finished(Response response) {\n \t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n \t\t\t\t}", "@Override\n public void sendResponse(final Response response) {\n\n }", "@Override\n public void onResponse(String response) {\n }", "void responseReady(String response);", "@Override\n public void onResponseSuccess(final String resp) {\n }", "@Override\n\t\t\t\t\tpublic void onResponse(String s) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public Object handleCommandResponse(Object response) throws RayoProtocolException;", "@Override\n public void onResponse(String response) {\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "@Override\n\tpublic void sendResponse() {\n\t\t\n\t}", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "public Response callback() throws Exception;", "@Override\n public void onResponse(String response) {\n }", "@Override\n\t\t\t\t\t\tpublic void onResponse(String response) {\n\t\t\t\t\t\t\tparseRespense(response);\n\t\t\t\t\t\t}", "@Override\n public void onResponse(String response) {\n Log.i(\"Checking\", response + \" \");\n if(new ServerReply(response).getStatus())\n {\n Toast.makeText(context,new ServerReply(response).getReason(),Toast.LENGTH_LONG).show();\n }\n\n }", "static void processResponse(CTPResponse response)\n {\n \tfor(int i=0;i<response.GetNumResponses();i++)\n \t{\n \t\tint type = response.getReponseType(i);\n \t\tswitch (type) {\n\t \t\tcase CTPResponse.ERROR_RSP:{\n\t \t\t\tif(response.getStatus(i)== -1)\n\t \t\t\tSystem.out.println(\"ERROR_RSP Invalid client request\");\t\n\t \t\t\telse\n\t \t\t\tSystem.out.println(\"ERROR_RSP \"+response.getErrorText(i));\t\n\t \t\t\tbreak;\n\t \t\t}\n\t \t\tcase CTPResponse.ACKCONNECT_RSP:{\n\t \t\t\tSystem.out.println(\"ACKCONNECT_RSP received\");\t\n\t \t\t\tbreak;\n\t \t\t}\n\t\t\t\tcase CTPResponse.ACKOPEN_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKOPEN_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.ACKLOCK_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKLOCK_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.ACKEDIT_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKEDIT_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.SERVRELEASE_RSP:{\n\t\t\t\t\tSystem.out.println(\"SERVRELEASE_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.CONTENTS_RSP:{\n\t\t\t\t\tSystem.out.println(\"CONTENTS_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Position in file = \"+response.getPosInfile(i));\n\t\t\t\t\tSystem.out.println(\"file data = \"+response.getFilData(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.MOVE_RSP:{\n\t\t\t\t\tSystem.out.println(\"MOVE_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Cursor position in file= \"+response.getPosInfile(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.STATUS_RSP:{\n\t\t\t\t\tSystem.out.println(\"STATUS_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Checksum = \"+response.getChecksum(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.EDIT_RSP:{\n\t\t\t\t\tSystem.out.println(\"EDIT_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"action = \"+response.getEditAction(i));\n\t\t\t\t\tSystem.out.println(\"Position in file = \"+response.getPosInfile(i));\n\t\t\t\t\tSystem.out.println(\"file data = \"+response.getFilData(i));\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.CLOSE_RSP:{\n\t\t\t\t\tSystem.out.println(\"CLOSE_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: \n\t\t\t\t\tSystem.out.println(\"Invalid Response type received\");\t\n \t\t}//end switch\n \t}//end for loop\n }", "private static Response process(Object result) {\n if (result == null) return Response.serverError().build();\n if (result instanceof Response.Status) return Response.status((Response.Status) result).build();\n return Response.ok(result).build();\n }", "@Override\n public void onResponse(String response) {\n finalData(response);\n }", "private CallResponse() {\n initFields();\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "@Override\n\t\t\tprotected void deliverResponse(String response) {\n\n\t\t\t}", "public void sendResponse(ResponseNetObject response){\r\n\r\n sendObject(response);\r\n\r\n }", "public void handleResponseInternal(long connection, Object obj) {\n JResponse response = (JResponse) obj;\n Logger.m1416d(TAG, \"Action - handleResponse - connection:\" + connection + \", response:\" + response.toString());\n if (connection != NetworkingClient.sConnection.get()) {\n Logger.m1432w(TAG, \"Response connection is out-dated. \");\n }\n Long rid = response.getHead().getRid();\n Requesting origin = dequeSentQueue(rid);\n if (origin == null) {\n Logger.m1432w(TAG, \"Not found the request in SentQueue when response.\");\n } else {\n rid = origin.request.getHead().getRid();\n endSentTimeout(rid);\n }\n Requesting requesting = (Requesting) this.mRequestingCache.get(rid);\n if (requesting != null) {\n endRequestTimeout(requesting);\n } else {\n Logger.m1432w(TAG, \"Not found requesting in RequestingCache when response.\");\n }\n }", "@Override\n public void onResponse(Result appResponse, Invoker<?> invoker, Invocation invocation) {\n }", "@Override\n\tpublic void sendResponse() {\n\n\t}", "public void run() {\n req.response().end(\"0\"); // Default response = 0\n }", "void receiveResponse(String invocationId, HttpResponse response);", "void xhrOk();", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tbundle.putInt(HANDLER_DATA_APK_INDEX, this.getApkIndex());\r\n\t\t\t\tMessage msg =new Message();\r\n\t\t\t\tmsg.setData(bundle);\r\n\t\t\t\tmsg.what = HANDLER_MSG_APK_UPLOAD;\r\n\t\t\t\thandler.sendMessage(msg);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "public void startResponse()\n\t\t\t{\n\t\t\t\tsend(\"<response>\", false);\n\t\t\t}", "@Override\n\t\t\t\tpublic void finished(Response response) {\n\t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t\tSystem.out.println(arg0);\n\t\t\t\t\t\n\t\t\t\t}", "public abstract void handle(Request request, Response response) throws Exception;", "public void get(HttpRequest request, HttpResponse response) {\n\t\tresponse.setStatus(HttpStatus.SERVER_ERROR_NOT_IMPLEMENTED);\n\t\tresponse.write(\" \");\n\t}", "void execute(HttpServletRequest request, HttpServletResponse response)\n throws Exception;", "@Override\n\t\t\t\t\tpublic void onResponse(BaseBean arg0) {\n\t\t\t\t\t\tif (arg0 != null) {\n\t\t\t\t\t\t\tif (\"1\".equals(arg0.getCode())) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tSharePerfUtil.saveLinkMan(edt_name.getText().toString());\n//\t\t\t\t\t\t\t\tSharePerfUtil.savePersonHead(url)\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\tToast.makeText(GetPersonalInfoActivity.this,\n\t\t\t\t\t\t\t\t\t\targ0.getMsg(), 1000).show();\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tToast.makeText(GetPersonalInfoActivity.this,\n\t\t\t\t\t\t\t\t\t\targ0.getMsg(), 1000).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(GetPersonalInfoActivity.this, \"暂无数据!\",\n\t\t\t\t\t\t\t\t\t1000).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tbundle.putInt(HANDLER_DATA_APK_INDEX, this.getApkIndex());\r\n\t\t\t\tMessage msg =new Message();\r\n\t\t\t\tmsg.setData(bundle);\r\n\t\t\t\tmsg.what = HANDLER_MSG_APK_ADD;\r\n\t\t\t\thandler.sendMessage(msg);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "private void observeResponse(final JSONObject response) {\n if (response.length() > 0) {\n if (response.has(\"code\")) {\n System.out.println(\"Failed to add contact\");\n }\n } else {\n Log.d(\"JSON Response\", \"No Response\");\n }\n }", "public String handleResponse(final HttpResponse response) throws IOException{\n int status = response.getStatusLine().getStatusCode();\n if (status >= 200 && status < 300) {\n HttpEntity entity = response.getEntity();\n if(entity == null) {\n return \"\";\n } else {\n return EntityUtils.toString(entity);\n }\n } else {\n return \"\"+status;\n }\n }", "void onResponseTaskCompleted(Request request, Response response, OHException ohex, Object data);", "ResponseEntity execute();", "@Override\n public void onResponse(String response) {\n opprettListe(response);\n }", "@Override\r\n\tpublic void onOk(HttpRequest paramHttpRequest, Object paramObject) {\n\r\n\t}", "public void onRequestResponse(Response response) { }", "void responseReceived(byte[] response);", "@SuppressLint(\"CallbackMethodName\")\n void reply(@NonNull byte[] response);", "protected abstract void output(DavServletResponse response)\n throws IOException;", "java.lang.String getResponse();", "public void selectResponse(String response , Player player);", "@Override\n\tpublic void processRequest(HttpRequest request, HttpResponse response) throws Exception {\n\t\tresponse.setHeaderField( \"Server-Name\", \"Las2peer 0.1\" );\n\t\tresponse.setContentType( \"text/xml\" );\n\t\t\n\t\t\n\t\t\n\t\tif(authenticate(request,response))\n\t\t\tif(invoke(request,response));\n\t\t\t\t//logout(_currentUserId);\n\t \n\t\n\t\t//connector.logMessage(request.toString());\n\t\t\n\t\t\n\t}", "boolean hasResponse();", "boolean hasResponse();", "boolean hasResponse();", "boolean hasResponse();", "boolean hasResponse();", "boolean hasResponse();", "boolean hasResponse();", "boolean hasResponse();", "boolean hasResponse();", "private void handleRequestResponse(JSONObject answer) {\n\t\tJSONArray events = answer.optJSONArray(\"events\");\n\t\tif (events!=null) {\n\t\t\tlong time = System.currentTimeMillis();\n\t\t\tint length = events.length();\n\t\t\tfor (int i=0; i<length; i++) {\n\t\t\t\tLogEvent event = LogEvent.fromJSON(events.getJSONObject(i));\n\t\t\t\tevent.time = time;\n\t\t\t\tevent.ignore = true; // don't send back to logging server\n\t\t\t\tthis.plugin.postEvent(event);\n\t\t\t}\n\t\t}\n\t\tJSONObject plugins = answer.optJSONObject(\"plugins\");\n\t\tif (plugins!=null && !plugin.bukkitMode) {\n\t\t\tthis.plugin.updater.setAvailablePlugins(plugins);\n\t\t}\n\t}", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif (WebApi.isRespSuccess(response)){\r\n\t\t\t\tString str = WebApi.getRespMsg(response);\r\n\t\t\t\tif (str != WebApi.API_RESP_MSG_NULL){\r\n\t\t\t\t\tupdateApkState(str);\r\n\t\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_UPDATED);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "@Override\n public void onResponse(String response) {\n if(null != listener){\n listener.onComplete(mRespHandler.parse(response));\n }\n }", "private synchronized void processHttpRequest\n\t\t(HttpRequest request,\n\t\t HttpResponse response)\n\t\tthrows IOException\n\t\t{\n\t\tlong now = System.currentTimeMillis();\n\n\t\t// Reject an invalid HTTP request.\n\t\tif (! request.isValid())\n\t\t\t{\n\t\t\tresponse.setStatusCode\n\t\t\t\t(HttpResponse.Status.STATUS_400_BAD_REQUEST);\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tout.println (\"<P>\");\n\t\t\tout.println (\"400 Bad Request\");\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Reject all methods except GET.\n\t\telse if (! request.getMethod().equals (HttpRequest.GET_METHOD))\n\t\t\t{\n\t\t\tresponse.setStatusCode\n\t\t\t\t(HttpResponse.Status.STATUS_501_NOT_IMPLEMENTED);\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tout.println (\"<P>\");\n\t\t\tout.println (\"501 Not Implemented\");\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Print the status document.\n\t\telse if (request.getUri().equals (\"/\") ||\n\t\t\t\t\trequest.getUri().equals (\"/?\"))\n\t\t\t{\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tprintStatusHtmlBody (out, now);\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Print the debug document.\n\t\telse if (request.getUri().equals (\"/debug\"))\n\t\t\t{\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintDebugHtmlStart (out, now);\n\t\t\tprintDebugHtmlBody (out);\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Reject all other URIs.\n\t\telse\n\t\t\t{\n\t\t\tresponse.setStatusCode\n\t\t\t\t(HttpResponse.Status.STATUS_404_NOT_FOUND);\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tout.println (\"<P>\");\n\t\t\tout.println (\"404 Not Found\");\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Send the response.\n\t\tresponse.close();\n\t\t}", "@Override\r\n\tprotected void processOk() {\n\t\tboolean isExito = consultarSustentoProxy.isExito();\r\n\t\tif (isExito) {\r\n\t\t\tint status = consultarSustentoProxy.getResponse().getStatus();\r\n\t\t\tif (status == 0) {\r\n\t\t\t\tList<SustentoTO> sustento = consultarSustentoProxy.getResponse().getListaSustento();\r\n\t\t\t\tadap = new EfficientAdapter(this, sustento);\r\n\t\t\t\tsetListAdapter(adap);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tshowToast(consultarSustentoProxy.getResponse().getDescripcion());\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tprocessError();\r\n\t\t}\r\n\t\tsuper.processOk();\r\n\t}", "private void sendResponse(HttpServletResponse response, String text) {\n try (PrintWriter pw = response.getWriter()) {\n pw.println(text);\n } catch (IOException e) {\n log.error(e);\n }\n }" ]
[ "0.79426897", "0.7364535", "0.71089447", "0.70610934", "0.70000875", "0.68810135", "0.68329155", "0.68329155", "0.6785315", "0.6778337", "0.6710226", "0.6655047", "0.6629885", "0.6625666", "0.6625453", "0.66068256", "0.6597449", "0.65902555", "0.65775585", "0.6571541", "0.65661114", "0.6559522", "0.655917", "0.6545614", "0.6543499", "0.6536462", "0.65363604", "0.65299976", "0.6529219", "0.65281236", "0.6519262", "0.6508152", "0.6508152", "0.65072846", "0.65041333", "0.65010303", "0.6495106", "0.6481705", "0.64793384", "0.64725024", "0.6469683", "0.6466405", "0.6461402", "0.6461402", "0.6461402", "0.64574325", "0.64512837", "0.6447542", "0.6439091", "0.64384854", "0.6435841", "0.64322287", "0.6431553", "0.64308614", "0.6416812", "0.64097846", "0.63963574", "0.6392554", "0.6390115", "0.63870066", "0.6385327", "0.6376511", "0.63679457", "0.63561076", "0.63539296", "0.6349841", "0.6349221", "0.63448846", "0.6328012", "0.6314121", "0.63077563", "0.6306675", "0.6304545", "0.63038015", "0.6302937", "0.6293386", "0.6291892", "0.6286244", "0.62855864", "0.62620544", "0.626176", "0.6255878", "0.62497544", "0.62330693", "0.6221165", "0.6217259", "0.6217259", "0.6217259", "0.6217259", "0.6217259", "0.6217259", "0.6217259", "0.6217259", "0.6217259", "0.6212928", "0.62108654", "0.6208633", "0.6203652", "0.61905044", "0.61864394", "0.6185796" ]
0.0
-1
/ If child need this method,please override it
public void validate() throws ValidationException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n protected void prot() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_6349() {\r\n super.method_6349();\r\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n protected void init() {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void makeChildcare() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\r\n\tprotected void parentMethod() {\n\t\tsuper.parentMethod();\r\n\t\tSystem.out.println(\"ChildParentMethod\");\r\n\t}", "@Override\r\n\tpublic void loeschen() {\r\n//\t\tsuper.leuchterAbmelden(this);\r\n\t\tsuper.loeschen();\r\n\t}", "protected void init() {\n // to override and use this method\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n super.init();\n\n }", "@Override\r\n\tpublic void onCustomUpdate() {\n\t\t\r\n\t}", "protected void method_3848() {\r\n super.method_3848();\r\n }", "@Override\n public void render() { super.render(); }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n void init() {\n }", "protected void childInit()\n {\n }", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\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\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void modify() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void deneme() {\n\t\tsuper.deneme();\n\t}", "public void init() {\r\n\t\t// to override\r\n\t}", "@Override\r\n\tpublic void carDashboar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tprotected void onMove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\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 render () {\n super.render();\n\t}", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n public void update() {\n \n }", "@Override\n\tpublic void e() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }" ]
[ "0.7229996", "0.7198883", "0.69328237", "0.68876195", "0.6794127", "0.6773522", "0.6683578", "0.6683578", "0.6675879", "0.6666391", "0.6664571", "0.6617686", "0.65441126", "0.65441126", "0.65388674", "0.65388674", "0.6516929", "0.6463845", "0.6432666", "0.6394137", "0.63940024", "0.63916665", "0.6352035", "0.6340876", "0.6321732", "0.63214004", "0.63154674", "0.6311484", "0.63013726", "0.62977815", "0.6275624", "0.6274798", "0.6260661", "0.6252635", "0.6251353", "0.6223164", "0.6202199", "0.61877793", "0.6167158", "0.61630076", "0.6157772", "0.61525524", "0.613841", "0.61279875", "0.61239153", "0.6118091", "0.6105745", "0.6101835", "0.61013395", "0.61013395", "0.61000687", "0.60876065", "0.6070573", "0.606597", "0.6061754", "0.6061754", "0.6061754", "0.6055606", "0.60487103", "0.6027996", "0.6026866", "0.6022067", "0.6000222", "0.5971836", "0.59604913", "0.59585583", "0.5956983", "0.5956208", "0.59535915", "0.59535915", "0.59535915", "0.59535915", "0.59535915", "0.59535915", "0.5945989", "0.5937403", "0.5937081", "0.5934536", "0.5930206", "0.59296954", "0.59273756", "0.59243965", "0.59168875", "0.5905576", "0.59018046", "0.58954287", "0.58952594", "0.58889043", "0.58814645", "0.5879967", "0.5879967", "0.5879967", "0.58781534", "0.587688", "0.587688", "0.5871014", "0.58676225", "0.5867534", "0.5860404", "0.5859149", "0.5859149" ]
0.0
-1
/ If child need this method,please override it
public String getEntityName() { 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 public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n protected void prot() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_6349() {\r\n super.method_6349();\r\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n protected void init() {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void makeChildcare() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\r\n\tprotected void parentMethod() {\n\t\tsuper.parentMethod();\r\n\t\tSystem.out.println(\"ChildParentMethod\");\r\n\t}", "@Override\r\n\tpublic void loeschen() {\r\n//\t\tsuper.leuchterAbmelden(this);\r\n\t\tsuper.loeschen();\r\n\t}", "protected void init() {\n // to override and use this method\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n super.init();\n\n }", "@Override\r\n\tpublic void onCustomUpdate() {\n\t\t\r\n\t}", "protected void method_3848() {\r\n super.method_3848();\r\n }", "@Override\n public void render() { super.render(); }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n void init() {\n }", "protected void childInit()\n {\n }", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\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\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void modify() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void deneme() {\n\t\tsuper.deneme();\n\t}", "protected boolean func_70814_o() { return true; }", "public void init() {\r\n\t\t// to override\r\n\t}", "@Override\r\n\tpublic void carDashboar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tprotected void onMove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n\tpublic void render () {\n super.render();\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n public void update() {\n \n }", "@Override\n\tpublic void e() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }" ]
[ "0.7231273", "0.7199804", "0.69341356", "0.68882585", "0.6793815", "0.6774806", "0.66845894", "0.66845894", "0.6677009", "0.66665167", "0.6665381", "0.6618889", "0.654523", "0.654523", "0.6539973", "0.6539973", "0.65175694", "0.64637226", "0.6433564", "0.6395271", "0.63951355", "0.63925445", "0.635275", "0.63419235", "0.6322586", "0.6321683", "0.63162446", "0.6313161", "0.630257", "0.62988037", "0.6277231", "0.62762856", "0.626182", "0.6253666", "0.6251989", "0.6224246", "0.6202546", "0.6189388", "0.6168525", "0.61643815", "0.61577016", "0.6153115", "0.61392033", "0.6129241", "0.6124105", "0.6118714", "0.6105845", "0.6102584", "0.6101982", "0.6101982", "0.6100225", "0.6088596", "0.6072104", "0.60666513", "0.6063062", "0.6063062", "0.6063062", "0.6056103", "0.60497326", "0.60283166", "0.6027706", "0.60225743", "0.6000599", "0.5971031", "0.5961226", "0.5960762", "0.5957579", "0.5957372", "0.5953791", "0.5953791", "0.5953791", "0.5953791", "0.5953791", "0.5953791", "0.594757", "0.593893", "0.59381396", "0.59350705", "0.59306765", "0.5930331", "0.5927418", "0.5925792", "0.59184885", "0.5907057", "0.5901343", "0.58959687", "0.58955926", "0.5890433", "0.5881875", "0.5880491", "0.5880491", "0.5880491", "0.5879303", "0.5879303", "0.58791876", "0.58722645", "0.58696735", "0.5868254", "0.5861652", "0.58599234", "0.58599234" ]
0.0
-1
Adding our menu to toolbar
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_menu, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.toolbar, menu);\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_toolbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater menuInflater = getMenuInflater();\n menuInflater.inflate(R.menu.toolbar_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.toolbar_menu, menu);\n\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 }", "private MenuBar setupMenu () {\n MenuBar mb = new MenuBar ();\n Menu fileMenu = new Menu (\"File\");\n openXn = makeMenuItem (\"Open Connection\", OPEN_CONNECTION);\n closeXn = makeMenuItem (\"Close Connection\", CLOSE_CONNECTION);\n closeXn.setEnabled (false);\n MenuItem exit = makeMenuItem (\"Exit\", EXIT_APPLICATION);\n fileMenu.add (openXn);\n fileMenu.add (closeXn);\n fileMenu.addSeparator ();\n fileMenu.add (exit);\n\n Menu twMenu = new Menu (\"Tw\");\n getWksp = makeMenuItem (\"Get Workspace\", GET_WORKSPACE);\n getWksp.setEnabled (false);\n twMenu.add (getWksp);\n\n mb.add (fileMenu);\n mb.add (twMenu);\n return mb;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.index_toolbar_menu, menu);\n return true;\n }", "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 }", "void modifyToolbar(Toolbar toolbar){\r\n toolbar.setTitle(name);\r\n toolbar.inflateMenu(R.menu.menu_toolbar_package);\r\n\r\n //needed to send context to util classes\r\n final Context context = this;\r\n\r\n toolbar.setOnMenuItemClickListener(\r\n new Toolbar.OnMenuItemClickListener() {\r\n @Override\r\n public boolean onMenuItemClick(MenuItem item) {\r\n switch (item.getItemId())\r\n {\r\n case R.id.action_exit_fragment:\r\n onBackPressed();\r\n break;\r\n case R.id.action_phone:\r\n DialogUtil.makePhoneDialog(context,R.string.dialog_phone_title, R.string.dialog_phone_customer_positive, selectedTask.getReceiver().getPhone());\r\n break;\r\n case R.id.action_sms:\r\n DialogUtil.makeSMSDialog(context, selectedTask);\r\n break;\r\n default:break;\r\n }\r\n return true;\r\n }\r\n });\r\n\r\n }", "private void setToolBarInfo() {\n mToolbar = (Toolbar)findViewById(R.id.toolbar);\n mToolbar.setTitle(\"Chatアプリ\");\n mToolbar.setTitleTextColor(-1);\n mToolbar.setNavigationIcon(R.drawable.common_google_signin_btn_icon_light);\n //setActionBar(toolbar);\n mToolbar.inflateMenu(R.menu.main_menu);\n mToolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n // メニューのクリック処理\n switch (item.getItemId()) {\n case R.id.sign_out_menu:\n mFirebaseAuth.signOut();\n Intent intent = new Intent();\n intent.setClassName(D.packageRoot, D.packageRoot + \".MainActivity\");\n startActivity(intent);\n return true;\n }\n return true;\n }\n });\n //setSupportActionBar(toolbar);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.tool_bar, menu);\n return true;\n }", "private BrowserToolbar() {\n\t\tinitComponents();\n\t}", "public void generateMenu(){\n\t\tmenuBar = new JMenuBar();\n\n\t\tJMenu file = new JMenu(\"File\");\n\t\tJMenu tools = new JMenu(\"Tools\");\n\t\tJMenu help = new JMenu(\"Help\");\n\n\t\tJMenuItem open = new JMenuItem(\"Open \");\n\t\tJMenuItem save = new JMenuItem(\"Save \");\n\t\tJMenuItem exit = new JMenuItem(\"Exit \");\n\t\tJMenuItem preferences = new JMenuItem(\"Preferences \");\n\t\tJMenuItem about = new JMenuItem(\"About \");\n\n\n\t\tfile.add(open);\n\t\tfile.add(save);\n\t\tfile.addSeparator();\n\t\tfile.add(exit);\n\t\ttools.add(preferences);\n\t\thelp.add(about);\n\n\t\tmenuBar.add(file);\n\t\tmenuBar.add(tools);\n\t\tmenuBar.add(help);\n\t}", "public Menu createToolsMenu();", "public void addMenuItems()\n\t{\n\t\tstartButton = new JButton(\"Start\");\n\t\tstartButton.setLayout(null);\n\t\tstartButton.setBounds(350, 225, 100, 50);\n\t\t\n\t\toptionsButton = new JButton(\"Options\");\n\t\toptionsButton.setLayout(null);\n\t\toptionsButton.setBounds(350, 275, 100, 50);\n\t\t\n\t\texitButton = new JButton(\"Exit\");\n\t\texitButton.setLayout(null);\n\t\texitButton.setBounds(350, 375, 100, 50);\n\t\texitButton.setActionCommand(\"exit\");\n\t\texitButton.addActionListener((ActionListener) this);\n\t\t\n\t\tmainMenuPanel.add(startButton);\n\t\tmainMenuPanel.add(optionsButton);\n\t\tmainMenuPanel.add(startButton);\n\t}", "private void placeActions() {\n IActionBars actionBars = getViewSite().getActionBars();\n\n // first in the menu\n IMenuManager menuManager = actionBars.getMenuManager();\n menuManager.add(mCreateFilterAction);\n menuManager.add(mEditFilterAction);\n menuManager.add(mDeleteFilterAction);\n menuManager.add(new Separator());\n menuManager.add(mClearAction);\n menuManager.add(new Separator());\n menuManager.add(mExportAction);\n\n // and then in the toolbar\n IToolBarManager toolBarManager = actionBars.getToolBarManager();\n for (CommonAction a : mLogLevelActions) {\n toolBarManager.add(a);\n }\n toolBarManager.add(new Separator());\n toolBarManager.add(mCreateFilterAction);\n toolBarManager.add(mEditFilterAction);\n toolBarManager.add(mDeleteFilterAction);\n toolBarManager.add(new Separator());\n toolBarManager.add(mClearAction);\n }", "protected void addActivePathToolbarButton ()\n {\n\n }", "@Override\n protected int getToolbarMenu() {\n return R.menu.menu_activity_create_estate;\n }", "private void setupToolBar() {\n\t\tbOk = ConfirmPanel.createOKButton(false);\n\t\tbOk.addActionListener(this);\n\t\tbSearch = ConfirmPanel.createRefreshButton(true);\n\t\tbSearch.addActionListener(this);\n\t\tbCancel = ConfirmPanel.createCancelButton(false);\n\t\tbCancel.addActionListener(this);\n\t\tbZoom = ConfirmPanel.createZoomButton(true);\n\t\tbZoom.addActionListener(this);\n\t\tbExport = ConfirmPanel.createExportButton(true);\n\t\tbExport.addActionListener(this);\n\t\tbDelete = ConfirmPanel.createDeleteButton(true);\n\t\tbDelete.addActionListener(this);\n\t\tAppsAction selectAllAction = new AppsAction(\"SelectAll\", null, Msg.getMsg(Env.getCtx(),\"SelectAll\"));\n\t\tselectAllAction.setDelegate(this);\n\t\tbSelectAll = (CButton) selectAllAction.getButton();\n\t\ttoolsBar = new javax.swing.JToolBar();\n\t}", "private void createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}", "@Override\n public void setToolbar(MToolBar arg0)\n {\n \n }", "private void create_toolbar() {\n setSupportActionBar(toolbar);\n getSupportActionBar().setTitle(\"Event Planner\");//this will set the title of our application\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.heropagetoolbar, menu);\n return true;\n }", "public void menuSetup(){\r\n menu.add(menuItemSave);\r\n menu.add(menuItemLoad);\r\n menu.add(menuItemRestart);\r\n menuBar.add(menu); \r\n topPanel.add(menuBar);\r\n bottomPanel.add(message);\r\n \r\n this.setLayout(new BorderLayout());\r\n this.add(topPanel, BorderLayout.NORTH);\r\n this.add(middlePanel, BorderLayout.CENTER);\r\n this.add(bottomPanel, BorderLayout.SOUTH);\r\n \r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.editcontact_toolbar_ment, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.tool_bar, menu);\n toolbar.getMenu().findItem(R.id.confirm).setVisible(true);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n // Inflate the menu; this adds items to the action bar if it is present.\n getMenuInflater().inflate(R.menu.menu_toolbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n // Inflate the menu; this adds items to the action bar if it is present.\n getMenuInflater().inflate(R.menu.menu_toolbar, menu);\n return true;\n }", "private void CreateToolBars(){\n toolBar = new ToolBar();\n btoolBar = new ToolBar();\n login=new Button(\"Login\");\n simulate=new Button(\"Simulate\");\n scoreBoardButton=new Button(\"ScoreBoard\");\n viewBracket= new Button(\"view Bracket\");\n clearButton=new Button(\"Clear\");\n resetButton=new Button(\"Reset\");\n finalizeButton=new Button(\"Finalize\");\n toolBar.getItems().addAll(\n createSpacer(),\n login,\n simulate,\n scoreBoardButton,\n viewBracket,\n createSpacer()\n );\n btoolBar.getItems().addAll(\n createSpacer(),\n clearButton,\n resetButton,\n finalizeButton,\n createSpacer()\n );\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.filtertoolbar, menu);\n return true;\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 setupMenu() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tJMenuItem conn = new JMenuItem(connectAction);\n\t\tJMenuItem exit = new JMenuItem(\"退出\");\n\t\texit.addActionListener(new AbstractAction() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\texit();\n\t\t\t}\n\t\t});\n\t\tJMenu file = new JMenu(\"客户端\");\n\t\tfile.add(conn);\n\t\tmenuBar.add(file);\n\t\tsetJMenuBar(menuBar);\n\t}", "private void setupToolBar(){\n Toolbar toolbar = (Toolbar)findViewById(R.id.my_toolbar);\n setSupportActionBar(toolbar);\n\n getSupportActionBar().setHomeButtonEnabled(true);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n }", "private void configureToolBar(){\n this.toolbar = (Toolbar) findViewById(R.id.activity_main_toolbar);\n setSupportActionBar(toolbar);\n }", "@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.addtitlebar, menu);\n return true;\n }", "private void createToolBar() {\r\n toolbar = new JToolBar();\r\n inbox = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.INBOX_ICON)), \"Maintain Inbox\", \"Maintain Inbox\");\r\n awards = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.AWARDS_ICON)), \"Maintain Awards\", \"Maintain Awards\");\r\n proposal = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PROPOSAL_ICON)), \"Maintain InstituteProposals\", \"Maintain Institute Proposals\");\r\n proposalDevelopment = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PROPOSAL_DEVELOPMENT_ICON)), \"Maintain ProposalDevelopment\", \"Maintain Proposal Development\");\r\n rolodex = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.ROLODEX_ICON)), \"Maintain Rolodex\", \"Maintain Rolodex\");\r\n sponsor = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.SPONSOR_ICON)), \"Maintain Sponsor\", \"Maintain Sponsor\");\r\n subContract = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.SUBCONTRACT_ICON)), \"Maintain SubContract\", \"Maintain Subcontract\");\r\n negotiations = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.NEGOTIATIONS_ICON)), \"Maintain Negotiations\", \"Maintain Negotiations\");\r\n buisnessRules = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.BUSINESS_RULES_ICON)), \"Maintain BusinessRules\", \"Maintain Business Rules\");\r\n map = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.MAP_ICON)), \"Maintain Map\", \"Maintain Map\");\r\n personnal = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PERSONNAL_ICON)), \"Maintain Personal\", \"Maintain Personnel\");\r\n users = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.USERS_ICON)), \"Maintain Users\", \"Maintain Users\");\r\n unitHierarchy = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.UNIT_HIERARCHY_ICON)), \"Maintain UnitHierarchy\", \"Maintain Unit Hierarchy\");\r\n cascade = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.CASCADE_ICON)), \"Cascade\", \"Cascade\");\r\n tileHorizontal = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.TILE_HORIZONTAL_ICON)), \"Tile Horizontal\", \"Tile Horizontal\");\r\n tileVertical = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.TILE_VERTICAL_ICON)), \"Tile Vertical\", \"Tile Vertical\");\r\n layer = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.LAYER_ICON)), \"Layer\", \"Layer\");\r\n \r\n /*Added Icons are Committe,Protocol,Shedule. The Icons are different.Non-availability of standard Icon - Chandrashekar*/\r\n //Added for COEUSQA-2580_Change menu item name from \"Protocol\" to \"IRB Protocol\" on Maintain menu in Premium - Start\r\n /* JM 05-02-2013\r\n irbProtocol = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PROTOCOL_ICON)), \"Protocol\", \"IRB Protocol\");\r\n \r\n irbProtocolSubmission = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PROTOCOL_SUBMISSION_BASE_ICON)),\"Protocol Submission\",\"IRB Protocol Submission\");\r\n */\r\n //Added for COEUSQA-2580_Change menu item name from \"Protocol\" to \"IRB Protocol\" on Maintain menu in Premium - End\r\n /* JM 05-02-2013\r\n schedule = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.SCHEDULE_ICON)), \"Schedule\", \"Schedule\");\r\n committee = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.COMMITTEE_ICON)), \"Committee\", \"Committee\");\r\n */\r\n //Added for COEUSQA-2580_Change menu item name from \"Protocol\" to \"IRB Protocol\" on Maintain menu in Premium - Start\r\n //irbProtocolSubmission = new CoeusToolBarButton(new ImageIcon(\r\n // getClass().getClassLoader().getResource(CoeusGuiConstants.PROTOCOL_SUBMISSION_BASE_ICON)),\"Protocol Submission\",\"IRB Protocol Submission\");\r\n //Added for COEUSQA-2580_Change menu item name from \"Protocol\" to \"IRB Protocol\" on Maintain menu in Premium - End\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium start\r\n /* JM 05-02-2013\r\n iacucProtocol = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.IACUC_PROTOCOL_ICON)), \"Protocol\", \"IACUC Protocol\");\r\n \r\n iacucProtocolSubmission = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.IACUC_PROTOCOL_SUBMISSION_BASE_ICON)),\"Protocol Submission\",\"IACUC Protocol Submission\");\r\n */\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium end\r\n \r\n /* JM 4-25-2016 adding new Contact Coeus Help button */\r\n contactCoeusHelp = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.HELP_ICON)), \"Contact Coeus Help\", \"Contact Coeus Help\");\r\n /* JM END */\r\n \r\n exit = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.EXIT_ICON)), \"Exit\", \"Exit\");\r\n \r\n \r\n toolbar.add(inbox);\r\n toolbar.addSeparator();\r\n toolbar.add(awards);\r\n toolbar.add(proposal);\r\n toolbar.add(proposalDevelopment);\r\n toolbar.add(rolodex);\r\n toolbar.add(sponsor);\r\n toolbar.add(subContract);\r\n toolbar.add(negotiations);\r\n toolbar.add(buisnessRules);\r\n toolbar.add(map);\r\n toolbar.add(personnal);\r\n toolbar.add(users);\r\n toolbar.add(unitHierarchy);\r\n \r\n /*Added Icons are Committe,Protocol,Shedule - Chandrashekar*/\r\n /* JM 05-02-2013\r\n toolbar.add(irbProtocol);\r\n toolbar.add(irbProtocolSubmission);\r\n \r\n toolbar.add(schedule);\r\n toolbar.add(committee);\r\n */\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium start\r\n /* JM 05-02-2013\r\n toolbar.add(iacucProtocol);\r\n toolbar.add(iacucProtocolSubmission);\r\n */\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium end\r\n \r\n toolbar.addSeparator();\r\n toolbar.add(cascade);\r\n toolbar.add(tileHorizontal);\r\n toolbar.add(tileVertical);\r\n toolbar.add(layer);\r\n toolbar.addSeparator();\r\n \r\n /* JM 4-25-2016 adding new Contact Coeus Help button */\r\n toolbar.add(contactCoeusHelp);\r\n toolbar.addSeparator();\r\n /* JM END */\r\n \r\n toolbar.add(exit);\r\n \r\n toolbar.setFloatable(false);\r\n setTextLabels(false);\r\n MouseListener pl = new PopupListener();\r\n cpm = new CoeusPopupMenu();\r\n toolbar.addMouseListener(pl);\r\n \r\n inbox.addActionListener(this);\r\n awards.addActionListener(this);\r\n proposal.addActionListener(this);\r\n proposalDevelopment.addActionListener(this);\r\n rolodex.addActionListener(this);\r\n sponsor.addActionListener(this);\r\n subContract.addActionListener(this);\r\n negotiations.addActionListener(this);\r\n buisnessRules.addActionListener(this);\r\n map.addActionListener(this);\r\n personnal.addActionListener(this);\r\n users.addActionListener(this);\r\n unitHierarchy.addActionListener(this);\r\n cascade.addActionListener(this);\r\n tileHorizontal.addActionListener(this);\r\n tileVertical.addActionListener(this);\r\n layer.addActionListener(this);\r\n /*Added Icons are Committe,Protocol,Shedule - Chandrashekar*/\r\n /* JM 05-02-2013\r\n irbProtocol.addActionListener(this);\r\n schedule.addActionListener(this);\r\n committee.addActionListener(this);\r\n irbProtocolSubmission.addActionListener(this);\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium start\r\n iacucProtocol.addActionListener(this);\r\n iacucProtocolSubmission.addActionListener(this); */\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium end\r\n \r\n /* JM 4-25-2016 adding new Contact Coeus Help button */\r\n contactCoeusHelp.addActionListener(this);\r\n /* JM END */\r\n \r\n exit.addActionListener(this);\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.mainactivity_toolbar_overflowmenu,menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.settings_main_toolbar_menu, menu);\n return true;\n }", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.activity_picture_toolbar, menu);\n return true;\n }", "private void configureToolBar() {\n toolBar = findViewById(R.id.my_first_toolbar);\n setSupportActionBar(toolBar);\n getSupportActionBar().setDisplayShowTitleEnabled(false);\n }", "public void setToolbar() {\n myToolbar = (Toolbar) findViewById(R.id.toolbar_menu_nav);\n myToolbar.setTitle(R.string.Toolbar_Dashboard);\n setSupportActionBar(myToolbar);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n menu.add(Menu.NONE, Menu.FIRST + 1, 0, \"帮助\"); \n menu.add(Menu.NONE, Menu.FIRST + 2, 0, \"关于XCL-Charts\"); \n\t\treturn true;\n\t}", "private void defineToolBar() {\r\n //ARREGLO CON LOS BOTONES ORDENADOS POR POSICION\r\n tools = new ImageView[]{im_tool1,im_tool2,im_tool3,im_tool4,im_tool5,im_tool6,im_tool7,im_tool8,im_tool9,im_tool10,im_tool11,im_tool12}; \r\n //CARGA DE LA BD LA CONFIGURACION DE USUARIO PARA LA PANTALLA\r\n toolsConfig = Ln.getInstance().loadToolBar();\r\n // arreglo con cada etiqueta, ordenado por boton\r\n tooltips = new String[]{\r\n \"Nueva \" + ScreenName + \" \",\r\n \"Editar \" + ScreenName + \" \",\r\n \"Guardar \" + ScreenName + \" \",\r\n \"Cambiar Status de \" + ScreenName + \" \",\r\n \"Imprimir \" + ScreenName + \" \",\r\n \"Cancelar \",\r\n \"Sin Asignar \",\r\n \"Faltante en \" + ScreenName + \" \",\r\n \"Devolución en \" + ScreenName + \" \",\r\n \"Sin Asignar\",\r\n \"Sin Asignar\",\r\n \"Buscar \" + ScreenName + \" \"\r\n };\r\n //se asigna la etiqueta a su respectivo boton\r\n for (int i = 0; i < tools.length; i++) { \r\n Tooltip tip_tool = new Tooltip(tooltips[i]);\r\n Tooltip.install(tools[i], tip_tool);\r\n }\r\n \r\n im_tool7.setVisible(false);\r\n im_tool8.setVisible(false);\r\n im_tool9.setVisible(false);\r\n im_tool10.setVisible(false);\r\n im_tool11.setVisible(false);\r\n }", "public void setMenu() {\n\t \n\t\ttop = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\t add(top, BorderLayout.CENTER);\n\t \n\t lPro = new JLabel(\"Projects: \");\n\t top.add(lPro);\n\t \n\t cPro = new JComboBox();\n\t getProject();\n\t\ttop.add(cPro);\n\t\t\n\t\tview = new JButton(\"View Sample\");\n\t\ttop.add(view);\n\t\t\n\t\tbottom = new JPanel(new FlowLayout(FlowLayout.CENTER));\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\t\n\t\tcancel = new JButton(\"Cancel\");\n\t\tbottom.add(cancel);\n\t\t\n\t\tdownload = new JButton(\"Download\");\n\t\tbottom.add(download);\n\t\t\n\t\tsetActionListener();\t\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n MenuItem languageItem = menu.findItem(R.id.toolbar_ic_language);\n MenuItem currencyItem = menu.findItem(R.id.toolbar_ic_currency);\n MenuItem profileItem = menu.findItem(R.id.toolbar_edit_profile);\n MenuItem searchItem = menu.findItem(R.id.toolbar_ic_search);\n MenuItem cartItem = menu.findItem(R.id.toolbar_ic_cart);\n profileItem.setVisible(false);\n languageItem.setVisible(false);\n currencyItem.setVisible(false);\n searchItem.setVisible(false);\n cartItem.setVisible(false);\n }", "@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tmenu.add(0, 1, 1, \"添加图书类别\");\n\t\tmenu.add(0, 2, 2, \"返回主界面\");\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\n\t}", "public void toolbarImplementacionIsmael() {\n\t\t// ToolBar Fuente\n\t\tbtnFuente = new JButton(\"Fuente\");\n\t\tbtnFuente.setEnabled(false);\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnFuente.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnFuente);\n\n\t\tbtnSeleccionarTodo = new JButton(\"Selec.Todo\");\n\t\tbtnSeleccionarTodo.setEnabled(false);\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnSeleccionarTodo.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnSeleccionarTodo);\n\n\t\tbtnHora = new JButton(\"Hora\");\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnHora.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnHora);\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}", "private MenuManager() {\r\n\r\n\t\t\tmenubar = new Menu(shell, SWT.BAR);\r\n\t\t\tshell.setMenuBar(menubar);\r\n\t\t}", "public void addMenus(GridBagLayout gridBagLayout) {\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tthis.setJMenuBar(menuBar);\n\t\t\n\t\tJMenu mnFile = new JMenu(\"File\");\n\t\tmenuBar.add(mnFile);\n\t\t\n\t\tJMenu mnHelp = new JMenu(\"Help\");\n\t\tmenuBar.add(mnHelp);\n\t\t\n\t\tJMenuItem exit = new JMenuItem(\"Exit\", KeyEvent.VK_X);\n\t\tJMenuItem about = new JMenuItem(\"About\", KeyEvent.VK_A);\n\t\t\n\t\texit.setActionCommand(\"exit\");\n\t\tabout.setActionCommand(\"about\");\n\t\t\n\t\texit.addActionListener(new GUIAction());\n\t\tabout.addActionListener(new GUIAction());\n\t\t\n\t\tmnFile.add(exit);\n\t\tmnHelp.add(about);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "public void initToolbar(){\n //check if toolbar is already inflated\n if(mToolbar == null){\n //if null, inflate the toolbar\n mToolbar = (Toolbar)findViewById(mHouseKeeper.getToolbarId());\n //set support for toolbar, onCreateOptionsMenu() will be called\n setSupportActionBar(mToolbar);\n }\n }", "public void initToolbar() {\r\n\r\n ((HomeActivity) getActivity()).setUpToolbar(getString(R.string.help), false, true, false,false);\r\n\r\n\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.toolbar_meeting_edit, menu);\n return true;\n }", "protected abstract void addMenuOptions();", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.tools, menu);\r\n return true;\r\n }", "private void createToolbars() {\n\t\tJToolBar toolBar = new JToolBar(\"Tools\");\n\t\ttoolBar.setFloatable(true);\n\n\t\ttoolBar.add(new JButton(new ActionNewDocument(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionOpen(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionSave(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionSaveAs(flp, this)));\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(new JButton(new ActionCut(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionCopy(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionPaste(flp, this)));\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(new JButton(new ActionStatistics(flp, this)));\n\n\t\tthis.getContentPane().add(toolBar, BorderLayout.PAGE_START);\n\t}", "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 boolean onCreateOptionsMenu(Menu menu){\n getMenuInflater().inflate(R.menu.toolbar_nomenu,menu);\n return true;\n }", "private void initMenuBar() {\r\n\t\t// file menu\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic(KeyEvent.VK_F);\r\n\t\tadd(fileMenu);\r\n\r\n\t\tJMenuItem fileNewMenuItem = new JMenuItem(new NewAction(parent, main));\r\n\t\tfileNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileNewMenuItem);\r\n\t\tJMenuItem fileOpenMenuItem = new JMenuItem(new OpenAction(parent, main));\r\n\t\tfileOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileOpenMenuItem);\r\n\r\n\t\tJMenuItem fileSaveMenuItem = new JMenuItem(new SaveAction(main));\r\n\t\tfileSaveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveMenuItem);\r\n\t\tJMenuItem fileSaveAsMenuItem = new JMenuItem(new SaveAsAction(main));\r\n\t\tfileSaveAsMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveAsMenuItem);\r\n\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.addSeparator();\r\n\r\n\t\tJMenuItem exitMenuItem = new JMenuItem(new ExitAction(main));\r\n\t\texitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(exitMenuItem);\r\n\r\n\t\t// tools menu\r\n\t\tJMenu toolsMenu = new JMenu(\"Application\");\r\n\t\ttoolsMenu.setMnemonic(KeyEvent.VK_A);\r\n\t\tadd(toolsMenu);\r\n\r\n\t\tJMenuItem defineCategoryMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineCategoryAction());\r\n\t\tdefineCategoryMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_C, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineCategoryMenuItem);\r\n\t\tJMenuItem defineBehaviorNetworkMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineBehaviorNetworkAction());\r\n\t\tdefineBehaviorNetworkMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_B, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineBehaviorNetworkMenuItem);\r\n\t\tJMenuItem startSimulationMenuItem = new JMenuItem(\r\n\t\t\t\tnew StartSimulationAction(main));\r\n\t\tstartSimulationMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_E, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(startSimulationMenuItem);\r\n\r\n\t\t// help menu\r\n\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\thelpMenu.setMnemonic(KeyEvent.VK_H);\r\n\t\tadd(helpMenu);\r\n\r\n\t\tJMenuItem helpMenuItem = new JMenuItem(new HelpAction(parent));\r\n\t\thelpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\thelpMenu.add(helpMenuItem);\r\n\r\n\t\t// JCheckBoxMenuItem clock = new JCheckBoxMenuItem(new\r\n\t\t// ScheduleSaveAction(parent));\r\n\t\t// helpMenu.add(clock);\r\n\t\thelpMenu.addSeparator();\r\n\t\tJMenuItem showMemItem = new JMenuItem(new ShowMemAction(parent));\r\n\t\thelpMenu.add(showMemItem);\r\n\r\n\t\tJMenuItem aboutMenuItem = new JMenuItem(new AboutAction(parent));\r\n\t\thelpMenu.add(aboutMenuItem);\r\n\t}", "private void buildMenu() {\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n\n JMenu fileMenu = new JMenu(\"File\");\n fileMenu.addMenuListener(this);\n\n JMenuItem openItem = new JMenuItem(\"Open\");\n openItem.setEnabled(false);\n JMenuItem newItem = new JMenuItem(\"New\");\n newItem.setEnabled(false);\n saveItem = new JMenuItem(\"Save\");\n saveItem.setEnabled(false);\n saveAsItem = new JMenuItem(\"Save As\");\n saveAsItem.setEnabled(false);\n reloadCalItem = new JMenuItem(RELOAD_CAL);\n exitItem = new JMenuItem(EXIT);\n\n mbar.add(makeMenu(fileMenu, new Object[]{newItem, openItem, null,\n reloadCalItem, null,\n saveItem, saveAsItem, null, exitItem}, this));\n\n JMenu viewMenu = new JMenu(\"View\");\n mbar.add(viewMenu);\n JMenuItem columnItem = new JMenuItem(COLUMNS);\n columnItem.addActionListener(this);\n JMenuItem logItem = new JMenuItem(LOG);\n logItem.addActionListener(this);\n JMenu satMenu = new JMenu(\"Satellite Image\");\n JMenuItem irItem = new JMenuItem(INFRA_RED);\n irItem.addActionListener(this);\n JMenuItem wvItem = new JMenuItem(WATER_VAPOUR);\n wvItem.addActionListener(this);\n satMenu.add(irItem);\n satMenu.add(wvItem);\n viewMenu.add(columnItem);\n viewMenu.add(logItem);\n viewMenu.add(satMenu);\n\n observability = new JCheckBoxMenuItem(\"Observability\", true);\n observability.setToolTipText(\"Check that the source is observable.\");\n remaining = new JCheckBoxMenuItem(\"Remaining\", true);\n remaining.setToolTipText(\n \"Check that the MSB has repeats remaining to be observed.\");\n allocation = new JCheckBoxMenuItem(\"Allocation\", true);\n allocation.setToolTipText(\n \"Check that the project still has sufficient time allocated.\");\n\n String ZOA = System.getProperty(\"ZOA\", \"true\");\n boolean tickZOA = true;\n if (\"false\".equalsIgnoreCase(ZOA)) {\n tickZOA = false;\n }\n\n zoneOfAvoidance = new JCheckBoxMenuItem(\"Zone of Avoidance\", tickZOA);\n localQuerytool.setZoneOfAvoidanceConstraint(!tickZOA);\n\n disableAll = new JCheckBoxMenuItem(\"Disable All\", false);\n JMenuItem cutItem = new JMenuItem(\"Cut\",\n new ImageIcon(ClassLoader.getSystemResource(\"cut.gif\")));\n cutItem.setEnabled(false);\n JMenuItem copyItem = new JMenuItem(\"Copy\",\n new ImageIcon(ClassLoader.getSystemResource(\"copy.gif\")));\n copyItem.setEnabled(false);\n JMenuItem pasteItem = new JMenuItem(\"Paste\",\n new ImageIcon(ClassLoader.getSystemResource(\"paste.gif\")));\n pasteItem.setEnabled(false);\n\n mbar.add(makeMenu(\"Edit\",\n new Object[]{\n cutItem,\n copyItem,\n pasteItem,\n null,\n makeMenu(\"Constraints\", new Object[]{observability,\n remaining, allocation, zoneOfAvoidance, null,\n disableAll}, this)}, this));\n\n mbar.add(SampClient.getInstance().buildMenu(this, sorter, table));\n\n JMenu helpMenu = new JMenu(\"Help\");\n helpMenu.setMnemonic('H');\n\n mbar.add(makeMenu(helpMenu, new Object[]{new JMenuItem(INDEX, 'I'),\n new JMenuItem(ABOUT, 'A')}, this));\n\n menuBuilt = true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.vendor_newlead_bar, menu);\n return true;\n }", "private void initMenu() {\n \n JMenuBar menuBar = new JMenuBar();\n \n JMenu commands = new JMenu(\"Commands\");\n \n JMenuItem add = new JMenuItem(\"Add\");\n add.addActionListener((ActionEvent e) -> {\n changeState(\"Add\");\n });\n commands.add(add);\n \n JMenuItem search = new JMenuItem(\"Search\");\n search.addActionListener((ActionEvent e) -> {\n changeState(\"Search\");\n });\n commands.add(search);\n \n JMenuItem quit = new JMenuItem(\"Quit\");\n quit.addActionListener((ActionEvent e) -> {\n System.out.println(\"QUITING\");\n System.exit(0);\n });\n commands.add(quit);\n \n menuBar.add(commands);\n \n setJMenuBar(menuBar);\n }", "private void makeToolsMenu() {\r\n\t\tJMenu toolsMnu = new JMenu(\"Herramientas\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Usuarios\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Manejo de Usuarios\",\r\n\t\t\t\t\timageLoader.getImage(\"users.png\"));\r\n\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'm',\r\n\t\t\t\t\t\"Manejar los usuarios del sistema\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F7, 0), Users.class);\r\n\r\n\t\t\ttoolsMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"FacturacionManual\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion Manual\",\r\n\t\t\t\t\timageLoader.getImage(\"kwrite.png\"));\r\n\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Manejar la Facturacion Manual\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F3, 0), ManualInvoice.class);\r\n\r\n\t\t\ttoolsMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\ttoolsMnu.setMnemonic('h');\r\n\t\t\tadd(toolsMnu);\r\n\t\t}\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "private void contributeToActionBars() {\n\t\tIActionBars bars = getViewSite().getActionBars();\n\t\tfillLocalPullDown(bars.getMenuManager());\n\t\tfillLocalToolBar(bars.getToolBarManager());\n\t}", "protected void fillMenuBar(IMenuManager menuBar){\n\t\tIWorkbenchWindow window = getActionBarConfigurer().getWindowConfigurer().getWindow();\n\t\tmenuBar.add(createFileMenu(window));\n\t\tmenuBar.add(createEditMenu());\n\t\tmenuBar.add(ToolsBoxFonctions.createToolBoxMenu(window));\n\t\tmenuBar.add(createHelpMenu(window));\n\t}", "public void initMenu(){\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n getMenuInflater().inflate(R.menu.menu, menu); //Recibe como parametro el menu donde se situan las acciones\r\n return true; //Para que la barra sea visible\r\n }", "private void createMenuBar(){\n\t\tmenuBar = new JMenuBar();\n\t\t\n\t\t//Create the \"File\" menu\n\t\tthis.createFileMenu();\n\t\tmenuBar.add(fileMenu);\n\t\t\t\t\n\t\t//Create \"debug\" menu[disabled]\n\t\t//createDebugMenu();\t\t\n\t\t\n\t\t//last to be added to the menubar: about\n\t\tabout = new JMenuItem(\"About\");\n\t\tabout.addActionListener(this);\n\t\tmenuBar.add(about);\n\t}", "private void setToolBar() {\r\n toolbar.setTitle(R.string.photo_details);\r\n ActionBar ab = getSupportActionBar();\r\n if (ab != null) {\r\n ab.setDisplayHomeAsUpEnabled(true);\r\n }\r\n toolbar.setNavigationIcon(R.drawable.ic_back);\r\n }", "private void initialiseToolbar() {\n getSupportActionBar().setTitle(\"Custom Interval\");\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n }", "public Menu createViewMenu();", "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}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "private void createToolbar() {\n\t\ttoolbarPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\n\t\tString iconsDir = \"icons/\";\n\n\t\tfileToolbar = new JToolBar();\n\t\tfileToolbar.setName(\"File\");\n\n\t\t// Componentes da barra de ferramentas de arquivo\n\t\tIcon newFileIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"new.png\"));\n\t\tnewFileButton = new JButton(newFileIcon);\n\t\tnewFileButton.setToolTipText(\"Novo arquivo\");\n\n\t\tIcon openFileIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"open.png\"));\n\t\topenFileButton = new JButton(openFileIcon);\n\t\topenFileButton.setToolTipText(\"Abrir arquivo\");\n\t\topenFileButton.addActionListener(new OpenFileHandler());\n\n\t\tIcon saveFileIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"save.png\"));\n\t\tsaveFileButton = new JButton(saveFileIcon);\n\t\tsaveFileButton.setToolTipText(\"Salvar arquivo\");\n\n\t\t// fileToolbar.add(newFileButton);\n\t\tfileToolbar.add(openFileButton);\n\t\t// fileToolbar.add(saveFileButton);\n\n\t\t// Componentes da barra de ferramentas de rede\n\t\tnetworkComponentsToolbar = new JToolBar();\n\t\tnetworkComponentsToolbar.setName(\"Network components\");\n\n\t\tIcon newPlaceIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"circle_stroked.png\"));\n\t\taddPlaceButton = new JButton(newPlaceIcon);\n\t\taddPlaceButton.setToolTipText(\"Adicionar lugar\");\n\n\t\tIcon newTransitionIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"pipe.png\"));\n\t\taddTransitionButton = new JButton(newTransitionIcon);\n\t\taddTransitionButton.setToolTipText(\"Adicionar transição\");\n\n\t\tIcon newEdgeIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"arrow_alt_right.png\"));\n\t\taddEdgeButton = new JButton(newEdgeIcon);\n\t\taddEdgeButton.setToolTipText(\"Adicionar aresta\");\n\n\t\tnetworkComponentsToolbar.add(addPlaceButton);\n\t\tnetworkComponentsToolbar.add(addTransitionButton);\n\t\tnetworkComponentsToolbar.add(addEdgeButton);\n\n\t\ttoolbarPanel.add(fileToolbar);\n\t\t// toolbarPanel.add(networkComponentsToolbar);\n\n\t\tthis.add(toolbarPanel, BorderLayout.NORTH);\n\t}", "private void setupMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t// Build the first menu.\n\t\tJMenu menu = new JMenu(Messages.getString(\"Gui.File\")); //$NON-NLS-1$\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenuBar.add(menu);\n\n\t\t// a group of JMenuItems\n\t\tJMenuItem menuItem = new JMenuItem(openAction);\n\t\tmenu.add(menuItem);\n\n\t\t// menuItem = new JMenuItem(openHttpAction);\n\t\t// menu.add(menuItem);\n\n\t\t/*\n\t\t * menuItem = new JMenuItem(crudAction); menu.add(menuItem);\n\t\t */\n\n\t\tmenuItem = new JMenuItem(showLoggingFrameAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(quitAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuBar.add(menu);\n\n\t\tJMenu optionMenu = new JMenu(Messages.getString(\"Gui.Options\")); //$NON-NLS-1$\n\t\tmenuItem = new JCheckBoxMenuItem(baselineModeAction);\n\t\toptionMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(toggleButtonsAction);\n\t\toptionMenu.add(menuItem);\n\n\t\tmenuBar.add(optionMenu);\n\t\tJMenu buttonMenu = new JMenu(Messages.getString(\"Gui.Buttons\")); //$NON-NLS-1$\n\t\tmenuItem = new JMenuItem(wrongAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(attendingAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(independentAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(verbalAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(modelingAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(noAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuBar.add(buttonMenu);\n\t\tframe.setJMenuBar(menuBar);\n\n\t\tframe.pack();\n\n\t\tframe.setVisible(true);\n\t}", "public boolean onCreateOptionsMenu(Menu menu) {\n //Shows '+' icon Top Right Side of Toolbar\n getMenuInflater().inflate(R.menu.menu_add_only, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.administrator_appbar_buttons_add_edit_pet, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n /* Use AppCompatActivity's method getMenuInflater to get a handle on the menu inflater */\n MenuInflater inflater = getMenuInflater();\n /* Use the inflater's inflate method to inflate our visualizer_menu layout to this menu */\n inflater.inflate(R.menu.menu_movie, menu);\n /* Return true so that the visualizer_menu is displayed in the Toolbar */\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_bar, menu);\n return true;\n\n }", "public static void activateMenu() {\n instance.getMenu().show();\n }", "private void setToolbar() {\n setSupportActionBar(toolbar);\n getSupportActionBar().setTitle(\"E-Place\");//untuk get title\n getSupportActionBar().setIcon(R.drawable.ic_launcher);\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n }", "MenuBar setMenu() {\r\n\t\t// initially set up the file chooser to look for cfg files in current directory\r\n\t\tMenuBar menuBar = new MenuBar(); // create main menu\r\n\r\n\t\tMenu mFile = new Menu(\"File\"); // add File main menu\r\n\t\tMenuItem mExit = new MenuItem(\"Exit\"); // whose sub menu has Exit\r\n\t\tmExit.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\tpublic void handle(ActionEvent t) { // action on exit\r\n\t\t\t\ttimer.stop(); // stop timer\r\n\t\t\t\tSystem.exit(0); // exit program\r\n\t\t\t}\r\n\t\t});\r\n\t\tmFile.getItems().addAll(mExit); // add load, save and exit to File menu\r\n\r\n\t\tMenu mHelp = new Menu(\"Help\"); // create Help menu\r\n\t\tMenuItem mAbout = new MenuItem(\"About\"); // add Welcome sub menu item\r\n\t\tmAbout.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent actionEvent) {\r\n\t\t\t\tshowAbout(); // whose action is to give welcome message\r\n\t\t\t}\r\n\t\t});\r\n\t\tmHelp.getItems().addAll(mAbout); // add Welcome and About to Run main item\r\n\r\n\t\tmenuBar.getMenus().addAll(mFile, mHelp); // set main menu with File, Config, Run, Help\r\n\t\treturn menuBar; // return the menu\r\n\t}", "private void createToolbars() {\r\n\t\tJToolBar toolBar = new JToolBar(\"Tool bar\");\r\n\t\ttoolBar.add(createBlankDocument);\r\n\t\ttoolBar.add(openDocumentAction);\r\n\t\ttoolBar.add(saveDocumentAction);\r\n\t\ttoolBar.add(saveDocumentAsAction);\r\n\t\ttoolBar.add(closeCurrentTabAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(copyAction);\r\n\t\ttoolBar.add(cutAction);\r\n\t\ttoolBar.add(pasteAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(getStatsAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(exitAction);\r\n\t\t\r\n\t\tgetContentPane().add(toolBar, BorderLayout.PAGE_START);\r\n\t}", "public boolean onCreateOptionsMenu (Menu m) {\n\n getMenuInflater().inflate(R.menu.k_toolbar_menu, m);\n return true;\n }", "@SuppressWarnings(\"LeakingThisInConstructor\")\n public ToolsMenu(MMStudio studio, JMenuBar menuBar) {\n mmStudio_ = studio;\n core_ = mmStudio_.core();\n quickAccessMenu_ = new JMenu(\"Quick Access Panels\");\n\n JMenu toolsMenu = GUIUtils.createMenuInMenuBar(menuBar, \"Tools\");\n\n GUIUtils.addMenuItem(toolsMenu, \"Refresh GUI\",\n \"Refresh all GUI controls directly from the hardware\", () -> {\n core_.updateSystemStateCache();\n mmStudio_.uiManager().updateGUI(true);\n },\n \"arrow_refresh.png\");\n\n toolsMenu.addSeparator();\n\n GUIUtils.addMenuItem(toolsMenu, \"Script Panel...\",\n \"Open Micro-Manager script editor window\",\n mmStudio_.uiManager()::showScriptPanel);\n\n populateQuickAccessMenu();\n toolsMenu.add(quickAccessMenu_);\n\n GUIUtils.addMenuItem(toolsMenu, \"Shortcuts...\",\n \"Create keyboard shortcuts to activate image acquisition, \"\n + \"mark positions, or run custom scripts\",\n HotKeysDialog::new);\n\n GUIUtils.addMenuItem(toolsMenu, \"Messages...\",\n \"Show the Messages window\", () -> ((DefaultAlertManager)\n mmStudio_.alerts()).alertsWindow().showWithoutFocus(),\n \"bell.png\");\n\n toolsMenu.addSeparator();\n\n GUIUtils.addMenuItem(toolsMenu, \"Stage Control...\",\n \"Control the stage position with a virtual joystick\",\n () -> StageControlFrame.showStageControl(mmStudio_),\n \"move.png\");\n\n centerAndDragMenuItem_ = GUIUtils.addCheckBoxMenuItem(toolsMenu,\n \"Mouse Moves Stage (Use Hand Tool)\",\n \"When enabled, double clicking or dragging in the snap/live\\n\"\n + \"window moves the XY-stage. Requires the hand tool.\", () -> {\n boolean state = centerAndDragMenuItem_.isSelected();\n mmStudio_.updateCenterAndDragListener(state);\n String icon = state ? \"move_hand_on.png\" : \"move_hand.png\";\n centerAndDragMenuItem_.setIcon(IconLoader.getIcon(\n \"/org/micromanager/icons/\" + icon));\n },\n getMouseMovesStage());\n String icon = getMouseMovesStage() ? \"move_hand_on.png\" : \"move_hand.png\";\n centerAndDragMenuItem_.setIcon(IconLoader.getIcon(\n \"/org/micromanager/icons/\" + icon));\n\n GUIUtils.addMenuItem(toolsMenu, \"Stage Position List...\",\n \"Open the stage position list window\",\n () -> mmStudio_.app().showPositionList(),\n \"application_view_list.png\");\n\n toolsMenu.addSeparator();\n\n GUIUtils.addMenuItem(toolsMenu, \"Multi-Dimensional Acquisition...\",\n \"Open multi-dimensional acquisition setup window\",\n mmStudio_.uiManager()::openAcqControlDialog,\n \"film.png\");\n\n toolsMenu.addSeparator();\n\n GUIUtils.addMenuItem(toolsMenu, \"Options...\",\n \"Set a variety of Micro-Manager configuration options\", () -> {\n final int oldBufsize = mmStudio_.settings().getCircularBufferSize();\n\n OptionsDlg dlg = new OptionsDlg(core_, mmStudio_);\n dlg.setVisible(true);\n // adjust memory footprint if necessary\n if (oldBufsize != mmStudio_.settings().getCircularBufferSize()) {\n try {\n core_.setCircularBufferMemoryFootprint(\n mmStudio_.settings().getCircularBufferSize());\n } catch (Exception exc) {\n ReportingUtils.showError(exc);\n }\n }\n });\n\n mmStudio_.events().registerForEvents(this);\n }", "private void initToolBar(){\n toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n }", "public MainToolbar createToolbar()\r\n {\n WbSwingUtilities.invoke(this::_createToolbar);\r\n return toolbar;\r\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.display_guide, menu);\n \t\treturn true;\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}", "private void createMenus() {\r\n\t\t// File menu\r\n\t\tmenuFile = new JMenu(Constants.C_FILE_MENU_TITLE);\r\n\t\tmenuBar.add(menuFile);\r\n\t\t\r\n\t\tmenuItemExit = new JMenuItem(Constants.C_FILE_ITEM_EXIT_TITLE);\r\n\t\tmenuItemExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tactionOnClicExit();\t\t// Action triggered when the Exit item is clicked.\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuFile.add(menuItemExit);\r\n\t\t\r\n\t\t// Help menu\r\n\t\tmenuHelp = new JMenu(Constants.C_HELP_MENU_TITLE);\r\n\t\tmenuBar.add(menuHelp);\r\n\t\t\r\n\t\tmenuItemHelp = new JMenuItem(Constants.C_HELP_ITEM_HELP_TITLE);\r\n\t\tmenuItemHelp.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemHelp);\r\n\t\t\r\n\t\tmenuItemAbout = new JMenuItem(Constants.C_HELP_ITEM_ABOUT_TITLE);\r\n\t\tmenuItemAbout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicAbout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemAbout);\r\n\t\t\r\n\t\tmenuItemReferences = new JMenuItem(Constants.C_HELP_ITEM_REFERENCES_TITLE);\r\n\t\tmenuItemReferences.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicReferences();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemReferences);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n //add MenuItem(s) to ActionBar using Java code\n MenuItem menuItem_Purchase = menu.add(0, 1, Menu.NONE, \"Next\");\n MenuItemCompat.setShowAsAction(menuItem_Purchase,\n MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);\n\n //Log.d(\"recon\", savedSite.toString());\n return true;\n }", "private Component buildToolBar() {\r\n DToolBar toolBar = new DToolBar();\r\n// toolBar.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n toolBar.setFloatable(true);\r\n toolBar.putClientProperty(\"JToolBar.isRollover\", Boolean.TRUE);\r\n // Swing\r\n toolBar.putClientProperty(\r\n Options.HEADER_STYLE_KEY,\r\n settings.getToolBarHeaderStyle());\r\n toolBar.putClientProperty(\r\n PlasticLookAndFeel.BORDER_STYLE_KEY,\r\n settings.getToolBarPlasticBorderStyle());\r\n toolBar.putClientProperty(\r\n WindowsLookAndFeel.BORDER_STYLE_KEY,\r\n settings.getToolBarWindowsBorderStyle());\r\n toolBar.putClientProperty(\r\n PlasticLookAndFeel.IS_3D_KEY,\r\n settings.getToolBar3DHint());\r\n\r\n AbstractButton button;\r\n/*\r\n toolBar.add(createToolBarButton(\"backward.gif\", \"Back\"));\r\n button = createToolBarButton(\"forward.gif\", \"Next\");\r\n button.setEnabled(false);\r\n toolBar.add(button);*/\r\n \r\n button = createToolBarButton(\"home.gif\", ResourceUtil.getString(\"HOME\"));\r\n toolBar.add(button);\r\n button.addActionListener(this);\r\n button.setActionCommand(\"home\");\r\n// toolBar.addSeparator();\r\n \r\n button = createToolBarButton(\"preference16.gif\", ResourceUtil.getString(\"PREFERENCES\"));\r\n toolBar.add(button);\r\n button.setRolloverIcon(readImageIcon(\"preference16_over.gif\"));\r\n button.addActionListener(this);\r\n button.setActionCommand(\"Preferences\");\r\n toolBar.addSeparator();\r\n\r\n button = createToolBarButton(\"new16.gif\", ResourceUtil.getString(\"NEW\"));\r\n button.setActionCommand(\"new\");\r\n button.addActionListener(this);\r\n toolBar.add(button);\r\n \r\n button = createToolBarButton(\"save_edit.gif\", ResourceUtil.getString(\"SAVE\"));\r\n button.setActionCommand(\"save\");\r\n button.addActionListener(this);\r\n toolBar.add(button);\r\n \r\n button = createToolBarButton(\"delete16.gif\", ResourceUtil.getString(\"DELETE\"));\r\n button.setActionCommand(\"delete\");\r\n button.addActionListener(this);\r\n toolBar.add(button);\r\n \r\n button = createToolBarButton(\"print.gif\", ResourceUtil.getString(\"PRINT\"));\r\n button.setActionCommand(\"print\");\r\n button.addActionListener(this);\r\n toolBar.add(button);\r\n/* \r\n toolBar.add(createToolBarButton(\"print.gif\", \"Print\"));\r\n toolBar.add(createToolBarButton(\"refresh.gif\", \"Update\"));\r\n toolBar.addSeparator();\r\n\r\n ButtonGroup group = new ButtonGroup();\r\n button = createToolBarRadioButton(\"pie_mode.png\", \"Pie Chart\");\r\n button.setSelectedIcon(readImageIcon(\"pie_mode_selected.gif\"));\r\n group.add(button);\r\n button.setSelected(true);\r\n toolBar.add(button);\r\n\r\n button = createToolBarRadioButton(\"bar_mode.png\", \"Bar Chart\");\r\n button.setSelectedIcon(readImageIcon(\"bar_mode_selected.gif\"));\r\n group.add(button);\r\n toolBar.add(button);\r\n\r\n button = createToolBarRadioButton(\"table_mode.png\", \"Table\");\r\n button.setSelectedIcon(readImageIcon(\"table_mode_selected.gif\"));\r\n group.add(button);\r\n toolBar.add(button);\r\n toolBar.addSeparator();\r\n\r\n button = createToolBarButton(\"help.gif\", \"Open Help\");\r\n button.addActionListener(createHelpActionListener());\r\n toolBar.add(button);*/\r\n\r\n return toolBar;\r\n }" ]
[ "0.7492925", "0.72960544", "0.7290076", "0.72730505", "0.7250004", "0.720531", "0.71929914", "0.715757", "0.7125662", "0.7075309", "0.7074776", "0.70597935", "0.703858", "0.70374215", "0.7035482", "0.70250803", "0.7012714", "0.70041126", "0.69984436", "0.69959414", "0.69730544", "0.6967123", "0.69357735", "0.69110054", "0.6897605", "0.6890897", "0.6867034", "0.6863167", "0.683216", "0.68157965", "0.6812335", "0.6807114", "0.68049604", "0.68049467", "0.6784613", "0.67841214", "0.6783276", "0.67684436", "0.6765254", "0.67588466", "0.67583865", "0.6756606", "0.6750421", "0.6745451", "0.6744111", "0.6742224", "0.6738294", "0.67286295", "0.67202586", "0.6718327", "0.671409", "0.67102796", "0.66895807", "0.6686545", "0.66864973", "0.668285", "0.66801494", "0.66727674", "0.66703534", "0.66668993", "0.66653997", "0.6663746", "0.66635764", "0.666305", "0.6662885", "0.6658849", "0.66544926", "0.664172", "0.66327435", "0.6632406", "0.66296256", "0.66233146", "0.6622902", "0.66199166", "0.6618876", "0.6616149", "0.66128117", "0.6612706", "0.6609361", "0.6598721", "0.65956527", "0.6587469", "0.65821624", "0.658195", "0.6577866", "0.65766704", "0.65758705", "0.65751684", "0.6574257", "0.65668136", "0.6561077", "0.6555704", "0.65556467", "0.65505487", "0.65484744", "0.6548168", "0.65417993", "0.6541437", "0.65305626", "0.65303326", "0.65301967" ]
0.0
-1
/ rotate a NN matrix by 90 degrees clockwise return null if empty array
public interface RotateMatrix { public String[][] rotateMatrix(String[][] A); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void rotateMatrix(int[][] a]){\n if (a == null || a.length == 0 || a.length != a[0].length){\n return;\n }\n \n // we olny need half of the layers as other layers will be processed automatically\n for (int layer = 0; layer < a.length/2; layer++){\n // rotate (array, start, end), this will take us to the end\n rotate(a, layer, a.length-1-layer)\n }\n}", "public Matrix rotate90Degree() {\n\t\tMatrix rotatedMatrix = new Matrix(this.getHeight(), this.getWidth());\n\t\tfor(int i = 0; i < this.getWidth(); i++) {\n\t\t\tfor(int j = 0; j < this.getHeight(); j++) {\n\t\t\t\trotatedMatrix.setElement(j, (this.getWidth() -1) - i, data[i][j]);\n\t\t\t}\n\t\t}\n\t\tthis.show();\n\t\trotatedMatrix.show();\n\t\treturn rotatedMatrix;\n\t}", "public void rotate(int[][] matrix) {\n if (matrix == null || matrix.length == 0) return;\n int n = matrix.length-1;\n for (int i = 0; i <= n / 2; i++) {\n for (int j = i; j < n; j++) {\n int temp = matrix[i][j];\n matrix[i][j] = matrix[n - j][i];\n matrix[n - j][i] = matrix[n - i][n - j];\n matrix[n - i][n - j] = matrix[j][n - i];\n matrix[j][n - i] = temp;\n }\n }\n }", "static void rotate(int[][] matrix) {\n int n = matrix.length;\n for (int i = 0; i < (n + 1) / 2; i++) {\n for (int j = 0; j < n / 2; j++) {\n int temp = matrix[n - 1 - j][i];\n matrix[n - 1 - j][i] = matrix[n - 1 - i][n - j - 1];\n matrix[n - 1 - i][n - j - 1] = matrix[j][n - 1 - i];\n matrix[j][n - 1 - i] = matrix[i][j];\n matrix[i][j] = temp;\n }\n }\n }", "public static long[][] rotate(long[][] matrix){\n int n = matrix[0].length;\n\n // We are going from the outside to the inside of the matrix\n for(int layer=0; layer<n/2; layer++){\n\n // The boundaries of the current layer\n int first = layer;\n int last = n - (layer + 1);\n\n // Swap each edge of the layer to the next edge\n for(int j=layer; j<last; j++){\n\n // The offset for the current pixel \n int offset = j - first;\n\n // Save the values of the pixels that will be swapped\n long pixelTop = matrix[first][j];\n long pixelRight = matrix[j][last];\n long pixelBottom = matrix[last][last-offset];\n long pixelLeft = matrix[last-offset][first];\n\n // Swap Top to Right\n matrix[j][last] = pixelTop;\n\n // Swap Right to Bottom\n matrix[last][last-offset] = pixelRight;\n\n // Swap Bottom to Left\n matrix[last-offset][first] = pixelBottom;\n\n // Swap Left to Top\n matrix[first][j] = pixelLeft;\n }\n }\n\n return matrix;\n }", "public boolean rotate(int[][] matrix) {\n int n = matrix.length;\n if(n == 0 || n != matrix[0].length){\n return false;\n }\n for(int layer = 0; layer < n/2; layer++){\n int first = layer;\n int last = n - 1 - layer;\n \n for(int i = first; i < last; i++){\n int offset = i - first;\n int temp = matrix[first][i];\n //Left -> Top\n matrix[first][i] = matrix[last - offset][first];\n //Bottom -> Left\n matrix[last - offset][first] = matrix[last][last-offset];\n //Right -> Bottom\n matrix[last][last-offset] = matrix[i][last];\n //Top -> Right\n matrix[i][last] = temp;\n }\n \n }\n \n printMatrix(matrix);\n return true;\n }", "public Matrix rotate90DegreeInPlace() {\n\t\tfor(int layer = 0; layer < this.getWidth() / 2; ++layer) {\n\t\t\tint first = layer;\n\t\t\tint last = this.getWidth() - 1 - layer;\n\t\t\t\n\t\t\tfor(int i = first; i < last; ++i) {\n\t\t\t\tint offset = i - first;\n\t\t\t\t\n\t\t\t\t//save top\n\t\t\t\tdouble top = this.getElement(first, i);\n\t\t\t\t\n\t\t\t\t// left -> top\n\t\t\t\tthis.setElement(first, i, this.getElement(last - offset, first));\n\t\t\t\t// bottom -> left\n\t\t\t\tthis.setElement(last - offset, first, this.getElement(last, last - offset));\n\t\t\t\t// right -> bottom\n\t\t\t\tthis.setElement(last, last - offset, this.getElement(i, last));\n\t\t\t\t// top -> right\n\t\t\t\tthis.setElement(i, last, top);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}", "private static void rotate(int[][] matrix) {\r\n\t\tfor (int i = 0; i < matrix.length; i++) {\r\n\t\t\tfor (int j = i; j < matrix[0].length; j++) {\r\n\t\t\t\tint temp = 0;\r\n\t\t\t\ttemp = matrix[i][j];\r\n\t\t\t\tmatrix[i][j] = matrix[j][i];//转置,第i行变成第i列\r\n\t\t\t\tmatrix[j][i] = temp;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int i = 0; i < matrix.length; i++) {\r\n\t\t\tfor (int j = 0; j < matrix.length / 2; j++) {\r\n\t\t\t\tint temp = 0;\r\n\t\t\t\ttemp = matrix[i][j];\r\n\t\t\t\tmatrix[i][j] = matrix[i][matrix.length - 1 - j];\r\n\t\t\t\tmatrix[i][matrix.length - 1 - j] = temp;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void rotateMatrix(int[][] matrix) {\n\n int length = matrix[0].length;\n // Rotate each layer of the NxN matrix starting with the outermost one first\n for(int layer = 0;layer < length/2; layer ++) {\n\n for(int i = layer; i < length - 1 - layer;i++) {\n int topLeft = matrix[layer][i];\n\n // topLeft = bottomLeft\n matrix[layer][i] = matrix[length - 1 - layer - i][layer];\n\n // bottomLeft = bottomRight\n matrix[length - 1 - layer - i][layer] = matrix[length - 1 - layer][length - 1 - layer - i];\n\n //bottomRight = topRight\n matrix[length - 1 - layer][length - 1 - layer - i] = matrix[i][length - 1 - layer];\n\n //topRight = topLeft\n matrix[i][length - 1 - layer] = topLeft;\n }\n }\n }", "private void rotate() {\n byte tmp = topEdge;\n topEdge = leftEdge;\n leftEdge = botEdge;\n botEdge = rightEdge;\n rightEdge = tmp;\n tmp = reversedTopEdge;\n reversedTopEdge = reversedLeftEdge;\n reversedLeftEdge = reversedBotEdge;\n reversedBotEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n tmp = ltCorner;\n ltCorner = lbCorner;\n lbCorner = rbCorner;\n rbCorner = rtCorner;\n rtCorner = tmp;\n\n }", "public static void rotate(int[][] matrix) {\n int numLayers = matrix.length / 2;\n\n for (int i = 0; i < numLayers; i++) {\n int beginningPixel = i;\n int lastPixel = matrix.length - i - 1;\n // don't swap the last pixel because it was already swapped as the first pixel of another row\n for (int j = beginningPixel; j < lastPixel; j++) {\n int top = matrix[i][j];\n // left -> top\n matrix[i][j] = matrix[matrix.length - j - 1][i];\n\n // bottom -> left\n matrix[matrix.length - j - 1][i] = matrix[matrix.length - i - 1][matrix.length - j - 1];\n\n // right -> bottom\n matrix[matrix.length - i - 1][matrix.length - j - 1] = matrix[j][matrix.length - i - 1];\n\n // top -> right\n matrix[j][matrix.length - i - 1] = top;\n }\n }\n }", "void rotate();", "public void rotate(int[][] matrix) {\n if(matrix.length <= 0) {\n return;\n }\n \n int N= matrix.length;\n \n for(int i = 0 ; i < N/2; i++) {\n for(int j = i ; j < N-i-1; j ++) {\n int temp = matrix[i][j];\n matrix[i][j] = matrix[N-1-j][i];\n matrix[N-1-j][i] = matrix[N-1-i][N-1-j];\n matrix[N-1-i][N-1-j] = matrix[j][N-1-i];\n matrix[j][N-1-i] = temp;\n }\n \n }\n }", "public void rotateLayer(int[][] matrix, int x, int y, int len){\n for (int i = 0; i < len - 1; i++){\n int tmp = matrix[x][y+i];\n matrix[x][y+i] = matrix[x+len-i-1][y];\n matrix[x+len-i-1][y] = matrix[x+len-1][y+len-1-i];\n matrix[x+len-1][y+len-1-i] = matrix[x+i][y+len-1];\n matrix[x+i][y+len-1] = tmp;\n }\n }", "public void rotate(int[][] matrix) {\n int temp, len = matrix.length;\n\n int left = 0, top = 0, right = len-1, bottom = len-1;\n\n while(left < right) {\n for(int i = left; i < right; i++) {\n temp = matrix[top][i];\n matrix[top][i] = matrix[len-1-i][left];\n matrix[len-1-i][left] = matrix[bottom][len-1-i];\n matrix[bottom][len-1-i] = matrix[i][right];\n matrix[i][right] = temp;\n }\n left++;\n right--;\n top++;\n bottom--;\n }\n }", "public static void rotateMatrix(int[][] data) {\n\t\tint N = data.length;\n\t\tfor (int x = 0; x < N / 2; x++) {\n\t\t\tfor (int y = x; y < N - 1 - x; y++) {\n\t\t\t\tint tmp = data[x][y];\n\t\t\t\tdata[x][y] = data[y][N-1-x];\n\t\t\t\tdata[y][N-1-x] = data[N-1-x][N-1-y];\n\t\t\t\tdata[N-1-x][N-1-y] = data[N-1-y][x];\n\t\t\t\tdata[N-1-y][x] = tmp;\n\t\t\t}\n\t\t}\n\t}", "void calculateRotationMatrix() {\n R[0][0] = (float) (Math.cos(angle[0]) * Math.cos(angle[1]));\n R[1][0] = (float) (Math.sin(angle[0]) * Math.cos(angle[1]));\n R[0][1] = (float) (Math.cos(angle[0]) * Math.sin(angle[1]) * Math.sin(angle[2]) - Math.sin(angle[0]) * Math.cos(angle[2]));\n R[1][1] = (float) (Math.sin(angle[0]) * Math.sin(angle[1]) * Math.sin(angle[2]) + Math.cos(angle[0]) * Math.cos(angle[2]));\n R[0][2] = (float) (Math.cos(angle[0]) * Math.sin(angle[1]) * Math.cos(angle[2]) + Math.sin(angle[0]) * Math.sin(angle[2]));\n R[1][2] = (float) (Math.sin(angle[0]) * Math.sin(angle[1]) * Math.cos(angle[2]) - Math.cos(angle[0]) * Math.sin(angle[2]));\n R[2][0] = (float) - Math.sin(angle[1]);\n R[2][1] = (float) (Math.cos(angle[1]) * Math.sin(angle[2]));\n R[2][2] = (float) (Math.cos(angle[1]) * Math.cos(angle[2]));\n }", "public static void rotate(int [][]matrix, int n){\n for(int layer = 0; layer < n / 2 ; ++layer){\n int first = layer;\n int last = n - 1 - layer;\n for(int i = first; i < last; ++i){\n int offset = i - first;\n //save top\n int top = matrix[first][i];\n //left to top\n matrix[first][i] = matrix[last-offset][first];\n //bottom to left\n matrix[last-offset][first] = matrix[last][last-offset];\n //right to bottom\n matrix[last][last-offset] = matrix[i][last];\n //top to right\n matrix[i][last] = top;\n }\n }\n }", "public void rotate(double deg) {\n deg = deg % 360;\n// System.out.println(\"Stopni:\" + deg);\n double e = 0;\n double f = 0;\n\n// for(int i = 0; i < pixels.length; i++) {\n// for(int j = 0; j < pixels[i].length; j++) {\n// e += pixels[i][j].getX();\n// f += pixels[i][j].getY();\n// }\n// }\n //e = e / (pixels.length * 2);\n //f = f / (pixels[0].length * 2);\n e = pixels.length / 2;\n f = pixels[0].length / 2;\n System.out.println(e);\n System.out.println(f);\n\n// System.out.println(e + \":\" + f);\n Matrix affineTransform;\n Matrix translateMinus = Matrix.translateRotate(-e, -f);\n Matrix translatePlus = Matrix.translateRotate(e, f);\n Matrix movedTransform = Matrix.multiply(translateMinus, Matrix.rotate(deg));\n //movedTransform.display();\n affineTransform = Matrix.multiply(movedTransform, translatePlus);\n //affineTransform.display();\n\n for(int i = 0; i < pixels.length; i++) {\n for(int j = 0; j < pixels[i].length; j++) {\n double[][] posMatrix1 = {{pixels[i][j].getX()}, {pixels[i][j].getY()}, {1}};\n Matrix m1 = new Matrix(posMatrix1);\n Matrix result1;\n result1 = Matrix.multiply(Matrix.transpose(affineTransform.v), m1);\n\n pixels[i][j].setX(Math.round(result1.v[0][0]));\n pixels[i][j].setY(Math.round(result1.v[1][0]));\n }\n }\n\n\n }", "public void rotate(int[][] matrix) {\n int m = matrix.length;\n int n = matrix[0].length;\n if (m != n) {\n return;\n }\n int[][] result = new int[n][n];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n result[i][j] = matrix[n - j - 1][i];\n }\n }\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n matrix[i][j] = result[i][j];\n }\n }\n }", "public static byte[][] rotate(byte[][] toRotate, byte direction){\n byte[][] newMatrix = {{-1, -1, -1},{-1, -1, -1},{-1, -1, -1}};\n //iterating throug each element of the matrix and placing them to the right spot\n //only works for 3x3 matrixes\n for(byte y = 0; y < 3; y ++){\n for(byte x = 0; x < 3; x ++){\n if(direction == 1){\n newMatrix[x][2-y] = toRotate[y][x];\n }\n else{\n newMatrix[2-x][y] = toRotate[y][x];\n }\n \n }\n }\n return newMatrix;\n }", "public void rotateClockwise(int[][] matrix) {\n int n = matrix.length;\n\n // 1. Transpose matrix , change row to column, could use XOR operator to remove temp dependency\n for (int i = 0; i < n; i++) {\n for (int j = i; j < n; j++) {\n int temp = matrix[j][i];\n matrix[j][i] = matrix[i][j];\n matrix[i][j] = temp;\n }\n }\n\n // 2. Reverse elements of matrix\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n / 2; j++) {\n int temp = matrix[i][j];\n matrix[i][j] = matrix[i][n - j - 1];\n matrix[i][n - j - 1] = temp;\n }\n }\n }", "public static boolean rotate(int[][] matrix) {\n\t\tif (matrix.length == 0 || matrix.length != matrix[0].length)\n\t\t\treturn false; // Not a square\n\t\tint n = matrix.length;\n\n\t\tfor (int layer = 0; layer < n / 2; layer++) {\n\t\t\tint first = layer;\n\t\t\tint last = n - layer - 1;\n\t\t\tfor (int i = first; i < last; i++) {\n\t\t\t\tint offset = i - first;\n\t\t\t\tint top = matrix[first][i]; // save top\n\t\t\t\t// left -> top\n\t\t\t\tmatrix[first][i] = matrix[last - offset][first];\n\t\t\t\t// bottom -> left\n\t\t\t\tmatrix[last - offset][first] = matrix[last][last - offset];\n\n\t\t\t\t// right -> bottom\n\t\t\t\tmatrix[last][last - offset] = matrix[i][last];\n\n\t\t\t\t// top -> right\n\t\t\t\tmatrix[i][last] = top; // right <- saved top\n\t\t\t\t\n\t\t\t\t// top = [first][i]\n\t\t\t\t// [first][i] = [last - offset][first]\n\t\t\t\t// [last - offset][first] = [last][last - offset]\n\t\t\t\t// [last][last - offset] = [i][last]\n\t\t\t\t// [i][last] = top\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static boolean rotateMatrix(int[][] matrix) {\n if (matrix.length == 0 || matrix.length != matrix[0].length) {\n return false;\n }\n int n = matrix.length;\n\n for (int layer = 0; layer < n / 2; layer++) {\n int first = layer;\n int last = n - 1 - layer;\n\n for (int i = first; i < last; i++) {\n int offset = i - first;\n int top = matrix[first][i]; //Save top\n\n //left -> top\n matrix[first][i] = matrix[last - offset][first];\n\n //bottom -> left\n matrix[last - offset][first] = matrix[last][last - offset];\n\n //right -> bottom\n matrix[last][last - offset] = matrix[i][last];\n\n //top -> right\n matrix[i][last] = top; //right <- saved top\n }\n }\n return true;\n }", "DMatrix3C getRotation();", "public Matrix getCurrentRotation() throws ManipulatorException;", "public void rotate() {\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\ttmp_grid[i][j] = squares[i][j];\n\t\t\t// copy back rotated 90 degrees\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\tsquares[j][i] = tmp_grid[i][3-j];\n \n //log rotation\n LogEvent(\"rotate\");\n\t\t}", "private static void rotateMatrix(int[][] matrix) {\n\n\t\t// Assume: the elements are integer, and are unique values so that the result\n\t\t// can be tested for correctness.\n\t\t// Question: are the dimensions square? i.e. row and column count are the same?\n\t\t// Assume Yes.\n\t\t// Question: Which direction should the array be rotated - Assume clockwise\n\n\t\t// Iterate from counter min to max - 1\n\t\t// Copy top row first cell into a temp variable.\n\t\t// Copy each corner into the next corner. Use temp variable to fill the last\n\t\t// corner\n\t\t// Decrement counter and perform for next set of cells\n\t\t// Repeat for inner layers.\n\n\t\t// Bounding Co-ordinates: matrix[min][min], matrix[min, max], matrix[max, max],\n\t\t// matrix[max, min]\n\t\t// Initially: min = 0, max = N-1 (i.e. 0 based array positions)\n\t\t// pos = min\n\t\t// While pos < max\n\t\t// temp = matrix[min][pos]\n\t\t// matrix[min][pos] = matrix[max - pos + min][min]\n\t\t// matrix[max - pos + min][min] = matrix[max][max - pos + min]\n\t\t// matrix[max][max - pos + min] = matrix[pos][max]\n\t\t// matrix[pos][max] = temp\n\t\t// Increment pos\n\t\t// Increment min and decrement max\n\t\t// Break when min >= max\n\t\t// For even N, the last grid will be a 2 X 2 matrix, for odd N, the last grid\n\t\t// will be a single cell\n\n\t\t// T.C. N/2 iterations of the while loop (for even N)\n\t\t// T.C. = (N - 1) + (N-3) + .. 1\n\t\t// [first calls executes 5 for loops, each N-1 times. last call executes 2*2\n\t\t// matrix. i.e. N-1 = 1]\n\t\t// = (N-1 + N-3 + .. + 1) = (N-1 + N-3 + ... + N-(N-1))\n\t\t// = (N*N/2 - (1 + 3 + .. + N-1))\n\t\t// Sum of n even no.s = n(n+1)\n\t\t// Sum of n odd no.s = N(N+1)/2 - n(n+1). Where N = Max of odd no. + 1\n\t\t// T.C. = (N*N/2 - (N(N+1)/2 - N/2 * (N/2 + 1)))\n\t\t// = ( N*N/2 - (N*N/2 + N/2 - N*N/4 - N/2)) = (N*N/4)\n\t\t// T.C = O(N*N), this is the best possible T.C as each element needs to be\n\t\t// visited once.\n\t\t// S.C. O(1)\n\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn;\n\n\t\tif (matrix.length != matrix[0].length)\n\t\t\tthrow new NotASquareMatrixException(\"Not a square matrix. Cannot be rotated in place.\");\n\n\t\tint min = 0;\n\t\tint max = matrix.length - 1;\n\t\tprint(matrix);\n\n\t\twhile (min < max) {\n\t\t\trotateCellsInALayer(matrix, min, max);\n\t\t\tprint(matrix);\n\t\t\tmin++;\n\t\t\tmax--;\n\t\t}\n\t}", "int[][] rotate(int[][] image) {\n if(image.length != image[0].length) {\n throw new IllegalArgumentException();\n }\n // can assume the image is square matrix.\n int dimension = image.length;\n for(int i=0;i< dimension; i++) {\n for(int j=i;j<dimension;j++) {\n int temp = image[j][i];\n image[j][i] = image[i][j];\n image[i][j] = temp;\n }\n }\n return image;\n }", "public void rotateInPlace(int[][] matrix) {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = i; j < matrix[0].length; j++) {\n int temp = 0;\n temp = matrix[i][j];\n matrix[i][j] = matrix[j][i];\n matrix[j][i] = temp;\n }\n }\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix.length / 2; j++) {\n int temp = 0;\n temp = matrix[i][j];\n matrix[i][j] = matrix[i][matrix.length - 1 - j];\n matrix[i][matrix.length - 1 - j] = temp;\n }\n }\n }", "private static int[][] rotateMartix(int[][] matrix) {\n for(int i=0;i<matrix.length;i++) {\n for(int j=i;j< matrix.length;j++) {\n int tmp=matrix[i][j];\n matrix[i][j]=matrix[j][i];\n matrix[j][i]=tmp;\n }\n }\n //swap columns\n for(int i=0;i<matrix.length;i++){\n int low = 0;\n int high = matrix.length-1;\n\n while(low < high)\n {\n int temp = matrix[i][low];\n matrix[i][low] = matrix[i][high];\n matrix[i][high] = temp;\n\n low++;\n high--;\n }\n }\n return matrix;\n }", "private static void rotate(int[][] a, start, end){\n for (int current = 0; start+current < end; current++){\n int temp = a[start][start+current]; // save the top \n a[start][start+current] = a[end-current][start]; // left to top moveing left elemnt to top\n a[end-current][start] = a[end][end-current]; // bottom element to left \n a[end][end-current] = a[start+current][end]; // right element to bottom \n a[start+current][end] = temp; // top elemrnt to right\n }\n}", "public void rotate(){\n\t\tint oneLoop = 0;\r\n\t\tmotherLoop: while(oneLoop == 0){\r\n\t\t\toneLoop = 1;\r\n\t\t// tworze i zeruje macierz 4x4\r\n\t\tint d = type == 1 ? 4 : 3;\t// dla podłużnego będzie klatka 4x4, dla reszty: 3x3\r\n\t\tif(type != 2 ){\t// a dla kwadratowego nic nie trzeba obracac\r\n\t\t\t// tworze macierz i przerzucam do niej klocka:\r\n\t\t\t// tworze i zeruje macierz dxd\r\n\t\t\tint[][] matrix = new int[d][d];\r\n\t\t\tfor(int i = 0 ; i < d ; i++)\r\n\t\t\t\tfor(int j = 0 ; j < d ; j++)\r\n\t\t\t\t\tmatrix[i][j] = 0;\r\n\t\t\t// wyznaczam najmniejsze X i Y z tablic X[] i Y[]\r\n\t\t\tint minX = X[0], minY = Y[0];\r\n\t\t\tfor(int i = 1 ; i < d ; i++){\r\n\t\t\t\tif(X[i] < minX)\tminX = X[i];\r\n\t\t\t\tif(Y[i] < minY)\tminY = Y[i];\r\n\t\t\t}\r\n\t\t\t// przepisuje do czystej macierzy klocka, odejmujac najmniejsze X i Y\r\n\t\t\t// dzieki temu przystaje on do lewej i gornej krawedzi macierzy.\r\n\t\t\tfor(int i = 0 ; i < 4 ; i++)\r\n\t\t\t\tmatrix[Y[i]-minY][X[i]-minX] = 1;\r\n\t\t\t\r\n\t\t\t// dla przypadkow przy scianie przerywam calosc:\r\n\t\t\tif(minX + d > Board.getWidth()){\r\n\t\t\t\tSystem.out.println(\"Protestuje, bo: minX+d=\" +(minX+d)+ \", a Board.getWidth()=\" + Board.getWidth());\r\n\t\t\t\tbreak motherLoop;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(d==4){\t// dla dlugiego przycinam jeszcze raz\r\n\t\t\t\tif(matrix[3][0] == 1){\t// jest pionowo\r\n\t\t\t\t\tfor(int i = 0 ; i < 4 ; i++){\r\n\t\t\t\t\t\tmatrix[i][0] = 0;\r\n\t\t\t\t\t\tmatrix[i][1] = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\t// jest poziomo\r\n\t\t\t\t\tfor(int i = 0 ; i < 4 ; i++){\r\n\t\t\t\t\t\tmatrix[0][i] = 0;\r\n\t\t\t\t\t\tmatrix[1][i] = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// nowa macierz to macierz z klockiem obrocona o 90 stopni\r\n\t\t\tint[][] newMatrix = new int[d][d];\r\n\t\t\tfor(int i = 0 ; i < d ; i++){\r\n\t\t\t\tfor(int j = 0 ; j < d ; j++){\r\n\t\t\t\t\tnewMatrix[i][j] = matrix[j][d-i-1];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tboolean isFree = true;\t// sprawdzam czy nowy klocek nie naruszy statycznych klockow\r\n\t\t\tint index = 0;\r\n\t\t\tfor(int i = 0 ; i < d ; i++){\r\n\t\t\t\tfor(int j = 0 ; j < d ; j++){\r\n\t\t\t\t\tif(i+minY < Board.getHeight() && j+minX < Board.getWidth()){\r\n\t\t\t\t\t\tif(motherBoard.getField(j+minX, i+minY).getContent() == 2){\r\n\t\t\t\t\t\t\tisFree = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(isFree){\r\n\t\t\t\tindex = 0;\r\n\t\t\t\tfor(int i = 0 ; i < d ; i++){\r\n\t\t\t\t\tfor(int j = 0 ; j < d ; j++){\r\n\t\t\t\t\t\tif( minY >= 0 && j+minX < Board.getWidth() && i+minY < Board.getHeight()){\t// wymiary sie beda zgadzac z plansza.\r\n\t\t\t\t\t\t\tif(newMatrix[i][j] == 1){\r\n\t\t\t\t\t\t\t\tX[index] = j+minX;\r\n\t\t\t\t\t\t\t\tY[index] = i+minY;\r\n\t\t\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t}", "@Override\n\tpublic void rotate90() {\n\n\t\tint[][] rotate = new int[this.frame[0].length][this.frame.length];\n\n\t\tfor (int x = 0; x < rotate[0].length; x++) {\n\t\t\tfor (int y = 0; y < rotate.length; y++) {\n\t\t\t\trotate[y][x] = this.frame[this.frame.length - x - 1][y];\n\t\t\t}\n\t\t} \n\n\t\tthis.frame = rotate;\n\n\t}", "private static void rotate(int[][] matrix) {\n int rows = matrix.length;\n int cols = matrix[0].length;\n\n for (int[] ints : matrix) {\n reverse(ints, 0, cols - 1);\n }\n\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols - i; j++) {\n swapMatrix(matrix, i, j, cols - 1 - j, rows - 1 - i);\n }\n }\n }", "public int[][] rotate(){\r\n\t\tpos = (pos == (limit - 1))? 1:pos + 1;\r\n\t\treturn coords(pos);\r\n\t}", "public void zRotate() {\n\t\t\n\t}", "private void RLRotation(IAVLNode node)\r\n\t{\r\n\t\tLLRotation(node.getRight());\r\n\t\tRRRotation(node);\r\n\t}", "public void testRotationMatrix() {\n\n u = 1;\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n // This should be the identity matrix\n double[][] m = rM.getMatrix();\n for(int i=0; i<m.length; i++) {\n for(int j=0; j<m.length; j++) {\n if(j==i) {\n assertEquals(m[i][j], 1, TOLERANCE);\n } else {\n assertEquals(m[i][j], 0, TOLERANCE);\n }\n }\n }\n }", "Mat rotateMatCW(Mat src ) {\n Mat rotationMatrix = Imgproc.getRotationMatrix2D(new Point(src.cols()/2,src.rows()/2),270,1);\n\n //Rotating the given image\n Imgproc.warpAffine(src, result,rotationMatrix, new Size(src.cols(), src.rows()));\n return result;\n }", "void copyRotation(DMatrix3 R);", "public abstract void rotate();", "public static void rotate(int[][] mat) {\n System.out.println(Arrays.deepToString(mat));\n for(int i = 0; i < mat.length; i++) {\n \t// NOTE : j starts from i+1 and not 0. Else the matrix is restored to its initial state.\n for(int j = i+1; j < mat.length; j++) {\n \tint temp = mat[i][j];\n mat[i][j] = mat[j][i];\n mat[j][i] = temp;\n }\n }\n System.out.println(Arrays.deepToString(mat));\n for(int i = 0; i < mat.length; i++) {\n for(int j = 0; j < mat[0].length/2; j++) {\n int temp = mat[i][j];\n mat[i][j] = mat[i][mat[0].length-j-1];\n mat[i][mat[0].length - j - 1] = temp;\n }\n }\n System.out.println(Arrays.deepToString(mat));\n }", "LocalMaterialData rotate();", "@Test\n public void testRotate90Degrees1(){\n double[][] a = new double[5][5];\n for(int i = 0 ; i < a.length ; i++){\n for(int j = 0 ; j < a[0].length ; j++){\n a[i][j] = Math.random();\n }\n }\n double[][] newA = HarderArrayProblems.rotateArray90(a);\n checkRotate(a, newA);\n }", "@Test\n public void testRotate90Degrees2(){\n double[][] a = new double[2][3];\n for(int i = 0 ; i < a.length ; i++){\n for(int j = 0 ; j < a[0].length ; j++){\n a[i][j] = Math.random();\n }\n }\n double[][] newA = HarderArrayProblems.rotateArray90(a);\n checkRotate(a, newA);\n }", "void rotate () {\n final int rows = currentPiece.height;\n final int columns = currentPiece.width;\n int[][] rotated = new int[columns][rows];\n\n for (int i = 0; i < rows; i++)\n for (int j = 0; j < columns; j++)\n rotated[j][i] = currentPiece.blocks[i][columns - 1 - j];\n\n Piece rotatedPiece = new Piece(currentPiece.color, rotated);\n int kicks[][] = {\n {0, 0},\n {0, 1},\n {0, -1},\n //{0, -2},\n //{0, 2},\n {1, 0},\n //{-1, 0},\n {1, 1},\n //{-1, 1},\n {1, -1},\n //{-1, -1},\n };\n for (int kick[] : kicks) {\n if (canMove(currentRow + kick[0], currentColumn + kick[1], rotatedPiece)) {\n //System.out.println(\"Kicking \" + kick[0] + \", \" + kick[1]);\n currentPiece = rotatedPiece;\n currentRow += kick[0];\n currentColumn += kick[1];\n updateView();\n break;\n }\n }\n }", "@Override\r\n\tpublic void rotate() {\n\t\t\r\n\t}", "public boolean[][] getRotateLeft() {\n boolean[][] out = new boolean[size][size];\n for(int y = 0; y < size; y++)\n for(int x = 0; x < size; x++)\n out[x][y] = tileLogic[size - y - 1][x];\n return out;\n }", "public void rotateClockWise() {\r\n\r\n transpose();\r\n\r\n // swap columns\r\n for (int col = 0; col < pixels[0].length / 2; col++) {\r\n for (int row = 0; row < pixels.length; row++) {\r\n int tmp = pixels[row][col];\r\n pixels[row][col] = pixels[row][pixels[0].length - 1 - col];\r\n pixels[row][pixels[0].length - 1 - col] = tmp;\r\n }\r\n }\r\n\r\n this.pix2img();\r\n }", "void applyRotationMatrix() {\n for (int i = 0; i < coors.length; i++) {\n for (int j = 0; j < coors[i].length; j++) {\n newCoors[i][j] = coors[i][0] * R[j][0] + coors[i][1] * R[j][1] + coors[i][2] * R[j][2];\n }\n // add perspective\n float scale = map(Math.abs(newCoors[i][2]), 0, (float) (halfSize * Math.sqrt(3)), 1, 1.5f);\n if (newCoors[i][2] < 0) {\n scale = 2f - scale;\n }\n for (int j = 0; j < 2; j++) {\n newCoors[i][j] *= scale;\n }\n }\n // to R2\n // just dont use Z\n setPathAndAlpha();\n }", "public void rotateCCW(){\n rotState = (rotState + 3) % 4;\n for (int i = 0; i < tiles.length; ++i){\n tiles[i] = new Point(tiles[i].y , -tiles[i].x);\n }\n }", "private void LRRotation(IAVLNode node)\r\n\t{\r\n\r\n\t\tRRRotation(node.getLeft());\r\n\t\tLLRotation(node);\r\n\t}", "public Direction rotate90(Node node) {\n node.setRotate(values()[r90index].getDegree());\n return values()[r90index];\n }", "void rotatePiece() {\n boolean temp = this.left;\n boolean temp2 = this.up;\n boolean temp3 = this.right;\n boolean temp4 = this.down;\n this.left = temp4;\n this.up = temp;\n this.right = temp2;\n this.down = temp3;\n }", "void copyOffsetRotation (DMatrix3 R);", "public void rotateBack() {\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\tsquares[i][j] = tmp_grid[i][j];\n\t\t}", "private DFEVar[][] rotateBlock(DFEVar[][] input, DFEVar rotate) {\n\t\tDFEVectorType<DFEVar> colType = new DFEVectorType<DFEVar>(input[0][0].getType(), input.length);\n\t\tDFEVar[][] output = new DFEVar[input.length][input[0].length];\n\t\tfor (int i = 0; i < input[0].length; i++) {\n\t\t\tList<DFEVar> temp = new ArrayList<DFEVar>(input.length);\n\t\t\tfor (int j = 0; j < input.length; j++) {\n\t\t\t\ttemp.add(input[j][i]);\n\t\t\t}\n\n\t\t\tDFEVector<DFEVar> column = colType.newInstance(this, temp);\n\t\t\tcolumn = column.rotateElementsRight(rotate);\n\t\t\tfor (int j = 0; j < input.length; j++) {\n\t\t\t\toutput[j][i] = column[j];\n\t\t\t}\n\t\t}\n\n\t\treturn output;\n\t}", "public static char[][] rotate(char[][] array) {\n\n char[][] rotateArray = array;\n char[][] tempArray = new char[8][8];\n\n for (int i = 0; i < 8; i++ ){\n\n for (int j = 0; j < 8; j++){\n\n tempArray[i][j] = rotateArray[7-j][i];\n }\n }\n return tempArray;\n }", "public abstract void rotateLeft();", "public void rotate(boolean clockwise) \n\t{\n\t\tcircular_shift(connections, clockwise);\n\t\torientation = next(orientation, clockwise);\n\t}", "@Override\n \t\t\t\tpublic void doRotateZ() {\n \n \t\t\t\t}", "private void singleRotationLR(BinaryNode node){\n if (node == root) {\n root = node.left;\n root.parent = null;\n root.right = node;\n node.parent = node.left;\n node.left = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = node.left;\n } else {\n node.parent.left = node.left;\n }\n node.left.parent = node.parent;\n node.left.right = node;\n node.parent = node.left;\n node.left = null;\n }\n }", "private long leftRotate(long n) throws IOException {\n Node current = new Node(n);\r\n long currentRight = current.right;\r\n Node tempN = new Node(current.right);\r\n current.right = tempN.left;\r\n tempN.left = n;\r\n current.height = getHeight(current);\r\n current.writeNode(n);\r\n tempN.height = getHeight(tempN);\r\n tempN.writeNode(currentRight);\r\n return currentRight;\r\n }", "public static void rotate90CCWGrid(char[][] grid) {\r\n\t\tchar tmp = grid[0][0];\r\n\t\tgrid[0][0] = grid[0][2];\r\n\t\tgrid[0][2] = grid[2][2];\r\n\t\tgrid[2][2] = grid[2][0];\r\n\t\tgrid[2][0] = tmp;\r\n\r\n\t\ttmp = grid[0][1];\r\n\t\tgrid[0][1] = grid[1][2];\r\n\t\tgrid[1][2] = grid[2][1];\r\n\t\tgrid[2][1] = grid[1][0];\r\n\t\tgrid[1][0] = tmp;\r\n\t}", "@Override\n\tpublic void rotate() {\n\t}", "public org.apache.spark.mllib.linalg.distributed.BlockMatrix transpose () { throw new RuntimeException(); }", "private static void rotate(int[][] a) {\n\t\tint len = a.length;\n\t\tint k,l=0;\n\t\tint b[][] = new int[len][len];\n\t\tfor(int i=len-1;i>=0;i--)\n\t\t{\n\t\t\tk=0;\n\t\t\tfor(int j=0;j<len && k<3 && l<3;j++)\n\t\t\t{\n\t\t\t b[k][l]=a[i][j];\n\t\t\t k++;\n\t\t\t if(k>2)\n\t\t\t \t l++;\n\t }\n\t\t}\n\t\tfor(int c[]:b) {\n\t\t\tfor( int d : c) {\n\t\t\t\tSystem.out.print(d + \" \");\n\t\t\t}\n\t\tSystem.out.println();\n\t}\n\t\t\n\t}", "private void RRRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode rightChild = node.getRight() ; \r\n\t\tIAVLNode leftGrandChild = node.getRight().getLeft(); \r\n\t\t\r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft())\r\n\t\t\t\tparent.setLeft(rightChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(rightChild);\r\n\t\t}\r\n\t\t\r\n\t\tnode.setRight(leftGrandChild); //leftGrandChild is now node's right child\r\n\t\tleftGrandChild.setParent(node); //node is now leftGrandChild's parent\r\n\t\trightChild.setLeft(node); // node is now rightChild's left child\r\n\t\tnode.setParent(rightChild); // node's parent is now leftChild\r\n\t\trightChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size\r\n\t\trightChild.setSize(sizeCalc(rightChild)); //updating rightChild's size\r\n\t\trightChild.setHeight(HeightCalc(rightChild)); // updating rightChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\t\t\r\n\t\tif (node == root) \r\n\t\t\tthis.root = rightChild;\r\n\t}", "private void singleRotationRL(BinaryNode node) {\n if (node == root) {\n root = node.right;\n root.parent = null;\n root.left = node;\n node.parent = node.right;\n node.right = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = node.right;\n } else {\n node.parent.left = node.right;\n }\n node.right.parent = node.parent;\n node.right.left = node;\n node.parent = node.right;\n node.right = null;\n }\n }", "public void rotateTransform(Vector3f rot) {\r\n\t\tMatrix4f rx = new Matrix4f();\r\n\t\tMatrix4f ry = new Matrix4f();\r\n\t\tMatrix4f rz = new Matrix4f();\r\n\t\t\t\t\r\n\t\t// Convert the angles to radians\r\n\t\tfloat x = (float) Math.toRadians(rot.x);\r\n\t\tfloat y = (float) Math.toRadians(rot.y);\r\n\t\tfloat z = (float) Math.toRadians(rot.z);\r\n\r\n\t\t// Create the X-Rotation matrix\r\n\t\trx.m[0][0] = 1.0f; rx.m[0][1] = 0.0f;\t \t\t\t rx.m[0][2] = 0.0f; \t\t\t\trx.m[0][3] = 0.0f;\r\n\t rx.m[1][0] = 0.0f; rx.m[1][1] = (float) Math.cos(x); rx.m[1][2] = (float) -Math.sin(x); rx.m[1][3] = 0.0f;\r\n\t rx.m[2][0] = 0.0f; rx.m[2][1] = (float) Math.sin(x); rx.m[2][2] = (float) Math.cos(x) ; rx.m[2][3] = 0.0f;\r\n\t rx.m[3][0] = 0.0f; rx.m[3][1] = 0.0f; \t\t\t\t rx.m[3][2] = 0.0f;\t\t \t\t\trx.m[3][3] = 1.0f;\r\n\r\n\t // Create the Y-Rotation matrix\r\n\t ry.m[0][0] = (float) Math.cos(y); ry.m[0][1] = 0.0f; ry.m[0][2] = (float) -Math.sin(y); ry.m[0][3] = 0.0f;\r\n\t ry.m[1][0] = 0.0f; \t\t\t\t ry.m[1][1] = 1.0f; ry.m[1][2] = 0.0f; \t\t\t\try.m[1][3] = 0.0f;\r\n\t ry.m[2][0] = (float) Math.sin(y); ry.m[2][1] = 0.0f; ry.m[2][2] = (float) Math.cos(y) ; ry.m[2][3] = 0.0f;\r\n\t ry.m[3][0] = 0.0f; \t\t\t\t ry.m[3][1] = 0.0f; ry.m[3][2] = 0.0f; \t\t\t\try.m[3][3] = 1.0f;\r\n\r\n\t // Create the Z-Rotation matrix\r\n\t rz.m[0][0] = (float) Math.cos(z); rz.m[0][1] = (float) -Math.sin(z); rz.m[0][2] = 0.0f; rz.m[0][3] = 0.0f;\r\n\t rz.m[1][0] = (float) Math.sin(z); rz.m[1][1] = (float) Math.cos(z) ; rz.m[1][2] = 0.0f; rz.m[1][3] = 0.0f;\r\n\t rz.m[2][0] = 0.0f; \t\t\t\t rz.m[2][1] = 0.0f; \t\t\t\t rz.m[2][2] = 1.0f; rz.m[2][3] = 0.0f;\r\n\t rz.m[3][0] = 0.0f; \t\t\t\t rz.m[3][1] = 0.0f; \t\t\t\t rz.m[3][2] = 0.0f; rz.m[3][3] = 1.0f;\r\n\t\t\t\r\n\t // Multiply all the matrices together\r\n\t\tMatrix4f rzy = rz.mult(ry);\r\n\t\tMatrix4f r = rzy.mult(rx);\r\n\t\t\t \r\n\t\tm = r.m;\r\n\r\n\t}", "public double getRotation();", "void setRotation (DMatrix3C R);", "private void rotateLeftDel (WAVLNode z) {\n\t WAVLNode y = z.right;\r\n\t WAVLNode a = y.left;\r\n\t y.parent=z.parent;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=y;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=y;\r\n\r\n\t }\r\n\t }\r\n\r\n\t else {\r\n\t\t this.root=y;\r\n\t }\r\n\t \r\n\t y.left = z;\r\n\t y.rank++;\r\n\t z.parent=y;\r\n\t z.right = a;\r\n\t z.rank--;\r\n\t if(a.rank>=0) {\r\n\t\t a.parent=z; \r\n\t }\r\n\t if(z.left==EXT_NODE&&z.right==EXT_NODE&&z.rank!=0) {\r\n\t\t z.rank--;\r\n\t }\r\n\t z.sizen = z.left.sizen+a.sizen+1;\r\n\t y.sizen = z.sizen+y.right.sizen+1;\r\n }", "Node leftRotate(Node x) \n { \n Node y = x.right; \n Node T2 = y.left; \n \n // Perform rotation \n y.left = x; \n x.right = T2; \n \n // Update heights \n x.height = max(height(x.left), height(x.right)) + 1; \n y.height = max(height(y.left), height(y.right)) + 1; \n \n // Return new root \n return y; \n }", "private void rotateRight(Node tree) {\n assert tree != null;\n assert tree.left != null;\n\n Node temp = tree.left;\n tree.left = temp.right;\n if(temp.right != null) { //no null pointers\n temp.right.parent = tree;\n }\n temp.parent = tree.parent;\n if(temp.parent != null) { //am i at the root?\n if(temp.parent.left == tree) {\n temp.parent.left = temp;\n } else if (temp.parent.right == tree) {\n temp.parent.right = temp;\n }\n }\n tree.parent = temp;\n temp.right = tree;\n if(tree == root) { root = temp; } //rewrite the root\n rotations += 1;\n }", "public static int[][] rotateMatrix180(int[][] matrix) {\n int[][] rotatedMatrix = new int[matrix.length][matrix[0].length];\n for (int i = 0; i < rotatedMatrix.length; i++) {\n for (int j = 0; j < rotatedMatrix[i].length; j++) {\n rotatedMatrix[i][j] = matrix[matrix.length - 1 - i][matrix[i].length - 1 - j];\n }\n }\n return rotatedMatrix;\n }", "public static void flipHorizontalAxis(int[][] matrix) {\n for(int i = matrix.length - 1; i >= matrix.length/2; i-- ){\n for(int j = 0; j < matrix[i].length; j++){\n int temp = matrix[i][j];\n matrix[i][j] = matrix[(matrix.length - 1) - i][j];\n matrix[(matrix.length - 1) - i][j] = temp;\n }\n }\n}", "private long rightRotate(long n) throws IOException {\n Node current = new Node(n);\r\n long currentLeft = current.left;\r\n Node tempN = new Node(current.left);\r\n current.left = tempN.right;\r\n tempN.right = n;\r\n current.height = getHeight(current);\r\n current.writeNode(n);\r\n tempN.height = getHeight(tempN);\r\n tempN.writeNode(currentLeft);\r\n return currentLeft;\r\n }", "Matrix<T> getTransposed();", "protected RedBlackNode<T> rotateLeft(RedBlackNode<T> node) {\n RedBlackNode<T> rightNode = node.getRightChild();\n RedBlackNode<T> parent = node.getParent();\n rightNode._parent = node.getParent();\n node._rightChild = rightNode.getLeftChild();\n if (node._rightChild != null ) {\n node._rightChild._parent = node;\n } \n rightNode._leftChild = node; \n node._parent = rightNode;\n // node had parent.\n if(parent != null) {\n // node was left child\n if(parent._leftChild == node) {\n parent._leftChild = rightNode;\n } else {\n // node was right child\n parent._rightChild = rightNode;\n }\n } else {\n // node was head\n _head = rightNode;\n }\n return rightNode;\n }", "public Direction rotate90() {\n return values()[r90index];\n }", "private static void leftRotateByOne(int[] array) {\n int tmp = array[0];\n for (int i = 0; i < array.length - 1; i++) {\n array[i] = array[i + 1];\n }\n array[array.length - 1] = tmp;\n }", "public @NotNull Image rotateCW()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width; x++)\n {\n long src = Integer.toUnsignedLong(y * this.width + x) * this.format.sizeof;\n long dst = Integer.toUnsignedLong(x * this.height + this.height - y - 1) * this.format.sizeof;\n \n MemoryUtil.memCopy(srcPtr + src, dstPtr + dst, this.format.sizeof);\n }\n }\n \n this.data.free();\n this.data = output;\n }\n return this;\n }", "protected Node<E> rotateLeft( Node<E> root ) {\n\n if( root == null || root.right == null) {\n return null;\n }\n\n Node<E> tempNode = root.right;\n root.right = tempNode.left;\n tempNode.left = root;\n return tempNode;\n\n }", "public static void rotate(int num) {\n for (int s = 0; s < num; s++) {\n int up = s; // 0 , 1\n int down = N - 1 - s;\n int left = s;\n int right = M - 1 - s;\n\n int tmp = map[s][s];\n for (int i = left; i < right; i++){ // 위\n map[up][i] = map[up][i + 1];\n }\n for (int i = up; i < down; i++){ // 오른쪽\n map[i][right] = map[i + 1][right];\n }\n for (int i = right; i > left; i--){ // 아래\n map[down][i] = map[down][i - 1];\n }\n for (int i = down; i > up; i--){ // 왼쪽\n map[i][left] = map[i - 1][left];\n }\n map[up + 1][left] = tmp;\n }\n }", "private void leftRotate(WAVLNode y) {\n\t WAVLNode x=y.parent;\r\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=y.left;\r\n\t WAVLNode c = y.right;\r\n\t y.left=x;\r\n\t x.right=b;\r\n\t \r\n\t if (x.parent!=null) {\r\n\t\t WAVLNode d=x.parent;\r\n\t\t String side=parentside(d,x);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t y.parent=null;\r\n\t\t this.root=y;\r\n\t }\r\n\t x.parent=y;\r\n\t b.parent=x;\r\n\t x.rank=x.rank-1;\r\n\t x.sizen=a.sizen+b.sizen+1;\r\n\t y.sizen=x.sizen+c.sizen+1;\r\n\t \r\n }", "public abstract void rotateRight();", "public void rotate(double angle) {\t\t\n\t\t// precompute values\n\t\tVector t = new Vector(this.a14, this.a24, this.a34);\n\t\tif (t.length() > 0) t = t.norm();\n\t\t\n\t\tdouble x = t.x();\n\t\tdouble y = t.y();\n\t\tdouble z = t.z();\n\t\t\n\t\tdouble s = Math.sin(angle);\n\t\tdouble c = Math.cos(angle);\n\t\tdouble d = 1 - c;\n\t\t\n\t\t// precompute to avoid double computations\n\t\tdouble dxy = d*x*y;\n\t\tdouble dxz = d*x*z;\n\t\tdouble dyz = d*y*z;\n\t\tdouble xs = x*s;\n\t\tdouble ys = y*s;\n\t\tdouble zs = z*s;\n\t\t\n\t\t// update matrix\n\t\ta11 = d*x*x+c; a12 = dxy-zs; a13 = dxz+ys;\n\t\ta21 = dxy+zs; a22 = d*y*y+c; a23 = dyz-xs;\n\t\ta31 = dxz-ys; a32 = dyz+xs; a33 = d*z*z+c;\n\t}", "public static Matrix rotateZ(double rad) {\n List<List<Double>> backingArray = get2DListOfSize(4);\n /*\n |cosr -sinr 0 0|\n |sinr cosr 0 0|\n |0 0 1 0|\n |0 0 0 1|\n */\n double cos = Math.cos(rad);\n double sin = Math.sin(rad);\n\n backingArray.get(0).set(0, cos);\n backingArray.get(0).set(1, -1*sin);\n backingArray.get(1).set(0, sin);\n backingArray.get(1).set(1, cos);\n backingArray.get(2).set(2, 1d);\n backingArray.get(3).set(3, 1d);\n\n return new Matrix(backingArray);\n }", "private void rightRotate(WAVLNode x) {\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=x.right;\r\n\t WAVLNode y=x.parent;\r\n\t WAVLNode c=y.right;\r\n\t x.right=y;\r\n\t y.left=b;\r\n\t if (y.parent!=null) {\r\n\t\t WAVLNode d=y.parent;\r\n\t\t String side=parentside(d,y);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t x.parent=null;\r\n\t\t this.root=x;\r\n\t }\r\n\t y.parent=x;\r\n\t b.parent=y;\r\n\t y.rank=y.rank-1;\r\n\t \r\n\t y.sizen=b.sizen+c.sizen+1;\r\n\t x.sizen=a.sizen+y.sizen+1;\r\n\t \r\n }", "private AVLNode<T> rotateLeft(AVLNode<T> node) {\n AVLNode<T> substitute = node.right;\n // donde ponemos los hijos a la izquierda del substituto\n node.right = substitute.left;\n substitute.left = node;\n\n return substitute;\n }", "Matrix transpose(){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n // if(!itRow[i].isEmpty()){\n itRow.moveFront();\n // itRow[i].moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(c.column, i, c.value);\n itRow.moveNext();\n }\n }\n return newM;\n }", "public Node<T> leftRotate(Node<T> node){\n\n Node<T> temp = node.right;//a temporary pointer set to the node's right child\n node.right = temp.left;// the node right child set to the left child\n temp.left = node;//temporary pointer left child set to the node who is rotating\n return temp;\n }", "public void leftRotate(Node n) {\r\n\t\tNode y = n.right;\r\n\t\tn.right = y.left;\r\n\t\tif(!y.left.isNil)\r\n\t\t\ty.left.parent = n;\r\n\t\ty.parent = n.parent;\r\n\t\tif(n.parent.isNil)\r\n\t\t\troot = y;\r\n\t\telse if(n == n.parent.left)\r\n\t\t\tn.parent.left = y;\r\n\t\telse\r\n\t\t\tn.parent.right = y;\r\n\t\ty.left = n;\r\n\t\tn.parent = y;\r\n\t}", "public void rotate(boolean[][] cells){\n int rowsR = rows;\n int columnsR = columns;\n\n boolean[][] cellsR = new boolean[rowsR][columnsR];\n\n for(int i=0;i<=rowsR-1;i++){\n for(int j=0;j<=columnsR-1;j++){\n if(cells[i][j])\n {\n cellsR[j][(rowsR-1)-i] = true;\n }\n }\n }\n for(int i=0;i<=rowsR-1;i++){\n for(int j=0;j<=columnsR-1;j++){\n cells[i][j] = cellsR[i][j];\n }\n }\n\n }", "Node leftRotate(Node x) \n { \n Node y = x.right; \n Node T2 = y.left; \n\n // Perform rotation \n y.left = x; \n x.right = T2; \n\n // Update heights \n x.height = Math.max(height(x.left), height(x.right)) + 1; \n y.height = Math.max(height(y.left), height(y.right)) + 1; \n\n // Return new root \n return y; \n }", "public static int[][] rotateMatrix270(int[][] matrix) {\n int[][] rotatedMatrix = new int[matrix[0].length][matrix.length];\n for (int i = 0; i < rotatedMatrix.length; i++) {\n for (int j = 0; j < rotatedMatrix[i].length; j++) {\n rotatedMatrix[i][j] = matrix[j][rotatedMatrix.length - 1 - i];\n }\n }\n return rotatedMatrix;\n }", "private BinaryNode<AnyType> rotateRight1(BinaryNode<AnyType>t, AnyType x)\r\n\t{\r\n\t\tBinaryNode<AnyType> no=find(t,x);\r\n\t\tBinaryNode<AnyType> parno=findParentNode(t,x);\r\n\r\n\t\tif(no==parno)\r\n\t\t{\r\n\t\t\tBinaryNode temp1=parno.left;\r\n\t\t BinaryNode temp2=parno.right;\r\n\t\t BinaryNode temp3=parno.left.right;\r\n\t\t parno.left=null;\r\n\t\t parno.right=null;\r\n\t\t temp1.right=null;\r\n\t\t root=temp1;\r\n\t\t root.right=parno;\r\n\t\t root.right.left=temp3;\r\n\t\t root.right.right=temp2;\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif(no.element.compareTo(parno.element)<0)\r\n\t\t{\r\n\t\t\tBinaryNode temp = parno.left;\r\n\t\t\tparno.left=no.left;\r\n\t\t\ttemp.left=null;\r\n\t\t\tBinaryNode tempr=parno.left.right;\r\n\t\t\tparno.left.right=temp;\r\n\t\t\tparno.left.right.left=tempr;\r\n\t\t}\r\n\r\n\t\tif(no.element.compareTo(parno.element)>0)\r\n\t\t{\r\n\t\t\tBinaryNode temp = parno.right;\t\t\r\n\t\t\tparno.right=no.left;\r\n\t\t\ttemp.left=null;\r\n\t\t\tBinaryNode tempr=parno.right.right;\r\n\t\t\tparno.right.right=temp;\r\n\t\t\tparno.right.right.left=tempr;\r\n\r\n\t\t}\r\n\t\treturn t;\r\n\t}", "@Override\n public float[] getRotationMatrix(){\n float[] baseCorrection = Maths.buildRotationMatrix(new float[]{0, 1, 0, 0});\n\n float[] rotationX = {(float) Math.toDegrees(theta), 1, 0, 0};\n float[] rotationY = {(float) -Math.toDegrees(phi), 0, 1, 0};\n\n float[] rotationMatrix = new float[16];\n float[] coreMotionMatrix = Maths.buildRotationMatrix(rotationY, rotationX);\n Matrix.multiplyMM(rotationMatrix, 0, baseCorrection, 0, coreMotionMatrix, 0);\n\n return rotationMatrix;\n }" ]
[ "0.68131965", "0.6581162", "0.6496204", "0.63888526", "0.63447726", "0.6334873", "0.6317945", "0.6304234", "0.6260657", "0.6231476", "0.6213366", "0.6206434", "0.6174666", "0.6094707", "0.6082658", "0.6080695", "0.6060439", "0.6036299", "0.6022678", "0.60197824", "0.5985923", "0.59789824", "0.5964683", "0.5959926", "0.5953831", "0.59136015", "0.5881232", "0.58749557", "0.58628845", "0.58476555", "0.5839546", "0.5837447", "0.5767495", "0.576283", "0.57110804", "0.56937647", "0.56832016", "0.5655492", "0.564326", "0.5634349", "0.5633125", "0.56260824", "0.56217974", "0.56045854", "0.55864894", "0.55725276", "0.5571226", "0.55007035", "0.54836404", "0.54785097", "0.5471106", "0.54544014", "0.54403394", "0.543316", "0.5420265", "0.5413039", "0.53964674", "0.536704", "0.5364366", "0.5360795", "0.5357107", "0.5348983", "0.5347244", "0.5332205", "0.5320757", "0.53065294", "0.52906835", "0.52778584", "0.52759385", "0.5269981", "0.52638865", "0.52534556", "0.5252798", "0.5247253", "0.5232646", "0.52176315", "0.52158594", "0.51853484", "0.5185336", "0.51814747", "0.5176316", "0.5170537", "0.5159051", "0.5156567", "0.5155311", "0.5154694", "0.5146258", "0.51404023", "0.5126116", "0.5125661", "0.5124786", "0.51174194", "0.51167834", "0.5116524", "0.51130193", "0.5111112", "0.5111051", "0.50989723", "0.5094616", "0.50896597" ]
0.5572984
45
/ Sets up the lookup map.
private TreeMap<Character, Character> generateMap() { this.charMap = new TreeMap<Character, Character>(); // generates an array of characters representing the alphabet char[] alphabet = "abcdefghijklmnopqrstuvwxyz".toCharArray(); for (int i=0; i<26; i++) { this.charMap.put(alphabet[i], alphabet[(i+key) % 26]); } return this.charMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createLookup() {\r\n\t\tcreateLooupMap(lookupMap, objectdef, objectdef.getName());\r\n\t\tcreateChildIndex(childIndex, objectdef, objectdef.getName());\r\n\r\n\t}", "public void init_lookup(){\n for(int i =0 ; i< MAX ; i++){\n lookup[i] =0;\n }\n }", "protected void createLookupCache() {\n }", "private LookupUtil(){}", "protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }", "private static void initializeMaps()\n\t{\n\t\taddedPoints = new HashMap<String,String[][][]>();\n\t\tpopulatedList = new HashMap<String,Boolean>();\n\t\tloadedAndGenerated = new HashMap<String,Boolean>();\n\t}", "public void setUp()\n {\n map = new Map(5, 5, null);\n }", "protected Map initDefaultLookupMap(HttpServletRequest request) {\r\n\t\tMap lookupMap = new HashMap();\r\n\t\tthis.keyMethodMap = this.getKeyMethodMap();\r\n\r\n\t\tModuleConfig moduleConfig = (ModuleConfig) request\r\n\t\t\t\t.getAttribute(Globals.MODULE_KEY);\r\n\r\n\t\tMessageResourcesConfig[] mrc = moduleConfig\r\n\t\t\t\t.findMessageResourcesConfigs();\r\n\r\n\t\t// Look through all module's MessageResources\r\n\t\tfor (int i = 0; i < mrc.length; i++) {\r\n\t\t\tMessageResources resources = this.getResources(request, mrc[i]\r\n\t\t\t\t\t.getKey());\r\n\r\n\t\t\t// Look for key in MessageResources\r\n\t\t\tIterator iter = this.keyMethodMap.keySet().iterator();\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\tString key = (String) iter.next();\r\n\t\t\t\tString text = resources.getMessage(Locale.ENGLISH, key);\r\n\r\n\t\t\t\t// Found key and haven't added to Map yet, so add the text\r\n\t\t\t\tif ((text != null) && !lookupMap.containsKey(text)) {\r\n\t\t\t\t\tlookupMap.put(text, key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn lookupMap;\r\n\t}", "private void mapSetUp() {\n\t\tfor (int i = 0; i < allChar.length; i++) {\n\t\t\tmap.put(allChar[i], shuffledChar[i]);\n\t\t}\n\t}", "protected abstract void beforeLookup(Lookup.Template t);", "@Before\n public void setUp() {\n searchMap = SearchMap.getInstance();\n }", "private void initLookupTable(Range nodata) {\n Range nd = RangeFactory.convertToByteRange(nodata);\n // Init the Boolean LookupTable\n lookupTable = new boolean[256];\n // Init the lookuptable containing\n for (int i = 0; i < lookupTable.length; i++) {\n byte b = (byte) i;\n lookupTable[i] = !nd.contains(b);\n }\n }", "public void setLookup(org.openejb.config.sys.Lookup lookup) {\n this._lookup = lookup;\n }", "abstract protected Map<String, T> lookup(List<String> values);", "private void initializeMap() {\n FLMotor = hardwareMap.get(DcMotor.class, \"FLMotor\");\n FRMotor = hardwareMap.get(DcMotor.class, \"FRMotor\");\n BLMotor = hardwareMap.get(DcMotor.class, \"BLMotor\");\n BRMotor = hardwareMap.get(DcMotor.class, \"BRMotor\");\n //ods = hardwareMap.get(OpticalDistanceSensor.class, \"ods\");\n //color = hardwareMap.get(ColorSensor.class, \"color\");\n //touch = hardwareMap.get(TouchSensor.class, \"touch\");\n gyro = hardwareMap.get(GyroSensor.class, \"gyro\");\n\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n BRMotor.setDirection(DcMotorSimple.Direction.FORWARD);\n BLMotor.setDirection(DcMotorSimple.Direction.REVERSE);\n FRMotor.setDirection(DcMotorSimple.Direction.FORWARD);\n FLMotor.setDirection(DcMotorSimple.Direction.REVERSE);\n }", "private void populateMaps() {\n\t\t//populate the conversion map.\n\t\tconvertMap.put(SPACE,(byte)0);\n\t\tconvertMap.put(VERTICAL,(byte)1);\n\t\tconvertMap.put(HORIZONTAL,(byte)2);\n\n\t\t//build the hashed numbers based on the training input. 1-9\n\t\tString trainingBulk[] = new String[]{train1,train2,train3,\"\"};\n\t\tbyte[][] trainer = Transform(trainingBulk);\n\t\tfor(int i=0; i < 9 ;++i) {\n\t\t\tint val = hashDigit(trainer, i);\n\t\t\tnumbers.put(val,i+1);\n\t\t}\n\t\t//train Zero\n\t\ttrainingBulk = new String[]{trainz1,trainz2,trainz3,\"\"};\n\t\tint zeroVal = hashDigit(Transform(trainingBulk), 0);\n\t\tnumbers.put(zeroVal,0);\n\n\n\t}", "void initCaches(Map<EObject, String> eObjectToIdMap, Map<String, EObject> idToEObjectMap);", "private void init() throws UnknownHostException, RemoteException {\n\n FileApp.setMapper(this);\n predKey = 0;\n toDistribute = readNodeEntries();\n //System.out.println(\"Mapper.init() :: toDistribute=\"+toDistribute);\n }", "private void initMaps()\r\n\t{\r\n\t\tenergiesForCurrentKOppParity = new LinkedHashMap<Integer, Double>();\r\n\t\tinputBranchWithJ = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedR = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedP = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularP = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularR = new LinkedHashMap<Integer, Double>();\r\n\t\tupperEnergyValuesWithJ = new LinkedHashMap<Integer, Double>();\r\n\t}", "public JsonSchemaMappingLookup() {\n // initialize all mappings from URLs to the respective schema\n businessObjectToJsonSchema.put(\"/rules\", DCC_VALIDATION_RULE_JSON_CLASSPATH);\n businessObjectToJsonSchema.put(\"/bnrules\", DCC_VALIDATION_RULE_JSON_CLASSPATH);\n businessObjectToJsonSchema.put(\"/cclrules\", CCL_JSON_SCHEMA);\n }", "private void registerCaches(){\n // Initialize region arraylist\n prisoners = new HashMap<>();\n regions = QueryManager.getRegions();\n prisonBlocks = QueryManager.getPrisonBlocks();\n portals = QueryManager.getPortals();\n }", "private void fillEntryLangMap(String p_termbaseId) throws Exception\n {\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n try\n {\n c = ConnectionPool.getConnection();\n ps = c.prepareStatement(TERM_ENTRY_LANG_QUERY);\n ps.setLong(1, Long.valueOf(p_termbaseId).longValue());\n rs = ps.executeQuery();\n m_map = new TreeMap();\n while (rs.next())\n {\n Long cid = new Long(rs.getLong(1));\n String name = rs.getString(2);\n HashSet set = (HashSet) m_map.get(cid);\n if (set == null)\n {\n set = new HashSet();\n m_map.put(cid, set);\n }\n set.add(name);\n }\n }\n finally\n {\n ConnectionPool.silentClose(rs);\n ConnectionPool.silentClose(ps);\n ConnectionPool.silentReturnConnection(c);\n }\n }", "private void initializeMaps(Set<ActionProvider> actionProviders,\n\t\t\tSet<ActionHandlerProvider> registeredHandlerProviders) {\n\t\tSet<ActionHandlerProvider> sportedHandlerProviders = registeredHandlerProviders.stream()\n\t\t\t\t.sorted(Comparator.comparing(ActionHandlerProvider::getPriority)).collect(Collectors.toSet());\n\t\tSet<ActionProvider> sortedActionProvider = actionProviders = actionProviders.stream()\n\t\t\t\t.sorted(Comparator.comparing(ActionProvider::getPriority)).collect(Collectors.toSet());\n\n\t\tsortedActionProvider.forEach(aProv -> {\n\t\t\taProv.getActions().forEach(action -> {\n\t\t\t\tif (!actionKinds.containsKey(action.getKind())) {\n\t\t\t\t\tactionKinds.put(action.getKind(), action.getClass());\n\t\t\t\t\tregisteredActions.add(action);\n\n\t\t\t\t\tOptional<ActionHandler> handlerOpt = getActionHandler(action, sportedHandlerProviders);\n\t\t\t\t\tif (handlerOpt.isPresent()) {\n\t\t\t\t\t\tactionHandlers.put(action.getKind(), handlerOpt.get());\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t}", "public void clearLookups() {\n diseaseMap = null;\n feedMap = null;\n healthMapProvenance = null;\n }", "private void initMapNameMapping() {\n mMapNameMapping.clear();\n\n // Load the name mapping from the config\n ConfigurationSection mappingSection = getConfig().getConfigurationSection(MappingSectionName);\n if (mappingSection != null) {\n // Load and check the mapping found in the config\n Map<String, Object> configMap = mappingSection.getValues(false);\n for (Map.Entry<String, Object> entry : configMap.entrySet()) {\n mMapNameMapping.put(entry.getKey(), (String) entry.getValue());\n }\n } else {\n getLogger().warning(String.format(\"[%s] found no configured mapping, creating a default one.\", mPdfFile.getName()));\n }\n\n // If there are new worlds in the server add them to the mapping\n List<World> serverWorlds = getServer().getWorlds();\n for (World w : serverWorlds) {\n if (!mMapNameMapping.containsKey(w.getName())) {\n mMapNameMapping.put(w.getName(), w.getName());\n }\n }\n\n // Set the new mapping in the config\n getConfig().createSection(MappingSectionName, mMapNameMapping);\n }", "private static void initializeMap() {\n\t\tmap = new HashMap<String, MimeTransferEncoding>();\n\t\tfor (MimeTransferEncoding mte : MimeTransferEncoding.values()) {\n\t\t\tmap.put(mte.string, mte);\n\t\t}\n\t}", "public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}", "private void ini_MapPaks()\r\n\t{\r\n\r\n\t}", "protected WumpusMap() {\n\t\t\n\t}", "@Before\n public void initialize()\n {\n map = new MapAdapter();\n }", "protected void setUp() {\n Collection<? extends ModuleInfo> infos = Lookup.getDefault().<ModuleInfo>lookupAll(ModuleInfo.class);\n }", "public void initMap()\r\n/* */ {\r\n///* 36 */ putHandler(\"vwkgcode\", PDWkHeadTailVWkgcodeHandler.class);\r\n///* 37 */ putHandler(\"fcapacitycalc\", PDWkHeadTailFcapacitycalcHandler.class);\r\n///* 38 */ putHandler(\"bprodline\", PDWkHeadTailBprodlineHandler.class);\r\n/* */ }", "void setHashMap();", "private void initializeReferences(String inputFilename) {\n\t\tparser = new Parser(inputFilename);\n\t\tlocations = new TreeMap<>();\n\t}", "private static synchronized void initializeMeasureMaps() {\n\t\tintensityMeasuresList=ExerciseIntensityMeasure.getAll();\n\t\tquantityMeasuresList=ExerciseQuantityMeasure.getAll();\n\t\tintensityCodesToNamesMap=new HashMap(intensityMeasuresList.size());\n\t\tquantityCodesToNamesMap=new HashMap(quantityMeasuresList.size());\n\n\t\t// these (and the lists above) come from the db, but they can be static \n\t\t// because they change so infrequently (haven't changed in five years and\n\t\t// counting), and only manually via the db.\n\t\tfor (int i=0; i<intensityMeasuresList.size(); i++) {\n\t\t\tfinal ExerciseIntensityMeasure m=(ExerciseIntensityMeasure)intensityMeasuresList.get(i);\n\t\t\tintensityCodesToNamesMap.put(m.getCode(),m.getName());\n\t\t}\n\t\tfor (int i=0; i<quantityMeasuresList.size(); i++) {\n\t\t\tfinal ExerciseQuantityMeasure m=(ExerciseQuantityMeasure)quantityMeasuresList.get(i);\n\t\t\tquantityCodesToNamesMap.put(m.getCode(),m.getName());\n\t\t}\n\t\tmeasureMapsInitialized=true;\n\t\t\n\t}", "protected abstract void initKeyNameMapping(Context context, HashMap<String, RemoteKey> keyMapping);", "private void init() {\n\t\tmap = new LinkedHashMap<String, HeaderData>();\r\n\t\tList<HeaderData> list = config.getColumns();\r\n\t\tfor(HeaderData info: list){\r\n\t\t\tString id = info.getId();\r\n\t\t\tif(id == null) throw new IllegalArgumentException(\"Null id found for \"+info.getClass().getName());\r\n\t\t\t// Map the id to info\r\n\t\t\tmap.put(info.getId(), info);\r\n\t\t}\r\n\t}", "public Map lookup(Set lfns) {\n //Map indexed by lrc url and each value a collection\n //of lfns that the RLI says are present in it.\n Map lrc2lfn = this.getLRC2LFNS(lfns);\n\n if(lrc2lfn == null){\n //probably RLI is not connected!!\n return null;\n }\n\n // now query the LRCs with the LFNs that they are responsible for\n // and aggregate stuff.\n String key = null;\n Map result = new HashMap(lfns.size());\n String message;\n for(Iterator it = lrc2lfn.entrySet().iterator();it.hasNext();){\n Map.Entry entry = (Map.Entry)it.next();\n key = (String)entry.getKey();\n message = \"Querying LRC \" + key;\n mLogger.log(message,LogManager.DEBUG_MESSAGE_LEVEL);\n\n //push the lrcURL to the properties object\n mConnectProps.setProperty(this.URL_KEY,key);\n LRC lrc = new LRC();\n if(!lrc.connect(mConnectProps)){\n //log an error/warning message\n mLogger.log(\"Unable to connect to LRC \" + key,\n LogManager.ERROR_MESSAGE_LEVEL);\n continue;\n }\n\n //query the lrc\n try{\n Map m = lrc.lookup((Set)entry.getValue());\n\n //figure out if we need to restrict our queries or not.\n //restrict means only include results if they have a site\n //handle associated\n boolean restrict = ( this.determineQueryType(key) == this.LRC_QUERY_RESTRICT );\n\n for(Iterator mit = m.entrySet().iterator();mit.hasNext();){\n entry = (Map.Entry)mit.next();\n List pfns = (( List )entry.getValue());\n if ( restrict ){\n //traverse through all the PFN's and check for resource handle\n for ( Iterator pfnIterator = pfns.iterator(); pfnIterator.hasNext(); ){\n ReplicaCatalogEntry pfn = (ReplicaCatalogEntry) pfnIterator.next();\n if ( pfn.getResourceHandle() == null ){\n //do not include in the results if the entry does not have\n //a pool attribute associated with it.\n mLogger.log(\"Ignoring entry \" + entry.getValue() +\n \" from LRC \" + key,\n LogManager.DEBUG_MESSAGE_LEVEL);\n pfnIterator.remove();\n }\n }\n\n }\n\n //if pfns are empty which could be due to\n //restriction case taking away all pfns\n //do not merge in result\n if( pfns.isEmpty() ){ continue; }\n\n //merge the entries into the main result\n key = (String)entry.getKey(); //the lfn\n if( result.containsKey(key) ){\n //right now no merging of RCE being done on basis\n //on them having same pfns. duplicate might occur.\n ((List)result.get(key)).addAll( pfns );\n }\n else{\n result.put( key, pfns );\n }\n }\n }\n catch(Exception ex){\n mLogger.log(\"lookup(Set)\",ex,LogManager.ERROR_MESSAGE_LEVEL);\n }\n finally{\n //disconnect\n lrc.close();\n }\n\n\n mLogger.log( message + LogManager.MESSAGE_DONE_PREFIX,LogManager.DEBUG_MESSAGE_LEVEL);\n }\n return result;\n }", "private static void createTypeMap() {\n\n }", "String getLookupKey();", "private static Lookup computeLookup(Class<?> type) throws Throwable {\n return (Lookup) LOOKUP_CONSTRUCTOR_MH.invokeExact(type);\n }", "public void setLookupDao(LookupDao lookupDao) {\n this.lookupDao = lookupDao;\n }", "private void initializeMaps(){\n\t\t\n\t\tsteps = new HashMap<Integer, Set<PlanGraphStep>>();\n\t\tfacts = new HashMap<Integer, Set<PlanGraphLiteral>>();\n\t\tinconsistencies = new HashMap<Integer, Set<LPGInconsistency>>();\n\t\t\n\t\tfor(int i = 0; i <= maxLevel; i++) {\n\t\t\tsteps.put(i, new HashSet<PlanGraphStep>());\n\t\t\tfacts.put(i, new HashSet<PlanGraphLiteral>());\n\t\t\tinconsistencies.put(i, new HashSet<LPGInconsistency>());\n\t\t}\n\t\t\n\t\t/* This level holds only the special action end which has the goals as preconditions */\n\t\tsteps.put(maxLevel + 1, new HashSet<PlanGraphStep>());\n\t}", "public Map lookup(Set lfns, String handle) {\n //Map indexed by lrc url and each value a collection\n //of lfns that the RLI says are present in it.\n Map lrc2lfn = this.getLRC2LFNS(lfns);\n if(lrc2lfn == null){\n //probably RLI is not connected!!\n return null;\n }\n\n // now query the LRCs with the LFNs they are responsible for\n // and aggregate stuff.\n String key = null,message = null;\n Map result = new HashMap(lfns.size());\n for(Iterator it = lrc2lfn.entrySet().iterator();it.hasNext();){\n Map.Entry entry = (Map.Entry)it.next();\n key = (String)entry.getKey();\n message = \"Querying LRC \" + key;\n mLogger.log(message,LogManager.DEBUG_MESSAGE_LEVEL);\n\n //push the lrcURL to the properties object\n mConnectProps.setProperty(this.URL_KEY,key);\n LRC lrc = new LRC();\n if(!lrc.connect(mConnectProps)){\n //log an error/warning message\n mLogger.log(\"Unable to connect to LRC \" + key,\n LogManager.ERROR_MESSAGE_LEVEL);\n continue;\n }\n\n //query the lrc\n try{\n Map m = lrc.lookup((Set)entry.getValue(),handle);\n for(Iterator mit = m.entrySet().iterator();mit.hasNext();){\n entry = (Map.Entry)mit.next();\n //merge the entries into the main result\n key = (String)entry.getKey(); //the lfn\n if(result.containsKey(key)){\n //right now no merging of RCE being done on basis\n //on them having same pfns. duplicate might occur.\n ((Set)result.get(key)).addAll((Set)entry.getValue());\n }\n else{\n result.put(key,entry.getValue());\n }\n }\n }\n catch(Exception ex){\n mLogger.log(\"lookup(Set,String)\",ex,\n LogManager.ERROR_MESSAGE_LEVEL);\n }\n finally{\n //disconnect\n lrc.close();\n }\n\n\n mLogger.log(message + LogManager.MESSAGE_DONE_PREFIX,LogManager.DEBUG_MESSAGE_LEVEL);\n }\n return result;\n\n\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mapView2))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap( lat, longi, \"ISS/ NUS\");\n }\n }\n }", "private void initializeExportTable() {\n\t\tif (this.libraryName.equals(\"mapistub.dll\")) {\n\t\t\texportTable.put(\"fixmapi\", (long) (baseAddress + Math.random() * Math.pow(10, 2)));\n\t\t}\n\t}", "private void setUp() {\n\t\tString allLetter = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. 0123456789\";\n\t\tallChar = allLetter.toCharArray();\n\t\tshuffledChar = shuffle(allLetter.toCharArray());\n\t\tmap = new HashMap<Character, Character>();\n\t\tmapSetUp();\n\t}", "private void placesInit()\n {\n\n for(Map.Entry<String,Place> placeEntry: placesMap.entrySet())\n {\n addPlace(placeEntry.getKey(),placeEntry.getValue());\n }\n\n }", "private void init() {\n UNIGRAM = new HashMap<>();\n }", "@Transient\r\n\tpublic Map<String, Object> getLookups() {\r\n\t\tMap<String,Object> map = new HashMap<String,Object>();\r\n map.put(ICommercialAlias.TARGET_REGISTRY_ID, getId());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_DOCUMENT, getRegistry().getDocument());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_NAME, getRegistry().getName());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_SURNAME, getRegistry().getSurname());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_ALIAS, getRegistry().getAlias());\r\n return map;\r\n\t}", "private void initialize() {\n\t\tplayerMap = new HashMap<>();\n\t\ttypeMap = new HashMap<>();\n\t\tfor (ProductType type : ProductType.values()) {\n\t\t\tMap<ProductState, Map<Integer, Set<Product>>> stateMap = new HashMap<>();\n\t\t\tfor (ProductState state : ProductState.values()) {\n\t\t\t\tMap<Integer, Set<Product>> map = new HashMap<>();\n\t\t\t\tstateMap.put(state, map);\n\t\t\t}\n\t\t\ttypeMap.put(type, stateMap);\n\t\t}\n\t}", "private void doLookup(int key)\n {\n String value = getLocalValue(key);\n if (value != null)\n {\n display(key, value);\n }\n else\n {\n getValueFromDB(key);\n } \n }", "protected void initialize() {\n // Attribute Load\n this.attributeMap.clear();\n this.attributeMap.putAll(this.loadAttribute());\n // RuleUnique Load\n this.unique = this.loadRule();\n // Marker Load\n this.marker = this.loadMarker();\n // Reference Load\n this.reference = this.loadReference();\n }", "protected void initBoatMap() {}", "public void buildMap(){\n this.map = new HashMap<String, String>();\n map.put(\"user\", \"user\");\n map.put(\"pw\", \"pass\");\n map.put(\"quit\", \"quit\");\n map.put(\"features\", \"feat\");\n map.put(\"cd\", \"cwd\");\n map.put(\"dir\", \"list\");\n map.put(\"get\", \"retr\");\n }", "public void initMap() {\r\n\r\n\t\tproviders = new AbstractMapProvider[3];\t\r\n\t\tproviders[0] = new Microsoft.HybridProvider();\r\n\t\tproviders[1] = new Microsoft.RoadProvider();\r\n\t\tproviders[2] = new Microsoft.AerialProvider();\r\n\t\t/*\r\n\t\t * providers[3] = new Yahoo.AerialProvider(); providers[4] = new\r\n\t\t * Yahoo.RoadProvider(); providers[5] = new OpenStreetMapProvider();\r\n\t\t */\r\n\t\tcurrentProviderIndex = 0;\r\n\r\n\t\tmap = new InteractiveMap(this, providers[currentProviderIndex],\r\n\t\t\t\tUtilities.mapOffset.x, Utilities.mapOffset.y,\r\n\t\t\t\tUtilities.mapSize.x, Utilities.mapSize.y);\r\n\t\tmap.panTo(locationUSA);\r\n\t\tmap.setZoom(minZoom);\r\n\r\n\t\tupdateCoordinatesLimits();\r\n\t}", "private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}", "public void setLookupService(LookupService lookupService) {\n this.lookupService = lookupService;\n }", "public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }", "private void switchLookupListener() {\n TopComponent active = TopComponent.getRegistry().getActivated();\n if( null != lookupRes ) {\n lookupRes.removeLookupListener( PaletteSwitch.this );\n lookupRes = null;\n }\n if( null != active ) {\n lookupRes = active.getLookup().lookup( new Lookup.Template<PaletteController>( PaletteController.class ) );\n lookupRes.addLookupListener( PaletteSwitch.this );\n lookupRes.allItems();\n }\n }", "private void setup()\n\t{\n\t\tif(values == null)\n\t\t\tvalues = new HashMap<>();\n\t\telse\n\t\t\tvalues.clear();\n\t}", "public EmployeeLookup() {\r\n\t\tfill();\r\n\t\tinitialize();\r\n\t\t//AutoCompleteDecorator.decorate(el);\r\n\t}", "private static void mapDbAsstIDs()\r\n {\r\n if (dbIdMap == null) {\r\n dbIdMap = new HashMap<String, Integer>();\r\n dbIdMap.put(\"repair\", 1);\r\n dbIdMap.put(\"fuel\", 2);\r\n dbIdMap.put(\"tuition\", 3);\r\n dbIdMap.put(\"clothing\", 4);\r\n dbIdMap.put(\"registration\", 5);\r\n dbIdMap.put(\"utilities\", 21);\r\n }\r\n }", "private void eventLookupStarted() {\n\t\tsynchronized(lookupCounterMutex) {\n\t\t\tlookupCounter++;\n\t\t}\n\t}", "public static void fill_map(){\n\t\tcategory_links_map.put(\"Categories\", \"Movies\");\n\t\tcategory_links_map.put(\"Actors\", \"Movies\");\n\t\tcategory_links_map.put(\"Movies\", \"Actors\");\n\t\tcategory_links_map.put(\"Artists\", \"Creations\");\n\t\tcategory_links_map.put(\"Creations\", \"Artists\");\n\t\tcategory_links_map.put(\"Countries\", \"Locations\");\n\t\tcategory_links_map.put(\"Locations\", \"Countries\");\n\t\tcategory_links_map.put(\"NBA players\", \"NBA teams\");\n\t\tcategory_links_map.put(\"NBA teams\", \"NBA players\");\n\t\tcategory_links_map.put(\"Israeli soccer players\", \"Israeli soccer teams\");\n\t\tcategory_links_map.put(\"Israeli soccer teams\", \"Israeli soccer players\");\n\t\tcategory_links_map.put(\"World soccer players\", \"World soccer teams\");\n\t\tcategory_links_map.put(\"World soccer teams\", \"World soccer players\");\n\t}", "public void init()\n {\n this.tripDict = new HashMap<String, Set<Trip>>();\n this.routeDict = new HashMap<String, Double>();\n this.tripList = new LinkedList<Trip>();\n this.computeAllPaths();\n this.generateDictionaries();\n }", "public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}", "private void setUpMapIfNeeded() {\n\t\tif (mMap == null) {\n\t\t\t// Try to obtain the map from the SupportMapFragment.\n\t\t\tmMap = ((SupportMapFragment) getSupportFragmentManager()\n\t\t\t\t\t.findFragmentById(R.id.map1)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (mMap != null) {\n\t\t\t\tsetUpMap();\n\t\t\t}\n\t\t}\n\t}", "private void initialize() {\n\t\tfor(String key: count_e_f.keySet()){\n\t\t\tcount_e_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\tfor(Integer key: total_f.keySet()){\n\t\t\ttotal_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\t//This code is not efficient.\n//\t\tfor(Entry<String, Integer> german : mainIBM.gerWordsIdx.entrySet()){\n//\t\t\tfor(Entry<String, Integer> english : mainIBM.engWordsIdx.entrySet()){\n//\t\t\t\tcount_e_f.put(english.getValue() + \"-\" + german.getValue(), 0.0);\n//\t\t\t}\n//\t\t\ttotal_f.put(german.getValue(), 0.0);\n//\t\t}\t\n\n\t}", "public static void init() {\r\n\r\n types = new HashMap();\r\n ConnectionManager manager = ConnectionManager.getInstance();\r\n DatabaseConnection con = manager.get();\r\n\r\n String str = \"select ChWord ,ChWordSpell from PtWordSpell\";\r\n try\r\n {\r\n RecordSet rs = con.executeQuery(str);\r\n \r\n while (rs.next()) {\r\n String PolyChWord = rs.getString(\"ChWord\");\r\n String enuDesc = rs.getString(\"ChWordSpell\");\r\n \r\n types.put(PolyChWord, enuDesc);\r\n \r\n }\r\n rs.close();\r\n }catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n \r\n manager.release();\r\n\r\n\r\n }", "public void init() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\tfor(BusinessCategoryList categoryList : BusinessCategoryList.values()) {\n\t\t\tString[] names = categoryList.getValues().split(\",\");\n\t\t\tfor(String name : names) {\n\t\t\t\tget(name);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlog.debug(\"Dirty hack completed in {} ms.\", System.currentTimeMillis() - startTime);\n\t}", "private void initializePermissionsMap() {\n }", "public void initialize() {\n // add direct connections to routing table\n for (Bunker neighbour : neighbours) {\n routing.put(neighbour.getId(), neighbour);\n }\n // add yourself\n routing.put(id, this);\n bunkerIdToCount.put(id, count);\n // kick off the algo\n initiate();\n }", "@Override\n protected void initErrorLookup() {\n errorLookup[0] = \"Wrong number of parameters\";\n errorLookup[1] = \"Invalid airline code\";\n errorLookup[2] = \"Invalid airline ID\";\n errorLookup[3] = \"Invalid source airport code\";\n errorLookup[4] = \"Invalid source airport ID\";\n errorLookup[5] = \"Invalid destination airport code\";\n errorLookup[6] = \"Invalid destination airport ID\";\n errorLookup[7] = \"Invalid value for codeshare\";\n errorLookup[8] = \"Invalid value for number of stops\";\n errorLookup[9] = \"Invalid equipment code\";\n errorLookup[10] = \"Duplicate route\";\n errorLookup[11] = \"Unknown error\";\n }", "public void initializeDictionary() {\n\t\tmyDictionary = new SLogoDictionary();\n\t}", "private void initialize() {\n first = null;\n last = null;\n size = 0;\n dictionary = new Hashtable();\n }", "private void populateDictionary() throws IOException {\n populateDictionaryByLemmatizer();\n// populateDictionaryBySynonyms();\n }", "public void populateMap(int playerNumber){\n\t\tint factor = 1;\n\t\t\n\t\t\n\t}", "@Override\n protected void populateLocalisationMap() {\n localisationKeyConstantToKeyMap.put(ADDRESSES_TITLE, \"receiveBitcoinPanel.receivingAddressesTitle\"); \n localisationKeyConstantToKeyMap.put(CREATE_NEW_TOOLTIP, \"createOrEditAddressAction.createReceiving.tooltip\"); \n }", "private static Lookup getUserCatalogsLookup() {\n if (userCatalogLookup == null) {\n userCatalogLookup = Lookups.forPath(REGISTRATIONS);\n }\n return userCatalogLookup;\n }", "InsnLookupSwitch (InsnTarget defaultOp, int[] matchesOp,\n\t\t InsnTarget[] targetsOp, int offset) {\n super(opc_lookupswitch, offset);\n\n this.defaultOp = defaultOp; \n this.matchesOp = matchesOp;\n this.targetsOp = targetsOp;\n\n if (defaultOp == null || targetsOp == null || matchesOp == null ||\n\ttargetsOp.length != matchesOp.length)\n throw new InsnError (\"attempt to create an opc_lookupswitch\" +//NOI18N\n \" with invalid operands\");//NOI18N\n }", "public void init() throws IllegalArgumentException {\r\n\t\tthis.listItemMapper = ListItemMapper.listitemMapper();\r\n\t\tthis.itemMapper = ItemMapper.itemMapper();\r\n\t\tthis.personMapper = PersonMapper.personMapper();\r\n\t\tthis.shoppingListMapper = ShoppingListMapper.shoppinglistMapper();\r\n\t\tthis.storeMapper = StoreMapper.storeMapper();\r\n\t\tthis.groupMapper = GroupMapper.groupMapper();\r\n\t\tthis.responsibilityMapper = ResponsibilityMapper.responsibilityMapper();\r\n\t\tthis.favoriteItemMapper = FavoriteItemMapper.favoriteItemMapper();\r\n\r\n\t}", "public void InitMap() {\n for (int i=0; i<m_mapSize; i++) {\n SetColour(i, null);\n }\n }", "@Test\n public void hashMapInitialised()\n {\n Map<Integer, String> strings = MapUtil.<Integer, String>hashMap().keyValue(1, \"Me\").keyValue(2, \"You\");\n // Is this really better than calling strings.put(..)?\n\n assertEquals(\"You\", strings.get(2));\n }", "private static void initCityMapping() {\n try {\n log.info(\"initCityMapping start.....\");\n try {\n File dicFile = new File(\"/config/gj_city.json\");\n if (dicFile.exists()) {\n String dic = FileCopyUtils.copyToString(new InputStreamReader(\n new FileInputStream(dicFile),\n StandardCharsets.UTF_8));\n cityInfos = JSONObject.parseObject(dic, Map.class);\n }\n } catch (Exception e) {\n log.error(\"加载城市信息失败,{}\", e.getMessage(), e);\n e.printStackTrace();\n }\n log.info(\"initCityMapping end.....\");\n } catch (Exception e) {\n log.info(\"初始化城市字典数据失败!\", e);\n }\n }", "private void testInitialization() {\r\n\r\n\r\n\t\tthis.myMapDB = MapDB.getInstance();\r\n\t\tthis.myClumpDB = ClumpDB.getInstance();\r\n\t}", "public LookUpSwitchInstruction() {}", "private static void initializeMap() {\n addressTypeToSerializerMap = new HashMap<>();\n addressTypeToSerializerMap.put(NoAddressAfi.VALUE, NoAddressSerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4Afi.VALUE, Ipv4Serializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4BinaryAfi.VALUE, Ipv4BinarySerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4PrefixAfi.VALUE, Ipv4PrefixSerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4PrefixBinaryAfi.VALUE, Ipv4PrefixBinarySerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6Afi.VALUE, Ipv6Serializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6BinaryAfi.VALUE, Ipv6BinarySerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6PrefixAfi.VALUE, Ipv6PrefixSerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6PrefixBinaryAfi.VALUE, Ipv6PrefixBinarySerializer.getInstance());\n addressTypeToSerializerMap.put(MacAfi.VALUE, MacSerializer.getInstance());\n addressTypeToSerializerMap.put(DistinguishedNameAfi.VALUE, DistinguishedNameSerializer.getInstance());\n addressTypeToSerializerMap.put(Lcaf.VALUE, LcafSerializer.getInstance());\n addressTypeToSerializerMap.put(AfiListLcaf.VALUE, AfiListSerializer.getInstance());\n addressTypeToSerializerMap.put(InstanceIdLcaf.VALUE, InstanceIdSerializer.getInstance());\n addressTypeToSerializerMap.put(ApplicationDataLcaf.VALUE, ApplicationDataSerializer.getInstance());\n addressTypeToSerializerMap.put(ExplicitLocatorPathLcaf.VALUE, ExplicitLocatorPathSerializer.getInstance());\n addressTypeToSerializerMap.put(SourceDestKeyLcaf.VALUE, SourceDestKeySerializer.getInstance());\n addressTypeToSerializerMap.put(KeyValueAddressLcaf.VALUE, KeyValueAddressSerializer.getInstance());\n addressTypeToSerializerMap.put(ServicePathLcaf.VALUE, ServicePathSerializer.getInstance());\n }", "public void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getChildFragmentManager()\n .findFragmentById(R.id.location_map)).getMap();\n MapsInitializer.initialize(getActivity().getApplicationContext());\n // Check if we were successful in obtaining the map.\n if (mMap != null)\n setUpMap();\n }\n }", "protected ForwardingMap() {}", "@Override\n public HashMap<String, List<String>> initializeMapping(HashMap<String, List<String>> mapping) {\n mapping.put(\"xEncoder\", Arrays.asList(\"outtakeMotor1\", \"outtake1\"));\n mapping.put(\"yEncoder\", Arrays.asList(\"wobbleMotor\"));\n\n return mapping;\n }", "@PostConstruct\r\n public void init() {\n List<Person> personList = personRepository.findAll();\r\n for(Person person:personList)\r\n personHashMap.put(person.getId(),person);\r\n }", "public Map lookup( Set lfns, String handle ) {\n Map result = new HashMap();\n\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n Map m = catalog.lookup(lfns, handle);\n\n //merge all the entries in the map into the result\n for (Iterator mit = m.entrySet().iterator(); mit.hasNext(); ) {\n Map.Entry entry = (Map.Entry) mit.next();\n //merge the entries into the main result\n String lfn = (String) entry.getKey(); //the lfn\n if ( result.containsKey( lfn ) ) {\n //right now no merging of RCE being done on basis\n //on them having same pfns. duplicate might occur.\n ( (Set) result.get( lfn )).addAll( (Set) entry.getValue());\n }\n else {\n result.put( lfn, entry.getValue() );\n }\n }\n }\n return result;\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n \tmMap = ((com.google.android.gms.maps.MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\n \t// Check if we were successful in obtaining the map.\n \tif (mMap != null) {\n \t\tmakeMarkers();\n \t\tloadMarkersFromParse();\n \t}\n }\n \n }", "protected void createMaps() {\n\t\tBlueSchellingCell bCell = new BlueSchellingCell();\n\t\tOrangeSchellingCell oCell = new OrangeSchellingCell();\n\t\tEmptyCell eCell = new EmptyCell();\n\t\tTreeCell tCell = new TreeCell();\n\t\tBurningTreeCell bTCell = new BurningTreeCell();\n\t\tEmptyLandCell eLCell = new EmptyLandCell();\n\n\t\tLiveCell lCell = new LiveCell();\n\t\tDeadCell dCell = new DeadCell();\n\t\tGreenRPSCell gcell = new GreenRPSCell();\n\t\tRedRPSCell rcell = new RedRPSCell();\n\t\tBlueRPSCell blcell = new BlueRPSCell();\n\t\tWhiteRPSCell wcell = new WhiteRPSCell();\n\n\t\tFishCell fCell = new FishCell();\n\t\tSharkCell sCell = new SharkCell();\n\n\t\tAntGroupCell aCell = new AntGroupCell();\n\n\t\tsegregation.put('b', bCell);\n\t\tsegregation.put('o', oCell);\n\t\tsegregation.put('e', eCell);\n\n\t\tgameOfLife.put('l', lCell);\n\t\tgameOfLife.put('d', dCell);\n\n\t\trps.put('g', gcell);\n\t\trps.put('r', rcell);\n\t\trps.put('b', blcell);\n\t\trps.put('w', wcell);\n\n\t\tspreadingWildfire.put('t', tCell);\n\t\tspreadingWildfire.put('b', bTCell);\n\t\tspreadingWildfire.put('e', eLCell);\n\n\t\twaTor.put('f', fCell);\n\t\twaTor.put('s', sCell);\n\t\twaTor.put('e', eCell);\n\n\t\tforagingAnts.put('a', aCell);\n\t\tforagingAnts.put('e', eCell);\n\t\tinitExportMap();\n\n\t\tinitCountMap();\n\t}", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "public static void initDictionaries()\r\n\t{\r\n\t\t\r\n\t\tString cfdictversion = getInitialDictVersion();\r\n\t\t\r\n\t\t//long time = System.currentTimeMillis();\r\n\t\t//System.out.println(\"Dictionaries initialized start\");\r\n\t\t\r\n\t\t\r\n\t\t//get the dictionary config file into a DOM\r\n\t\tloadDictionaryConfig();\r\n\t\tif(dictionaryConfig == null)\r\n\t\t\tthrow new IllegalArgumentException(\"Problem loading dictionaryconfig.xml\");\r\n\t\t\r\n\t\t//load the default dictionaries into the cache\r\n\t\t//this is kind of weak but it'll do pig... it'll do...\r\n\t\tif (cfdictversion.trim().length() == 0) {\r\n\t\t\tcfdictversion = getFirstVersion(CFDIC);\r\n\t\t}\r\n\t\tString htdictversion = getFirstVersion(HTDIC);\r\n\t\tString jsdictversion = getFirstVersion(JSDIC);\r\n\t\t\r\n\t\t\r\n\t\t//load the dictionary into the cache\r\n\t\tloadDictionaryByVersion(cfdictversion);\r\n\t\tloadDictionaryByVersion(htdictversion);\r\n\t\tloadDictionaryByVersion(jsdictversion);\r\n\t\t\r\n\t\t//load from the cache to the live\r\n\t\tloadDictionaryFromCache(cfdictversion,CFDIC);\r\n\t\tloadDictionaryFromCache(cfdictversion,SQLDIC);\r\n\t\tloadDictionaryFromCache(htdictversion,HTDIC);\r\n\t\tloadDictionaryFromCache(jsdictversion,JSDIC);\r\n\t\t\t\t\r\n\t\t//System.out.println(\"Dictionaries initialized in \" + (System.currentTimeMillis() - time) + \" ms\");\r\n\t}", "public void initMap(String path) {\n \tgameState = StateParser.makeGame(path);\n\t\tintel = gameState.getCtrlIntel();\t\n\t\tsnakes = gameState.getSnake();\n\t\tmap = gameState.getMap();\n }", "private void init()\n\t{\n\t\tif (_invData == null)\n\t\t\t_invData = new InvestigateStore.MappedStores();\n\t}", "static void init() {\n\t\tuserDatabase = new HashMap<String, User>();\n\t}", "public abstract void createMap();" ]
[ "0.77173865", "0.72341144", "0.7151322", "0.69125503", "0.64158297", "0.6255809", "0.6198745", "0.6094591", "0.60817796", "0.60639375", "0.6030427", "0.5998168", "0.5934738", "0.5914984", "0.5910836", "0.59054154", "0.58910817", "0.5810951", "0.5809758", "0.5781262", "0.576863", "0.5765919", "0.5758406", "0.5739769", "0.57338303", "0.5728929", "0.5718294", "0.57070494", "0.5703018", "0.56888115", "0.56814694", "0.5665618", "0.56470585", "0.56396914", "0.56338835", "0.56332207", "0.56192416", "0.5588591", "0.5585652", "0.55794775", "0.557674", "0.5568849", "0.55639154", "0.55609876", "0.5560192", "0.5552928", "0.55488414", "0.55478334", "0.5535293", "0.5533926", "0.55243385", "0.5520176", "0.55145526", "0.5513855", "0.5507859", "0.5463548", "0.5447926", "0.5444762", "0.5442922", "0.54345226", "0.54337776", "0.54322475", "0.5430947", "0.54264253", "0.541821", "0.5417152", "0.5410395", "0.54091024", "0.5402028", "0.5398361", "0.538766", "0.5382627", "0.5379107", "0.53789896", "0.5374565", "0.5363759", "0.53626275", "0.5360262", "0.5350599", "0.53471816", "0.53462446", "0.53331804", "0.5331117", "0.5323732", "0.53132486", "0.5308064", "0.5306971", "0.53025275", "0.5296863", "0.5294736", "0.5294431", "0.52931637", "0.52913594", "0.5288548", "0.5284942", "0.5281284", "0.52802306", "0.52784896", "0.5272986", "0.5265947", "0.5263046" ]
0.0
-1
/ Transposes a character.
public char encryptChar(char c) { try { char returni = charMap.get(c); System.out.println(returni); return returni; } catch(NullPointerException e) { System.out.println("cant do this dude: " + c); return c; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String[] Transposicion(String texto) {\n String retorno[] = new String[2];\n retorno[0] = \"1\";\n retorno[1] = \"\";\n texto = texto.toLowerCase();\n try {//evalua si hay transposicion en el while\n if (texto.contains(\"w\") && texto.contains(\"h\") && texto.contains(\"i\") && texto.contains(\"l\") && texto.contains(\"e\")) {\n if (!texto.equals(\"while\") && texto.length() == 5) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia while.\";\n }\n } else {//evalua si hay transposicion en el if\n if (texto.contains(\"i\") && texto.contains(\"f\")) {\n if (!texto.equals(\"if\") && texto.length() == 2) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia if.\";\n }\n } else {//evalua si hay transposicion en el int\n if (texto.contains(\"i\") && texto.contains(\"n\") && texto.contains(\"t\")) {\n if (!texto.equals(\"int\") && texto.length() == 3) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia int.\";\n }\n } else {//evalua si hay transposicion en el for\n if (texto.contains(\"f\") && texto.contains(\"o\") && texto.contains(\"r\")) {\n if (!texto.equals(\"for\") && texto.length() == 3) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia for.\";\n }\n } else {//evalua si hay transposicion en el do while\n if (texto.contains(\"d\") && texto.contains(\"o\")) {\n if (!texto.equals(\"do\") && texto.length() == 2) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia do.\";\n }\n }\n }\n }\n }\n }\n } catch (Exception e) {\n System.out.println(\"Error en metodo de Transposicion\");\n } finally {\n return retorno;\n }\n }", "public String transposeChords() {\n\n\t\t//Tools from parent class\n\t\tArrayList<Integer> transposedChords = new ArrayList<>();\n\t\tChordList chords = new ChordList();\n\t\tString[] chordList = chords.getNotes();\n\t\tint[] scaleMajor = chords.getMajor();\n\t\tint[] scaleMinor = chords.getMinor();\n\n\t\t//custom ASCII table conversion\n\t\tint[] fixedNotes = new int[m_notes.length()];\n\t\tString[] userNotes = m_notes.split(\" \");\n\n\t\tfor(int i = 0; i < m_notes.length(); i++) {\n\t\t\tfixedNotes[i] = chords.noteIndex(userNotes[i]);\n\t\t}\n\n\t\t//Cycle each note in notes passed in by user\n\t\tint cycle = 0;\n\n\t\tfor(int note = 0; note < fixedNotes.length; note++) {\n\n\t\t\tif(cycle >= scaleMajor.length)\n\t\t\t\tcycle = 0;\n\n\t\t\t//Check for type of scale\n\t\t\t//If the scaletype is major\n\t\t\tif(m_scaleType.equals(\"major\")) {\n\n\t\t\t\ttransposedChords.add(fixedNotes[note] + scaleMajor[cycle] - OFFSET);\n\n\t\t\t} else if(m_scaleType.equals(\"minor\")) {\n\n\t\t\t}\n\n\t\t\tcycle++;\n\t\t}\n\n\t\treturn \"Transposed chords in \" + m_scale + \" \" + m_scaleType + \": \" + transposedChords;\n\t}", "@Test\n public void givenStringShouldReturnTheTransposedString() {\n assertTrue(transpose.setString(\"This is the given text\"));\n String expectedOutput = \"sihT si eht nevig txet\";\n assertEquals(expectedOutput, transpose.getTransposedString());\n }", "private Set<String> transpositionHelper(String word) {\n\t\tSet<String> transpositionWords = new HashSet<String>();\n\t\tfor (int i = 0; i < word.length() - 1; i++) {\n\t\t\ttranspositionWords.add(word.substring(0, i) + word.substring(i + 1, i + 2) + word.substring(i, i + 1)\n\t\t\t\t\t+ word.substring(i + 2));\n\t\t}\n\t\treturn transpositionWords;\n\t}", "private void switchChars(char[] chars,int i, int j){\r\n\t\tchar tmp=chars[i];\r\n\t\tchars[i]=chars[j];\r\n\t\tchars[j]=tmp;\r\n\t}", "public static Transform transpose(float a, float c, float tx, float b, float d, float ty) {\n\t\treturn new Transform(a, b, c, d, tx, ty);\n\t}", "@Override\n\tpublic String getCharacterRepresentation() {\n\t\treturn \"T\";\n\t}", "char permute(char p) {\n return _alphabet.toChar(permute(_alphabet.toInt(p)));\n }", "int main()\n{\n char s[10000]; \n scanf(\"%s\",s); \n int c; char t[1000][1000]; \n scanf(\"%d\",&c); \n int i,j=0,k=0; \n for(i=0;i<strlen(s); i+=c)\n {\n for(j=0;j<c;j++)\n {\n if(k%2==0)\n {\n if(i+j < strlen(s) )\n {t[k][j]=s[i+j];} \n else\n {t[k][j]='X';}\n }\n else\n {\n if(i+j < strlen(s))\n {\n t[k][c-j-1]=s[i+j]; \n } else\n {\n t[k][c-j-1]='X'; \n }\n } \n }\n k++;\n } \n for(i=0;i<c;i++)\n {\n for(j=0;j<k;j++)\n {\n printf(\"%c\",t[j][i]); \n }\n }\n}", "private void transpose() {\n Utils.transpose(this._board);\n }", "public char[][] getMatrixForm( String aColor )\r\n{\r\n\tchar c = constructionCharacter; // for brevity\r\n\r\n\t// Fill in the actual big letter. line by line\t\r\n\tmatrix[0][0] = c; matrix[0][1] = c; matrix[0][2] = c; \r\n\tmatrix[1][0] = c; matrix[1][4] = c;\r\n\tmatrix[2][0] = c; matrix[2][4] = c;\r\n\tmatrix[3][0] = c; matrix[3][1] = c;\r\n\tmatrix[4][0] = c; matrix[4][4] = c;\r\n\tmatrix[5][0] = c; matrix[5][4] = c;\r\n\tmatrix[6][0] = c; matrix[6][1] = c; matrix[6][2] = c; \r\n\t\r\n\t// Superimpose the color characters across the middle\t\r\n\tmatrix[3][0] = '-'; // required to precede the color characters as in \"-red\"\r\n\tfor( int i = 1; i < BigChar.MATRIX_WIDTH; ++i ) // go all the way across \r\n\t\tif( i <= aColor.length() ) // there is a color character to pick up\t\r\n\t\t\tmatrix[ 3 ][ i ] = aColor.charAt( i -1 ); // fill in the next color character\r\n\t\telse\r\n\t\t\tmatrix[ 3 ][ i ] = ' '; // pad on right with blanks\r\n\t\r\n\treturn matrix; \r\n}", "@Override\n public void convertCharacter(char character, StringBuilder outputTextBuilder) {\n }", "public final void transpose() {\n\tfloat tmp = m01;\n\tm01 = m10;\n\tm10 = tmp;\n\n\ttmp = m02;\n\tm02 = m20;\n\tm20 = tmp;\n\n\ttmp = m12;\n\tm12 = m21;\n\tm21 = tmp;\n\n }", "public char[][] toMatrix() {\n\t\tint tmp1 = this.player1_moves;\n\t\tint tmp2 = this.player2_moves;\n\n\t\tchar[][] matrix = new char[3][3];\n\t\tfor (int n = 0; n < 9; n++) {\n\t\t\tint i = n / 3;\n\t\t\tint j = n % 3;\n\t\t\tif ((tmp1 & 1) == 1)\n\t\t\t\tmatrix[i][j] = 'X';\n\t\t\telse if ((tmp2 & 1) == 1)\n\t\t\t\tmatrix[i][j] = 'O';\n\t\t\ttmp1 >>= 1;\n\t\t\ttmp2 >>= 1;\n\t\t}\n\n\t\treturn matrix;\n\t}", "private char convert(char Char) {\n int num = (int) Char;\n\n num = (num - '0' + 7) % 10; // Subtracts '0' to get the integer value and the\n // rest is as instructed\n Char = (char) (num + '0'); // Translates it back to ASCII value by adding '0'\n\n return Char;\n\n }", "public BufferedImage transpose(String src) {\n return this.transpose(ImportExportImage.importImage(src));\n }", "char[] toCharArray();", "public String swap(String a, int i, int j)\n {\n char temp;\n char[] charArray = a.toCharArray();\n temp = charArray[i] ;\n charArray[i] = charArray[j];\n charArray[j] = temp;\n return String.valueOf(charArray);\n }", "private void swap(char[] chars, int i, int j) {\n\t\tchar ch = chars[i];\r\n\t\tchars[i] = chars[j];\r\n\t\tchars[j] = ch;\r\n\t}", "CharacterTarget put(char[] symbols) throws PrintingException;", "public static void transpose(String chord, int ammount) {\n if (chord.contains(\"/\")) {\n int chordSeparatorIdx = chord.indexOf(\"/\");\n String chord1 = chord.substring(0, chordSeparatorIdx);\n System.out.println(\"chord1 \" + chord1);\n String chord2 = chord.substring(chordSeparatorIdx + 1);\n System.out.println(\"chord2 \" + chord2);\n } else {\n // by default we are using major scale\n String[] scaleArray = ((chord.contains(\"b\")) ? flatArray : majorArray);\n ArrayList<String> scale = new ArrayList<String>(Arrays.asList(scaleArray));\n System.out.println(\"Used scale \" + scale);\n String transposedKey = null;\n for (String scaleKey : scale) {\n if (chord.equalsIgnoreCase(scaleKey)) {\n int idx = scale.indexOf(scaleKey);\n transposedKey = scale.get(idx + ammount);\n break;\n }\n }\n System.out.println(\"transposed key is \" + transposedKey);\n }\n\n }", "public static char toChar(Character ch) {\n/* 130 */ if (ch == null) {\n/* 131 */ throw new IllegalArgumentException(\"The Character must not be null\");\n/* */ }\n/* 133 */ return ch.charValue();\n/* */ }", "private String toRowChar(int row)\n\t{\n\t\tString theRow;\n\t\t\n\t\tswitch (row)\n\t\t{\n\t\tcase 0: theRow = \"A\"; break;\n\t\tcase 1: theRow = \"B\"; break;\n\t\tcase 2: theRow = \"C\"; break;\n\t\tdefault: theRow = \" \";\n\t\t}\n\t\t\n\t\treturn theRow;\n\t}", "public static short[][] transpose(short[][] a) {\n if (a.length==0)\n return null;\n if (a[0].length==0)\n return null;\n short[][] transpose = new short[a[0].length][a.length];\n for (int i = 0; i < a[0].length; i++) {\n for (int j = 0; j < a.length; j++) {\n transpose[i][j] = a[j][i];\n }\n }\n return transpose;\n }", "private String composeCharacterString(String string) {\n return null;\r\n }", "@Test\n public void testToChar() {\n Object[][] datas = new Object[][]{\n {1, '1'},\n {5, '5'},\n {10, 'A'},\n {11, 'B'},\n {12, 'C'},\n {13, 'D'},\n {14, 'E'},\n {15, 'F'}\n };\n for (Object[] data : datas) {\n char result = Tools.toChar((Integer) data[0]);\n char expResult = (Character) data[1];\n assertEquals(result, expResult);\n System.out.println(\"testToChar()\");\n }\n }", "private static void swap(char[] a, int i, int j) {\r\n\r\n\t\tchar c;\r\n\t\tc = a[i];\r\n\t\ta[i] = a[j];\r\n\t\ta[j] = c;\r\n\t}", "public char toChar() {\r\n//\t\t//Ant\r\n//\t\tif(hasAnt()){\r\n//\t\t\tif(this.ant.getColour() == 0){\r\n//\t\t\t\treturn '=';\r\n//\t\t\t}\r\n//\t\t\tif(this.ant.getColour() == 1){\r\n//\t\t\t\treturn '|';\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t\r\n\t\t//Rock\r\n\t\tif(this.rocky){\r\n\t\t\treturn '#';\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//Food\r\n\t\tif(this.food > 0){\r\n\t\t\t//Prints the food value,\r\n\t\t\t//if it is > 9, prints 9 instead\r\n\t\t\tif(this.anthill == 0){ //0 to 9\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn 48 + 9;\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (this.food + 48);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Otherwise, food must be in an anthill\r\n\t\t\t//so give unique char value that acknowledges this\r\n\t\t\t//Greek isn't recognised by Notepad or the console (prints '?' instead)\r\n\t\t\t//Minimum food value is 1, so -1 from ascii codes\r\n\t\t\tif(this.anthill == 1){ //Upper case, 65 for Latin, 913 for Greek\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn (char) (64 + 9);\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (64 + this.food);\r\n\t\t\t}\r\n\t\t\tif(this.anthill == 2){ //Lower case, 97 for Latin, 945 for Greek\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn (char) (96 + 9);\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (96 + this.food);\r\n\t\t\t}\r\n\t\t\t//Else error, cannot be less than 0 or more than 2 anthills\r\n\t\t\tLogger.log(new WarningEvent(\"Cell anthill value not 0, 1 or 2\"));\r\n\t\t\treturn 0;\t//Null char value\r\n\t\t}\r\n\t\t\r\n\t\t//Anthill\r\n\t\tif(this.anthill > 0){\r\n\t\t\tif(this.anthill == 1){\r\n\t\t\t\treturn '+';\r\n\t\t\t}\r\n\t\t\tif(this.anthill == 2){\r\n\t\t\t\treturn '-';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\t//Markers\r\n//\t\tfor(int i = 0; i < this.markers.length; i++){\r\n//\t\t\tfor(boolean marker : this.markers[i]){\r\n//\t\t\t\tif(marker){\r\n//\t\t\t\t\tif(i == 0){\r\n//\t\t\t\t\t\treturn '[';\r\n//\t\t\t\t\t}else if(i == 1){\r\n//\t\t\t\t\t\treturn ']';\r\n//\t\t\t\t\t}else{\r\n//\t\t\t\t\t\treturn '?';\r\n//\t\t\t\t\t}\r\n//\t\t\t\t}\r\n//\t\t\t}\t\t\r\n//\t\t}\r\n\t\t\r\n\t\treturn '.';\r\n\t}", "public String compress() {\r\n \tfor (int i = 0; i < text.length(); i++)\r\n \t\tcompressedText += charToCode.get(text.charAt(i));\r\n return compressedText;\r\n }", "public static void main (String[]args){\n \r\n char AMayuscula = 'A', AMinuscula = 'a';\r\n // cast explicito de tipo - (AMayuscula + 1) el resultado es int\r\n char BMayuscula = (char) (AMayuscula + 1);\r\n \r\n System.out.println('\\n');\r\n System.out.println(BMayuscula);\r\n\t}", "private ArrayList<String> convertChar() {\r\n \tArrayList<String> patterns = new ArrayList<String>();\r\n \tfor (int i = 0; i < this.patterns.size(); i++) {\r\n \t\tString s = \"\";\r\n \t\tfor (int j = 0; j < this.patterns.get(i).length; j++) {\r\n \t\t\ts += this.patterns.get(i)[j];\r\n \t\t}\r\n \t\tpatterns.add(s);\r\n \t}\r\n \treturn patterns;\r\n }", "private void changeCipher(char keyChar) {\n int index = (keyChar - 'a');\n char[] temp = Arrays.copyOfRange(ALPHABET, 0, index);\n for (int i = index; i < ALPHABET.length; i++) {\n cipher[i-index] = ALPHABET[i];\n }\n for (int j = 0; j < index; j++) {\n cipher[cipher.length - 1 - index] = temp[j];\n }\n }", "private String repMessageCharacter() {\n\t\tString temp = \"\";\n\t\tString interpret = \"\";\n\t\tint messL = message.length();\n\t\tint polyL = polybius.length;\n\t\tint polyR = polybius[0].length;\n\t\tif(this.key != \"\") {\n\t\t\timpArray = new String[messL];\n\t\t\tfor(int i = 0; i < messL; i++) {\n\t\t\t\ttemp = \"\" + message.charAt(i);\n\t\t\t\tfor(int j = 0; j < polyL;j++) {\n\t\t\t\t\tfor(int k = 0; k < polyR; k++) {\n\t\t\t\t\t\tif(temp.equalsIgnoreCase(polybius[j][k])) {\n\t\t\t\t\t\t\timpArray[i] = columnRowIndex(j,k);\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\tfor(int i = 0; i < message.length(); i++) {\n\t\t\t\tinterpret += impArray[i];\n\t\t\t}\n\t\t}else {\n\t\t\tinterpret = \"\";\n\t\t}\n\t\t//System.out.println(interpret);\n\t\treturn interpret;\n\t}", "private static String rep(String input) {\n\t\tchar[] ca = input.toCharArray();\n\t\tint c = 0;\n\t\tfor (int i = 0, n = ca.length; i < n; i++) {\n\t\t\tif (ca[i] == '\\'')\n\t\t\t\tc++;\n\t\t\telse if (ca[i] == ',' && ((c % 2) != 0))\n\t\t\t\tca[i] = '~';\n\t\t}\n\t\treturn String.valueOf(ca);\n\t}", "public static int[][] transpose (int[][] c) {\n\t\t \n\n\t\t int width =c.length;\n\t\t int height = c[0].length;\n\n\t\t int[][] array_new = new int[height][width];\n\n\t\t for (int x = 0; x < width; x++) {\n\t\t for (int y = 0; y < height; y++) {\n\t\t array_new[y][x] = c[x][y];\n\t\t }\n\t\t }\n\t\t return array_new;\n\t\t}", "public char encryptChar(char c){\r\n\t\tc = Character.toUpperCase(c);\r\n\t\tchar a = c;\r\n\t\tif(plugboard != null){\r\n\t\t\ta = plugboard.matchChar(c);\r\n\t\t}\r\n\t\ta = rotors.encrypt(a);\r\n\t\tif(plugboard != null){\r\n\t\t\ta = plugboard.matchChar(a);\r\n\t\t}\r\n\t\treturn a;\r\n\t}", "String charWrite();", "public String swap(String a, int i, int j)\n {\n char temp;\n char[] charArray = a.toCharArray();\n temp = charArray[i];\n charArray[i] = charArray[j];\n charArray[j] = temp;\n return String.valueOf(charArray);\n }", "DataFrame<C,R> transpose();", "public String transformString( String inputString) {\n char c[]=inputString.toCharArray();\n String transformedString=\"\";\n \n for (int i =c.length-1; i>=0; i--) { \n transformedString +=c[i];\n }\n return transformedString;\n }", "char toChar(int index) {\n if (index > _chars.length() || index < 0) {\n throw new EnigmaException(\"Alpha.toChar: Index out of range.\");\n }\n return _chars.charAt(index);\n }", "Matrix<T> getTransposed();", "void draw_char(int x, int y, char[][] _display, char c) {\n _display[x][y] = c;\n }", "public void encodeChars() {\n encodedChars = new int[uniqueChars.size()];\n Iterator<Character> mover = uniqueChars.iterator();\n Iterator<Character> moverTwo = uniqueChars.iterator();\n System.out.print(\"\\nEncoding characters to its ASCII integer value:\");\n for(int a = 0; a < uniqueChars.size(); a++) {\n encodedChars[a] = (int)mover.next();\n encodedChars[a] = encodedChars[a] / encodedChars[a] + a - 1;\n System.out.print(moverTwo.next() + \" : \" + encodedChars[a] + \", \");\n }\n System.out.println(\"\\n\");\n }", "public static char demangle2(char char1, char char2) {\n switch (char1 << 16 | char2) {\n case 'A' << 16 | 'm': return '&';\n case 'A' << 16 | 't': return '@';\n case 'C' << 16 | 'l': return ':';\n case 'C' << 16 | 'm': return ',';\n case 'D' << 16 | 'q': return '\\\"';\n case 'D' << 16 | 't': return '.';\n case 'E' << 16 | 'q': return '=';\n case 'E' << 16 | 'x': return '!';\n case 'G' << 16 | 'r': return '>';\n case 'L' << 16 | 'B': return '[';\n case 'L' << 16 | 'C': return '{';\n case 'L' << 16 | 'P': return '(';\n case 'L' << 16 | 's': return '<';\n case 'M' << 16 | 'c': return '%';\n case 'M' << 16 | 'n': return '-';\n case 'N' << 16 | 'm': return '#';\n case 'P' << 16 | 'c': return '%';\n case 'P' << 16 | 'l': return '+';\n case 'Q' << 16 | 'u': return '?';\n case 'R' << 16 | 'B': return ']';\n case 'R' << 16 | 'C': return '}';\n case 'R' << 16 | 'P': return ')';\n case 'S' << 16 | 'C': return ';';\n case 'S' << 16 | 'l': return '/';\n case 'S' << 16 | 'q': return '\\\\';\n case 'S' << 16 | 't': return '*';\n case 'T' << 16 | 'l': return '~';\n case 'U' << 16 | 'p': return '^';\n case 'V' << 16 | 'B': return '|';\n }\n return (char) (-1);\n }", "public String swap(String a, int i, int j) {\r\n char temp;\r\n char[] charArray = a.toCharArray();\r\n temp = charArray[i];\r\n charArray[i] = charArray[j];\r\n charArray[j] = temp;\r\n return String.valueOf(charArray);\r\n }", "private char[] preprocess(String text) {\n char[] t = new char[text.length() * 2 + 3];\n t[0] = '$';\n t[text.length() * 2 + 2] = '@';\n for (int i = 0; i < text.length(); i++) {\n t[2 * i + 1] = '#';\n t[2 * i + 2] = text.charAt(i);\n }\n t[text.length() * 2 + 1] = '#';\n return t;\n }", "char toChar(int index) {\n return _letters.charAt(index);\n }", "public String printCharStack() {\r\n\t\t String elements = \"<\";\r\n\t\t \r\n\t\tfor(int i = 0; i < count; i++) {\r\n\t\t\telements += \" \" + (char)array[i];\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\telements += \">\";\r\n\t\t\treturn elements;\r\n\t }", "private char complement(char c) {\n switch (c) {\n case 'A': c = 'T'; break;\n case 'T': c = 'A'; break;\n case 'G': c = 'C'; break;\n case 'C': c = 'G'; break;\n case 'a': c = 't'; break;\n case 't': c = 'a'; break;\n case 'g': c = 'c'; break;\n case 'c': c = 'g'; break;\n default: c = 'N'; break;\n }\n return c;\n }", "CharacterTarget put(char[] symbols, int from, int to) throws PrintingException;", "@Deprecated\n/* */ public static Character toCharacterObject(char ch) {\n/* 88 */ return Character.valueOf(ch);\n/* */ }", "private static char toChar(byte theByte) {\n if (theByte < 0) {\n return (char) (256 + theByte);\n } else {\n return (char) theByte;\n }\n }", "char toChar(int index) {\n if (index >= 0 && index < size()) {\n return _chars[index];\n } else {\n throw new EnigmaException(\"Index out of bounds.\");\n }\n }", "public Character decodeCharacter(PushbackString input) {\n\t\tinput.mark();\n\t\tCharacter first = input.next();\n\t\tif (first == null || first != '\\\\') {\n\t\t\tinput.reset();\n\t\t\treturn null;\n\t\t}\n\n\t\tCharacter second = input.next();\n\t\tif (second == null) {\n\t\t\tinput.reset();\n\t\t\treturn null;\n\t\t}\n\n\t\t/*\n\t\t * From css 2.1 spec: http://www.w3.org/TR/CSS21/syndata.html#characters\n\t\t * \n\t\t * First, inside a string, a backslash followed by a newline is ignored\n\t\t * (i.e., the string is deemed not to contain either the backslash or\n\t\t * the newline).\n\t\t * \n\t\t * Second, it cancels the meaning of special CSS characters. Except\n\t\t * within CSS comments, any character (except a hexadecimal digit,\n\t\t * linefeed, carriage return, or form feed) can be escaped with a\n\t\t * backslash to remove its special meaning. For example, \"\\\"\" is a\n\t\t * string consisting of one double quote. Style sheet preprocessors must\n\t\t * not remove these backslashes from a style sheet since that would\n\t\t * change the style sheet's meaning.\n\t\t * \n\t\t * Third, backslash escapes allow authors to refer to characters they\n\t\t * cannot easily put in a document. In this case, the backslash is\n\t\t * followed by at most six hexadecimal digits (0..9A..F), which stand\n\t\t * for the ISO 10646 ([ISO10646]) character with that number, which must\n\t\t * not be zero. (It is undefined in CSS 2.1 what happens if a style\n\t\t * sheet does contain a character with Unicode codepoint zero.) If a\n\t\t * character in the range [0-9a-fA-F] follows the hexadecimal number,\n\t\t * the end of the number needs to be made clear. There are two ways to\n\t\t * do that:\n\t\t * \n\t\t * 1. with a space (or other white space character): \"\\26 B\" (\"&B\"). In\n\t\t * this case, user agents should treat a \"CR/LF\" pair (U+000D/U+000A) as\n\t\t * a single white space character.\n\t\t * \n\t\t * 2. by providing exactly 6 hexadecimal digits: \"\\000026B\" (\"&B\")\n\t\t * \n\t\t * In fact, these two methods may be combined. Only one white space\n\t\t * character is ignored after a hexadecimal escape. Note that this means\n\t\t * that a \"real\" space after the escape sequence must itself either be\n\t\t * escaped or doubled.\n\t\t * \n\t\t * If the number is outside the range allowed by Unicode (e.g.,\n\t\t * \"\\110000\" is above the maximum 10FFFF allowed in current Unicode),\n\t\t * the UA may replace the escape with the \"replacement character\"\n\t\t * (U+FFFD). If the character is to be displayed, the UA should show a\n\t\t * visible symbol, such as a \"missing character\" glyph (cf. 15.2, point\n\t\t * 5).\n\t\t */\n\n\t\tswitch (second) { // special whitespace cases. I assume they mean\n\t\t\t\t\t\t\t// for all of these to qualify as a \"new\n\t\t\t\t\t\t\t// line.\" Otherwise there is no specification\n\t\t\t\t\t\t\t// of what to do for \\f\n\t\tcase '\\r':\n\t\t\tif (input.peek('\\n'))\n\t\t\t\tinput.next();\n\t\t\t// fall through\n\t\tcase '\\n':\n\t\tcase '\\f':\n\t\t\t// bs follwed by new line replaced by nothing\n\t\tcase '\\u0000': // skip NUL for now too\n\t\t\treturn decodeCharacter(input);\n\t\t}\n\n\t\tif (!PushbackString.isHexDigit(second)) { // non hex digit\n\t\t\treturn second;\n\t\t}\n\n\t\t// Search for up to 6 hex digits following until a space\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(second);\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tCharacter c = input.next();\n\t\t\tif (c == null || Character.isWhitespace(c))\n\t\t\t\tbreak;\n\t\t\tif (PushbackString.isHexDigit(c))\n\t\t\t\tsb.append(c);\n\t\t\telse {\n\t\t\t\tinput.pushback(c);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\t// parse the hex digit and create a character\n\t\t\tint i = Integer.parseInt(sb.toString(), 16);\n\n\t\t\tif (Character.isValidCodePoint(i))\n\t\t\t\treturn (char) i;\n\t\t\treturn REPLACEMENT;\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"Received a NumberFormateException parsing a string verified to be hex\",\n\t\t\t\t\te);\n\t\t}\n\t}", "@Override\n\tchar toChar() {\n\t\treturn 'R';\n\t}", "protected String toString(char c) {\n\t\t\treturn Character.toString(c);\n\t\t}", "private StringBuilder hexConversion(StringBuilder input) {\n\t\tStringBuilder finalRes = new StringBuilder();\n\t\tString currentVal = \"\";\n\t\tchar tempVal = ' ';\n\t\t\n\t\tfor(int i = 0; i < input.length(); i++)\n\t\t{\n\t\t\t\n\t\t\ttempVal = input.charAt(i);\n\t\t\t\n\t\t\tif(isOperator(input.charAt(i)) == false)\n\t\t\t{\n\t\t\t\tcurrentVal = currentVal + Character.toString(tempVal);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(currentVal);\n\t\t\t\tString digits = \"0123456789ABCDEF\";\n\t\t\t\tint val = 0;\n\t\t\t\tfor(int j = 0; j < currentVal.length(); j++)\n\t\t\t\t{\n\t\t\t\t\tchar c = currentVal.charAt(j);\n\t\t\t\t\tint d = digits.indexOf(c);\n\t\t\t\t\tval = 16 * val + d;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfinalRes.append(val + Character.toString(tempVal));\n\t\t\t\tcurrentVal = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t// converting the last currentVal\n\t\t\n\t\tSystem.out.println(currentVal);\n\t\tString digits = \"0123456789ABCDEF\";\n\t\tint val = 0;\n\t\tfor(int j = 0; j < currentVal.length(); j++)\n\t\t{\n\t\t\tchar c = currentVal.charAt(j);\n\t\t\tint d = digits.indexOf(c);\n\t\t\tval = 16 * val + d;\n\t\t}\n\t\t\n\t\tfinalRes.append(val);\n\t\t\n\t\t\n\t\treturn finalRes;\n\t}", "private static Character flip(Character c){\n return c == '0'?'1':'0';\n }", "char toChar(int index) {\n return _chars.charAt(index);\n }", "private static void swap(char[] arr, int i, int j) {\r\n\t\tchar c = arr[i];\r\n\t\tarr[i] = arr[j];\r\n\t\tarr[j] = c;\r\n\t}", "private char hexaToChar(int[] i){\n char c;\n String h = \"\" + Integer.toHexString(i[0]) + Integer.toHexString(i[1]);\n c = (char) Integer.parseInt(h, 16);\n return c;\n }", "String escChr(char pChar) throws Exception;", "public HiveChar getHiveChar() {\n return new HiveChar(value.toString(), -1);\n }", "public char[] convert1D(char[][] board) {\r\n\t\tchar[] result = new char[16];\r\n\t\tint index = 0; \r\n\t\tfor(int i = 0; i < 4; i++) {\r\n\t\t\tfor(int j = 0; j < 4; j++) {\r\n\t\t\t\tresult[index] = board[i][j];\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "CharSequence escape(char c);", "public String swap(String a, int i, int j)\n\t{\n\t\tchar temp;\n\t\tchar[] charArray = a.toCharArray();\n\t\ttemp = charArray[i];\n\t\tcharArray[i] = charArray[j];\n\t\tcharArray[j] = temp;\n\t\treturn String.valueOf(charArray);\n\t}", "static public String charToHex(char c) {\n\t\tbyte hi = (byte) (c >>> 8);\n\t\tbyte lo = (byte) (c & 0xff);\n\t\treturn byteToHex(hi) + byteToHex(lo);\n\t}", "public SpecialChar insertSpecialChar() {\n SpecialChar specialChar = new SpecialChar();\n specialChar.setId(4491);\n specialChar.setSpecialCharA(\"! ' , . / : ; ? ^ _ ` | \"\n + \" ̄ 、 。 · ‥ … ¨ 〃 ­ ― ∥ \ ∼ ´ ~ ˇ \" + \"˘ ˝ ˚ ˙ ¸ ˛ ¡ ¿ ː\");\n specialChar.setSpecialCharB(\"" ( ) [ ] { } ‘ ’ “ ” \"\n + \" 〔 〕 〈 〉 《 》 「 」 『 』\" + \" 【 】\");\n specialChar.setSpecialCharC(\"+ - < = > ± × ÷ ≠ ≤ ≥ ∞ ∴\"\n + \" ♂ ♀ ∠ ⊥ ⌒ ∂ ∇ ≡ ≒ ≪ ≫ √ ∽ ∝ \"\n + \"∵ ∫ ∬ ∈ ∋ ⊆ ⊇ ⊂ ⊃ ∪ ∩ ∧ ∨ ¬ ⇒ \" + \"⇔ ∀ ∃ ∮ ∑ ∏\");\n specialChar\n .setSpecialCharD(\"$ % ₩ F ′ ″ ℃ Å ¢ £ ¥ ¤ ℉ ‰ \"\n + \"€ ㎕ ㎖ ㎗ ℓ ㎘ ㏄ ㎣ ㎤ ㎥ ㎦ ㎙ ㎚ ㎛ \"\n + \"㎜ ㎝ ㎞ ㎟ ㎠ ㎡ ㎢ ㏊ ㎍ ㎎ ㎏ ㏏ ㎈ ㎉ \"\n + \"㏈ ㎧ ㎨ ㎰ ㎱ ㎲ ㎳ ㎴ ㎵ ㎶ ㎷ ㎸ ㎹ ㎀ ㎁ ㎂ ㎃ ㎄ ㎺ ㎻ ㎼ ㎽ ㎾ ㎿ ㎐ ㎑ ㎒ ㎓ ㎔ Ω ㏀ ㏁ ㎊ ㎋ ㎌ ㏖ ㏅ ㎭ ㎮ ㎯ ㏛ ㎩ ㎪ ㎫ ㎬ ㏝ ㏐ ㏓ ㏃ ㏉ ㏜ ㏆\");\n specialChar.setSpecialCharE(\"# & * @ § ※ ☆ ★ ○ ● ◎ ◇ ◆ □ ■ △ ▲\"\n + \" ▽ ▼ → ← ↑ ↓ ↔ 〓 ◁ ◀ ▷ ▶ ♤ ♠ ♡ ♥ ♧ ♣ ⊙ ◈ ▣ ◐\"\n + \" ◑ ▒ ▤ ▥ ▨ ▧ ▦ ▩ ♨ ☏ ☎ ☜ ☞ ¶ † \"\n + \"‡ ↕ ↗ ↙ ↖ ↘♭ ♩ ♪ ♬ ㉿ ㈜ № ㏇ ™ ㏂ ㏘ ℡ ® ª º\");\n\n session.save(specialChar);\n\n return specialChar;\n }", "private void encodeCharacter(Character encodedCharacter,\n\t\t\tCharacter lastCharacter) {\n\t\t\n\t\tif (encodedCharacter > lastCharacter) {\n\t\t\tencoded.append((char) (encodedCharacter - 26));\n\t\t} else {\n\t\t\tencoded.append((char) (encodedCharacter));\n\t\t}\n\t}", "public Matrix transpose() {\n Matrix transposed = new Matrix(this.cols, this.rows);\n\n for (int i = 0; i < transposed.rows; i++) {\n for (int j = 0; j < transposed.cols; j++) {\n transposed.data[i][j] = this.data[j][i];\n }\n }\n return transposed;\n }", "protected static char[] expand(char[] stack) {\n char[] newStack = new char[stack.length * 2];\n System.arraycopy(stack, 0, newStack, 0, stack.length);\n return newStack;\n }", "private static char[][] decimateHorizontally(String[] lines) {\n\t\tfinal int width = (lines[0].length() + 1) / 2;\n\t\tchar[][] c = new char[lines.length][width];\n\t\tfor (int i = 0; i < lines.length; i++)\n\t\t\tfor (int j = 0; j < width; j++)\n\t\t\t\tc[i][j] = lines[i].charAt(j * 2);\n\t\treturn c;\n\t}", "public void setChar(Character c) {\n setText(String.valueOf(c));\n }", "public Matrix transpose() {\n\t\tMatrix a = copy();\n\t\tComplexNumber[][] values = new ComplexNumber[a.N][];\n\t\tfor (int col = 0; col < a.N; col++) {\n\t\t\tvalues[col] = new ComplexNumber[a.M];\n\t\t\tfor (int row = 0; row < a.M; row++) {\n\t\t\t\tvalues[col][row] = a.ROWS[row][col]; \t\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(values);\n\t}", "private BufferedImage createCharImage(char character) {\n\t\tBufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\r\n\t\tGraphics2D graphics = image.createGraphics();\r\n\t\t\r\n\t\tif (antiAliasing) {\r\n\t\t\tgraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n\t\t}\r\n\t\t\r\n\t\tgraphics.setFont(font);\r\n\t\tFontMetrics metrics = graphics.getFontMetrics();\r\n\t\tgraphics.dispose();\r\n\t\t\r\n\t\tint charWidth = metrics.charWidth(character);\r\n\t\tint charHeight = metrics.getHeight();\r\n\t\t\r\n\t\t// Character not represented in provided font\r\n\t\tif (charWidth == 0) return null;\r\n\t\t\r\n\t\t// Generate character image\r\n\t\timage = new BufferedImage(charWidth, charHeight, BufferedImage.TYPE_INT_ARGB);\r\n\t\tgraphics = image.createGraphics();\r\n\t\t\r\n\t\tif (antiAliasing) {\r\n\t\t\tgraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n\t\t}\r\n\t\t\r\n\t\tgraphics.setFont(font);\r\n\t\tgraphics.setPaint(Color.WHITE);\r\n\t\tgraphics.drawString(String.valueOf(character), 0, metrics.getAscent());\r\n\t\tgraphics.dispose();\r\n\t\t\r\n\t\treturn image;\r\n\t}", "private static String convertEscapeChar(String escapeCharacter)\t{\n\t\tString charCode = escapeCharacter.substring(escapeCharacter.indexOf(\"#\")+1);\n\t\treturn \"\" + (char) Integer.parseInt(charCode);\n\t}", "CharacterTarget put(char symbol) throws PrintingException;", "private static String swap(String str, int i, int j) {\n \n\t\tchar temp;\n char[] charArray = str.toCharArray();\n \n temp = charArray[i];\n charArray[i] = charArray[j];\n charArray[j] = temp;\n \n return String.valueOf(charArray);\n }", "private char translateChar(char[] mapping, char character)\n { if (character==' ') return character;\n\n int lower = lowerKeyCodeMapping.indexOf(character);\n int upper = upperKeyCodeMapping.indexOf(character);\n\n int mapValue = lower;\n if (lower<0) mapValue = upper;\n if (mapValue<0) return '\\0';\n return mapping[mapValue];\n }", "public char getChar();", "private char toChar(int u)\r\n { \r\n return (char)(u + 64);\r\n }", "public char[] toChars() {\n\t\tchar[] chars = new char[this.s.length()];\n\t\tfor (int i = 0; i < chars.length; i++) {\n\t\t\tchars[i] = this.s.charAt(i);\n\t\t}\n\t\treturn chars;\n\t}", "public BufferedImage transpose(BufferedImage img) {\n if (img == null) {\n return null;\n }\n BufferedImage sink = new BufferedImage(img.getHeight(), img.getWidth(), img.getType());\n for (int i = 0; i < img.getHeight(); i++) {\n for (int j = 0; j < img.getWidth(); j++) {\n Color color = new Color(img.getRGB(j, i));\n sink.setRGB(i, j, color.getRGB());\n }\n }\n return sink;\n }", "public static void main(String[] args) {\nScanner scn=new Scanner(System.in);\nSystem.out.print(\"½Ð¿é¤J¤å¦r\");\nString str=scn.nextLine();\nchar[]data=str.toCharArray();\nint len=str.length();\nchar[]data1=new char[len];\nfor(int i=0;i<len;i++){\n\tdata1[i]=data[len-i-1];\n}\nString str2=new String(data1);\nSystem.out.println(data1);\n\t}", "public static char datochar(){\n try {\n char respuesta=dato().charAt(0);\n return respuesta;\n } catch (Exception e) {\n return('z');\n }\n }", "public static String createTicTacRow(int row, char[][] ticTacArray) {\n String lineResult = \"\";\n\n // Note space at the end of string returned\n for (int i = 0; i < 3; i++) {\n char temp = ticTacArray[row][i];\n lineResult += temp + \" \";\n }\n\n return lineResult;\n }", "public static void pipei(String c, String a)\n\t{\n\t\tchar * p;\n//C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged:\n\t\tchar * q;\n\t\tfor (p = c,q = a; * p != '\\0';p++,q++)\n\t\t{\n\t\t\tif (*p != '(' && *p != ')')\n\t\t\t{\n\t\t\t\t*q = ' ';\n\t\t\t}\n\t\t\tif (*p == ')')\n\t\t\t{\n\t\t\t\t*q = '?';\n\t\t\t}\n\t\t\tif (*p == '(')\n\t\t\t{\n\t\t\t\t*q = '$';\n\t\t\t}\n\t\t}\n\t\t*q = p;\n\t\tSystem.out.printf(\"%s\\n\",a);\n\t}", "public static void main(String[] args) {\n String s = \"we are i interviewing now\";\n char[] nums = s.toCharArray();\n // we are i interviewing n ow\n // i\n // j\n // we are i interviewing n ow\n // i\n // j\n // we are i interviewing n ow\n // i\n // j\n // we are i interviewing n ow\n \n // we are i interviewing now\n // i\n // j\n \n \n // 當nums[j]和nums[j-1]有一個不是空格時, 和i交換\n // 都是空格, 只移動j\n int i = 1;\n int j = 1;\n while (j < nums.length) {\n // j和j-1有一個不是空格 --> 交換\n if (j >= 1 && (nums[j] != ' ' || nums[j - 1] != ' ')) {\n char temp = nums[i];\n nums[i] = nums[j];\n nums[j] = temp;\n i++;\n } else if (j >= 1 && nums[j] == ' ' && nums[j - 1] == ' '\n && nums[i - 1] != ' ') {\n i++;\n }\n j++;\n }\n System.out.println(nums);\n }", "private char toChar(int u) {\n\t\t \n\t\treturn (char)(u + 64);\n\t}", "public static char toChar(Character ch, char defaultValue) {\n/* 150 */ if (ch == null) {\n/* 151 */ return defaultValue;\n/* */ }\n/* 153 */ return ch.charValue();\n/* */ }", "public T transpose() {\n T ret = createMatrix(mat.getNumCols(), mat.getNumRows(), mat.getType());\n\n ops.transpose(mat, ret.mat);\n\n return ret;\n }", "public String cifrar(String palabra){\n\n String cifrado= \" \";\n char auxiliar;\n int i = 0;\n \n for(i=0;i<palabra.length();i++){\n auxiliar=palabra.charAt(i);\n if(auxiliar ==' '){\n \n }else{\n auxiliar++;\n if(auxiliar=='{'){\n auxiliar='a';\n }\n }\n cifrado=cifrado+\"\"+auxiliar;\n }\n return cifrado;\n }", "public String decode(String words) {\n \n String reversedLetters = words;\n String [] reverseWordPosition = reversedLetters.split (\" \");\n String [] tempCopy = new String [reverseWordPosition.length];\n \n \n //Reverse the order of the words to position after Transpose has ran.\n for (int i = 0; i <= (((reverseWordPosition.length) - 1 - i) / 2); i++){\n tempCopy [i] = reverseWordPosition [i];\n reverseWordPosition [i] = reverseWordPosition [(reverseWordPosition.length) - 1 - i];\n reverseWordPosition [(reverseWordPosition.length) - 1 - i] = tempCopy [i]; \n }\n \n \n String s = new String();\n //Pass that array into a String\n for (int i = 0; i < reverseWordPosition.length; i++ ){\n s += reverseWordPosition [i] + \" \";\n }\n \n //Words are in original position but letter are still reversed. Decrypt\n //must be implemented after decode.\n \n return s;\n \n \n }", "public SingleChar(char c) {\n super(SOME, NONE);\n this.c = c;\n }", "public Matrix transpose(){\r\n \tMatrix tmat = new Matrix(this.ncol, this.nrow);\r\n \tdouble[][] tarray = tmat.getArrayReference();\r\n \tfor(int i=0; i<this.ncol; i++){\r\n \t\tfor(int j=0; j<this.nrow; j++){\r\n \t\ttarray[i][j]=this.matrix[j][i];\r\n \t\t}\r\n \t}\r\n \treturn tmat;\r\n \t}", "char cipher(int charToCipher);", "private static void swap(char[] arr,int i,int j){\n char temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }", "private int[] charToHexa(char c){\n int[] hex = new int[2];\n String h = Integer.toHexString((int) c);\n if (h.length() == 1){\n h = \"0\" + h;\n }\n hex[0] = Integer.parseInt(h.substring(0,1), 16);\n hex[1] = Integer.parseInt(h.substring(1), 16);\n return hex;\n }", "private Matriks Transpose(){\r\n\t\tMatriks Mhasil = new Matriks(KolEff,BrsEff);\r\n\t\tfor(int i=0;i<BrsEff;i++){\r\n\t\t\tfor(int j=0;j<KolEff;j++){\r\n\t\t\t\tMhasil.Elmt[j][i] = this.Elmt[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Mhasil;\r\n\t}", "public static char[][] arrayStringAmatrizChar(String[] array) {\n\tchar[][] matriz = new char[array.length][];\n\tfor (int i = 0; i < array.length; i++) {\n\t matriz[i] = array[i].toCharArray();\n\t}\n\treturn matriz;\n }" ]
[ "0.56556684", "0.5506293", "0.5214216", "0.51813513", "0.5162038", "0.51159203", "0.50773543", "0.50640666", "0.5016378", "0.49971223", "0.4971265", "0.49445271", "0.49390104", "0.4913404", "0.48802343", "0.48671323", "0.4863695", "0.4829557", "0.47809565", "0.4759883", "0.47576776", "0.47573224", "0.47513488", "0.47489578", "0.47471598", "0.47365278", "0.47234315", "0.47091222", "0.47030306", "0.47026765", "0.4691184", "0.4689507", "0.4687391", "0.4686869", "0.46771082", "0.46617165", "0.46606782", "0.4650185", "0.46247792", "0.46208036", "0.46032825", "0.45929796", "0.45874768", "0.45813996", "0.45763326", "0.45585933", "0.45578328", "0.45545503", "0.4549664", "0.45482144", "0.4547413", "0.454663", "0.45441297", "0.45375922", "0.45357496", "0.45345318", "0.45180175", "0.4500927", "0.44994047", "0.44991332", "0.44991192", "0.44917557", "0.44738775", "0.44605625", "0.44476768", "0.44425154", "0.44420728", "0.44396654", "0.44335127", "0.4432277", "0.44291297", "0.4425375", "0.4424983", "0.44112664", "0.4405429", "0.4404469", "0.4403402", "0.4398943", "0.4397508", "0.4394483", "0.4392462", "0.43887922", "0.4383702", "0.4383666", "0.43761703", "0.43729788", "0.43725118", "0.43686137", "0.43544438", "0.43532327", "0.43513834", "0.43474472", "0.43468347", "0.43407637", "0.43362373", "0.4319386", "0.4318762", "0.43186045", "0.4315125", "0.43131328", "0.43131262" ]
0.0
-1
/ Transposes the character back (reverse lookup).
public char decryptChar(char v) { for (char c : this.charMap.keySet()) { if (this.charMap.get(c).equals(v)) { return c; } } // could not be decrypted (and probably wasn't encrypted in the first place) return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void inverseTransform() {\n int first = BinaryStdIn.readInt();\n List<Integer> chars = new ArrayList<>();\n Map<Integer, Queue<Integer>> charPosition = new HashMap<>();\n int currentIndex = 0;\n\n while (!BinaryStdIn.isEmpty()) {\n int i = BinaryStdIn.readInt(8);\n chars.add(i);\n Queue<Integer> position = charPosition.get(i);\n\n if (position == null) {\n position = new Queue<>();\n charPosition.put(i, position);\n }\n\n position.enqueue(currentIndex);\n currentIndex += 1;\n }\n\n int N = chars.size();\n int R = 256;\n int[] count = new int[R + 1];\n\n for (int i = 0; i < N; i++) {\n count[chars.get(i) + 1]++;\n }\n\n for (int r = 0; r < R; r++) {\n count[r + 1] += count[r];\n }\n\n int[] h = new int[N];\n\n for (int i = 0; i < N; i++) {\n h[count[chars.get(i)]++] = chars.get(i);\n }\n\n int[] next = new int[N];\n\n for (int i = 0; i < N; i++) {\n int index = charPosition.get(h[i]).dequeue();\n next[i] = index;\n }\n\n int current = first;\n\n for (int i = 0; i < N; i++) {\n BinaryStdOut.write(h[current], 8);\n current = next[current];\n }\n\n BinaryStdOut.flush();\n }", "public static void inverseTransform()\r\n {\r\n \tint first = BinaryStdIn.readInt();\r\n \tString s = BinaryStdIn.readString();\r\n \tBinaryStdIn.close();\r\n \t\r\n \tchar[] t = s.toCharArray();\r\n \r\n \tchar[] firstCharacters = t.clone();\r\n \tArrays.sort(firstCharacters);\r\n \t\r\n \t// Construction next[] using t[] and first\r\n \tint[] next = constructNext(t, firstCharacters, first);\r\n \t\r\n \t// Writing original string to StdOut using next[] and first\r\n \tint index = first;\r\n \tfor (int i = 0; i < t.length; i++)\r\n \t{\r\n \t\tBinaryStdOut.write(firstCharacters[index]);\r\n \t\tindex = next[index];\r\n \t}\r\n \tBinaryStdOut.close();\r\n }", "private void switchChars(char[] chars,int i, int j){\r\n\t\tchar tmp=chars[i];\r\n\t\tchars[i]=chars[j];\r\n\t\tchars[j]=tmp;\r\n\t}", "public String decode(String words) {\n \n String reversedLetters = words;\n String [] reverseWordPosition = reversedLetters.split (\" \");\n String [] tempCopy = new String [reverseWordPosition.length];\n \n \n //Reverse the order of the words to position after Transpose has ran.\n for (int i = 0; i <= (((reverseWordPosition.length) - 1 - i) / 2); i++){\n tempCopy [i] = reverseWordPosition [i];\n reverseWordPosition [i] = reverseWordPosition [(reverseWordPosition.length) - 1 - i];\n reverseWordPosition [(reverseWordPosition.length) - 1 - i] = tempCopy [i]; \n }\n \n \n String s = new String();\n //Pass that array into a String\n for (int i = 0; i < reverseWordPosition.length; i++ ){\n s += reverseWordPosition [i] + \" \";\n }\n \n //Words are in original position but letter are still reversed. Decrypt\n //must be implemented after decode.\n \n return s;\n \n \n }", "private Set<String> transpositionHelper(String word) {\n\t\tSet<String> transpositionWords = new HashSet<String>();\n\t\tfor (int i = 0; i < word.length() - 1; i++) {\n\t\t\ttranspositionWords.add(word.substring(0, i) + word.substring(i + 1, i + 2) + word.substring(i, i + 1)\n\t\t\t\t\t+ word.substring(i + 2));\n\t\t}\n\t\treturn transpositionWords;\n\t}", "public void revComp() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (int i = 0; i < seq.size(); i++) {\n char c = seq.get(seq.size() - 1 - i);\n newSeq.add(complement(c));\n }\n seq = newSeq;\n }", "public static String Converterback(String z)\n\t{\n\n\t\t\n\t\tswitch(z)\n\t\t{\n\t\tcase \"10\":\n\t\t\treturn \"A\";\n\t\tcase \"11\":\n\t\t\treturn \"B\";\n\t\tcase \"12\":\n\t\t\treturn \"C\";\n\t\tcase \"13\":\n\t\t\treturn \"D\";\n\t\tcase \"14\":\n\t\t\treturn \"E\";\n\t\tcase \"15\":\n\t\t\treturn \"F\";\n\t\t}\n\t\treturn z;\n\t}", "private static Character flip(Character c){\n return c == '0'?'1':'0';\n }", "public String transposeChords() {\n\n\t\t//Tools from parent class\n\t\tArrayList<Integer> transposedChords = new ArrayList<>();\n\t\tChordList chords = new ChordList();\n\t\tString[] chordList = chords.getNotes();\n\t\tint[] scaleMajor = chords.getMajor();\n\t\tint[] scaleMinor = chords.getMinor();\n\n\t\t//custom ASCII table conversion\n\t\tint[] fixedNotes = new int[m_notes.length()];\n\t\tString[] userNotes = m_notes.split(\" \");\n\n\t\tfor(int i = 0; i < m_notes.length(); i++) {\n\t\t\tfixedNotes[i] = chords.noteIndex(userNotes[i]);\n\t\t}\n\n\t\t//Cycle each note in notes passed in by user\n\t\tint cycle = 0;\n\n\t\tfor(int note = 0; note < fixedNotes.length; note++) {\n\n\t\t\tif(cycle >= scaleMajor.length)\n\t\t\t\tcycle = 0;\n\n\t\t\t//Check for type of scale\n\t\t\t//If the scaletype is major\n\t\t\tif(m_scaleType.equals(\"major\")) {\n\n\t\t\t\ttransposedChords.add(fixedNotes[note] + scaleMajor[cycle] - OFFSET);\n\n\t\t\t} else if(m_scaleType.equals(\"minor\")) {\n\n\t\t\t}\n\n\t\t\tcycle++;\n\t\t}\n\n\t\treturn \"Transposed chords in \" + m_scale + \" \" + m_scaleType + \": \" + transposedChords;\n\t}", "public void reverse() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (int i = 0; i < seq.size(); i++) {\n newSeq.add(seq.get(seq.size() - 1 - i));\n }\n seq = newSeq;\n }", "private StringBuilder hexConversion(StringBuilder input) {\n\t\tStringBuilder finalRes = new StringBuilder();\n\t\tString currentVal = \"\";\n\t\tchar tempVal = ' ';\n\t\t\n\t\tfor(int i = 0; i < input.length(); i++)\n\t\t{\n\t\t\t\n\t\t\ttempVal = input.charAt(i);\n\t\t\t\n\t\t\tif(isOperator(input.charAt(i)) == false)\n\t\t\t{\n\t\t\t\tcurrentVal = currentVal + Character.toString(tempVal);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(currentVal);\n\t\t\t\tString digits = \"0123456789ABCDEF\";\n\t\t\t\tint val = 0;\n\t\t\t\tfor(int j = 0; j < currentVal.length(); j++)\n\t\t\t\t{\n\t\t\t\t\tchar c = currentVal.charAt(j);\n\t\t\t\t\tint d = digits.indexOf(c);\n\t\t\t\t\tval = 16 * val + d;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfinalRes.append(val + Character.toString(tempVal));\n\t\t\t\tcurrentVal = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t// converting the last currentVal\n\t\t\n\t\tSystem.out.println(currentVal);\n\t\tString digits = \"0123456789ABCDEF\";\n\t\tint val = 0;\n\t\tfor(int j = 0; j < currentVal.length(); j++)\n\t\t{\n\t\t\tchar c = currentVal.charAt(j);\n\t\t\tint d = digits.indexOf(c);\n\t\t\tval = 16 * val + d;\n\t\t}\n\t\t\n\t\tfinalRes.append(val);\n\t\t\n\t\t\n\t\treturn finalRes;\n\t}", "private String concatReverse(String orignalState, char concat){\n String stringChar = \"\";\n stringChar += concat;\n if(orignalState.equals(\"e\")){\n return stringChar;\n }\n else{\n return orignalState.concat(stringChar);\n }\n }", "public String transformString( String inputString) {\n char c[]=inputString.toCharArray();\n String transformedString=\"\";\n \n for (int i =c.length-1; i>=0; i--) { \n transformedString +=c[i];\n }\n return transformedString;\n }", "private static String rep(String input) {\n\t\tchar[] ca = input.toCharArray();\n\t\tint c = 0;\n\t\tfor (int i = 0, n = ca.length; i < n; i++) {\n\t\t\tif (ca[i] == '\\'')\n\t\t\t\tc++;\n\t\t\telse if (ca[i] == ',' && ((c % 2) != 0))\n\t\t\t\tca[i] = '~';\n\t\t}\n\t\treturn String.valueOf(ca);\n\t}", "private char complement(char c) {\n switch (c) {\n case 'A': c = 'T'; break;\n case 'T': c = 'A'; break;\n case 'G': c = 'C'; break;\n case 'C': c = 'G'; break;\n case 'a': c = 't'; break;\n case 't': c = 'a'; break;\n case 'g': c = 'c'; break;\n case 'c': c = 'g'; break;\n default: c = 'N'; break;\n }\n return c;\n }", "public static String reverser(String line) {\n String result=\"\";\n for (int i = line.length()-1; i >=0 ; i--) {\n result += line.charAt(i);\n }\n return result;\n}", "public final void transpose() {\n\tfloat tmp = m01;\n\tm01 = m10;\n\tm10 = tmp;\n\n\ttmp = m02;\n\tm02 = m20;\n\tm20 = tmp;\n\n\ttmp = m12;\n\tm12 = m21;\n\tm21 = tmp;\n\n }", "private String repMessageCharacter() {\n\t\tString temp = \"\";\n\t\tString interpret = \"\";\n\t\tint messL = message.length();\n\t\tint polyL = polybius.length;\n\t\tint polyR = polybius[0].length;\n\t\tif(this.key != \"\") {\n\t\t\timpArray = new String[messL];\n\t\t\tfor(int i = 0; i < messL; i++) {\n\t\t\t\ttemp = \"\" + message.charAt(i);\n\t\t\t\tfor(int j = 0; j < polyL;j++) {\n\t\t\t\t\tfor(int k = 0; k < polyR; k++) {\n\t\t\t\t\t\tif(temp.equalsIgnoreCase(polybius[j][k])) {\n\t\t\t\t\t\t\timpArray[i] = columnRowIndex(j,k);\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\tfor(int i = 0; i < message.length(); i++) {\n\t\t\t\tinterpret += impArray[i];\n\t\t\t}\n\t\t}else {\n\t\t\tinterpret = \"\";\n\t\t}\n\t\t//System.out.println(interpret);\n\t\treturn interpret;\n\t}", "public static void inverseTransform() {\n int first = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int N = t.length();\n char[] b = new char[N];\n for (int i = 0; i < N; i++) b[i] = t.charAt(i);\n Arrays.sort(b);\n\n int[] next = new int[N];\n int[] count = new int[R + 1];\n\n for (int i = 0; i < N; i++) {\n count[t.charAt(i) + 1]++;\n }\n for (int r = 0; r < R; r++) {\n count[r + 1] += count[r];\n }\n for (int i = 0; i < N; i++) {\n next[count[t.charAt(i)]++] = i;\n }\n\n int number = 0;\n for (int i = first; number < N; i = next[i]) {\n BinaryStdOut.write(b[i]);\n number++;\n }\n BinaryStdOut.close();\n }", "private String[] Transposicion(String texto) {\n String retorno[] = new String[2];\n retorno[0] = \"1\";\n retorno[1] = \"\";\n texto = texto.toLowerCase();\n try {//evalua si hay transposicion en el while\n if (texto.contains(\"w\") && texto.contains(\"h\") && texto.contains(\"i\") && texto.contains(\"l\") && texto.contains(\"e\")) {\n if (!texto.equals(\"while\") && texto.length() == 5) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia while.\";\n }\n } else {//evalua si hay transposicion en el if\n if (texto.contains(\"i\") && texto.contains(\"f\")) {\n if (!texto.equals(\"if\") && texto.length() == 2) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia if.\";\n }\n } else {//evalua si hay transposicion en el int\n if (texto.contains(\"i\") && texto.contains(\"n\") && texto.contains(\"t\")) {\n if (!texto.equals(\"int\") && texto.length() == 3) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia int.\";\n }\n } else {//evalua si hay transposicion en el for\n if (texto.contains(\"f\") && texto.contains(\"o\") && texto.contains(\"r\")) {\n if (!texto.equals(\"for\") && texto.length() == 3) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia for.\";\n }\n } else {//evalua si hay transposicion en el do while\n if (texto.contains(\"d\") && texto.contains(\"o\")) {\n if (!texto.equals(\"do\") && texto.length() == 2) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia do.\";\n }\n }\n }\n }\n }\n }\n } catch (Exception e) {\n System.out.println(\"Error en metodo de Transposicion\");\n } finally {\n return retorno;\n }\n }", "public void flipOverX(){\n int len = tileChars.length;\r\n \r\n // swap rows\r\n for (int i = 0; i < len / 2; i++)\r\n {\r\n for (int j = 0; j < len; j++)\r\n {\r\n // swap `tileChars[i][j]` with `tileChars[len-i-1][j]`\r\n char temp = tileChars[i][j];\r\n tileChars[i][j] = tileChars[len-i-1][j];\r\n tileChars[len-i-1][j] = temp;\r\n }\r\n }\r\n \r\n boolean temp = this.matchFound[0];\r\n this.matchFound[0] = this.matchFound[2];\r\n this.matchFound[2] = temp;\r\n \r\n this.recalculateEdges(); //fix edges\r\n }", "private void changeCipher(char keyChar) {\n int index = (keyChar - 'a');\n char[] temp = Arrays.copyOfRange(ALPHABET, 0, index);\n for (int i = index; i < ALPHABET.length; i++) {\n cipher[i-index] = ALPHABET[i];\n }\n for (int j = 0; j < index; j++) {\n cipher[cipher.length - 1 - index] = temp[j];\n }\n }", "private void transpose() {\n Utils.transpose(this._board);\n }", "public void flipOverY(){\n int len = tileChars.length;\r\n \r\n // swap columns\r\n for (int i = 0; i < len; i++)\r\n {\r\n for (int j = 0; j < len / 2; j++)\r\n {\r\n char temp = tileChars[i][j];\r\n tileChars[i][j] = tileChars[i][len - j - 1];\r\n tileChars[i][len - j - 1] = temp;\r\n }\r\n }\r\n \r\n boolean temp = this.matchFound[1];\r\n this.matchFound[1] = this.matchFound[3];\r\n this.matchFound[3] = temp;\r\n \r\n this.recalculateEdges(); //fix edges\r\n }", "public static void inverseTransform() {\r\n \tint start = BinaryStdIn.readInt();\r\n \tString str = BinaryStdIn.readString();;\r\n \tchar[] lastCol = str.toCharArray();\r\n \tint[] count = new int[256];\r\n \tfor (char c : lastCol) {\r\n \t\tcount[c]++;\r\n \t}\r\n \tfor (int i = 1; i < count.length; i++) {\r\n \t\tcount[i] += count[i - 1];\r\n \t}\r\n \tint[] next = new int[lastCol.length];\r\n \tchar[] firstCol = new char[lastCol.length];\r\n \tfor (int i = lastCol.length - 1; i >= 0; i--) {\r\n \t\tint index = --count[lastCol[i]];\r\n \t\tfirstCol[index] = lastCol[i];\r\n \t\tnext[index] = i;\r\n \t}\r\n \tint sum = 0;\r\n \twhile (sum < lastCol.length) {\r\n \t\tBinaryStdOut.write(firstCol[start]);\r\n \t\tstart = next[start];\r\n \t\tsum++;\r\n \t}\r\n \tBinaryStdOut.close();\r\n }", "private void swap(char[] chars, int i, int j) {\n\t\tchar ch = chars[i];\r\n\t\tchars[i] = chars[j];\r\n\t\tchars[j] = ch;\r\n\t}", "public static char demangle2(char char1, char char2) {\n switch (char1 << 16 | char2) {\n case 'A' << 16 | 'm': return '&';\n case 'A' << 16 | 't': return '@';\n case 'C' << 16 | 'l': return ':';\n case 'C' << 16 | 'm': return ',';\n case 'D' << 16 | 'q': return '\\\"';\n case 'D' << 16 | 't': return '.';\n case 'E' << 16 | 'q': return '=';\n case 'E' << 16 | 'x': return '!';\n case 'G' << 16 | 'r': return '>';\n case 'L' << 16 | 'B': return '[';\n case 'L' << 16 | 'C': return '{';\n case 'L' << 16 | 'P': return '(';\n case 'L' << 16 | 's': return '<';\n case 'M' << 16 | 'c': return '%';\n case 'M' << 16 | 'n': return '-';\n case 'N' << 16 | 'm': return '#';\n case 'P' << 16 | 'c': return '%';\n case 'P' << 16 | 'l': return '+';\n case 'Q' << 16 | 'u': return '?';\n case 'R' << 16 | 'B': return ']';\n case 'R' << 16 | 'C': return '}';\n case 'R' << 16 | 'P': return ')';\n case 'S' << 16 | 'C': return ';';\n case 'S' << 16 | 'l': return '/';\n case 'S' << 16 | 'q': return '\\\\';\n case 'S' << 16 | 't': return '*';\n case 'T' << 16 | 'l': return '~';\n case 'U' << 16 | 'p': return '^';\n case 'V' << 16 | 'B': return '|';\n }\n return (char) (-1);\n }", "private String swapOne(int a,int b,char[] word){\n char tmp=word[a];\n word[a]=word[b];\n word[b]=tmp;\n return new String(word);\n}", "public Character decodeCharacter(PushbackString input) {\n\t\tinput.mark();\n\t\tCharacter first = input.next();\n\t\tif (first == null || first != '\\\\') {\n\t\t\tinput.reset();\n\t\t\treturn null;\n\t\t}\n\n\t\tCharacter second = input.next();\n\t\tif (second == null) {\n\t\t\tinput.reset();\n\t\t\treturn null;\n\t\t}\n\n\t\t/*\n\t\t * From css 2.1 spec: http://www.w3.org/TR/CSS21/syndata.html#characters\n\t\t * \n\t\t * First, inside a string, a backslash followed by a newline is ignored\n\t\t * (i.e., the string is deemed not to contain either the backslash or\n\t\t * the newline).\n\t\t * \n\t\t * Second, it cancels the meaning of special CSS characters. Except\n\t\t * within CSS comments, any character (except a hexadecimal digit,\n\t\t * linefeed, carriage return, or form feed) can be escaped with a\n\t\t * backslash to remove its special meaning. For example, \"\\\"\" is a\n\t\t * string consisting of one double quote. Style sheet preprocessors must\n\t\t * not remove these backslashes from a style sheet since that would\n\t\t * change the style sheet's meaning.\n\t\t * \n\t\t * Third, backslash escapes allow authors to refer to characters they\n\t\t * cannot easily put in a document. In this case, the backslash is\n\t\t * followed by at most six hexadecimal digits (0..9A..F), which stand\n\t\t * for the ISO 10646 ([ISO10646]) character with that number, which must\n\t\t * not be zero. (It is undefined in CSS 2.1 what happens if a style\n\t\t * sheet does contain a character with Unicode codepoint zero.) If a\n\t\t * character in the range [0-9a-fA-F] follows the hexadecimal number,\n\t\t * the end of the number needs to be made clear. There are two ways to\n\t\t * do that:\n\t\t * \n\t\t * 1. with a space (or other white space character): \"\\26 B\" (\"&B\"). In\n\t\t * this case, user agents should treat a \"CR/LF\" pair (U+000D/U+000A) as\n\t\t * a single white space character.\n\t\t * \n\t\t * 2. by providing exactly 6 hexadecimal digits: \"\\000026B\" (\"&B\")\n\t\t * \n\t\t * In fact, these two methods may be combined. Only one white space\n\t\t * character is ignored after a hexadecimal escape. Note that this means\n\t\t * that a \"real\" space after the escape sequence must itself either be\n\t\t * escaped or doubled.\n\t\t * \n\t\t * If the number is outside the range allowed by Unicode (e.g.,\n\t\t * \"\\110000\" is above the maximum 10FFFF allowed in current Unicode),\n\t\t * the UA may replace the escape with the \"replacement character\"\n\t\t * (U+FFFD). If the character is to be displayed, the UA should show a\n\t\t * visible symbol, such as a \"missing character\" glyph (cf. 15.2, point\n\t\t * 5).\n\t\t */\n\n\t\tswitch (second) { // special whitespace cases. I assume they mean\n\t\t\t\t\t\t\t// for all of these to qualify as a \"new\n\t\t\t\t\t\t\t// line.\" Otherwise there is no specification\n\t\t\t\t\t\t\t// of what to do for \\f\n\t\tcase '\\r':\n\t\t\tif (input.peek('\\n'))\n\t\t\t\tinput.next();\n\t\t\t// fall through\n\t\tcase '\\n':\n\t\tcase '\\f':\n\t\t\t// bs follwed by new line replaced by nothing\n\t\tcase '\\u0000': // skip NUL for now too\n\t\t\treturn decodeCharacter(input);\n\t\t}\n\n\t\tif (!PushbackString.isHexDigit(second)) { // non hex digit\n\t\t\treturn second;\n\t\t}\n\n\t\t// Search for up to 6 hex digits following until a space\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(second);\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tCharacter c = input.next();\n\t\t\tif (c == null || Character.isWhitespace(c))\n\t\t\t\tbreak;\n\t\t\tif (PushbackString.isHexDigit(c))\n\t\t\t\tsb.append(c);\n\t\t\telse {\n\t\t\t\tinput.pushback(c);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\t// parse the hex digit and create a character\n\t\t\tint i = Integer.parseInt(sb.toString(), 16);\n\n\t\t\tif (Character.isValidCodePoint(i))\n\t\t\t\treturn (char) i;\n\t\t\treturn REPLACEMENT;\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"Received a NumberFormateException parsing a string verified to be hex\",\n\t\t\t\t\te);\n\t\t}\n\t}", "public String swap(String a, int i, int j)\n {\n char temp;\n char[] charArray = a.toCharArray();\n temp = charArray[i] ;\n charArray[i] = charArray[j];\n charArray[j] = temp;\n return String.valueOf(charArray);\n }", "public char[][] getMatrixForm( String aColor )\r\n{\r\n\tchar c = constructionCharacter; // for brevity\r\n\r\n\t// Fill in the actual big letter. line by line\t\r\n\tmatrix[0][0] = c; matrix[0][1] = c; matrix[0][2] = c; \r\n\tmatrix[1][0] = c; matrix[1][4] = c;\r\n\tmatrix[2][0] = c; matrix[2][4] = c;\r\n\tmatrix[3][0] = c; matrix[3][1] = c;\r\n\tmatrix[4][0] = c; matrix[4][4] = c;\r\n\tmatrix[5][0] = c; matrix[5][4] = c;\r\n\tmatrix[6][0] = c; matrix[6][1] = c; matrix[6][2] = c; \r\n\t\r\n\t// Superimpose the color characters across the middle\t\r\n\tmatrix[3][0] = '-'; // required to precede the color characters as in \"-red\"\r\n\tfor( int i = 1; i < BigChar.MATRIX_WIDTH; ++i ) // go all the way across \r\n\t\tif( i <= aColor.length() ) // there is a color character to pick up\t\r\n\t\t\tmatrix[ 3 ][ i ] = aColor.charAt( i -1 ); // fill in the next color character\r\n\t\telse\r\n\t\t\tmatrix[ 3 ][ i ] = ' '; // pad on right with blanks\r\n\t\r\n\treturn matrix; \r\n}", "public String replaceOneCharacter() {\n int colNumber = idx%col;\n int rowNumber = idx/col;\n hidden[rowNumber][colNumber] = original[rowNumber][colNumber];\n idx++;\n return(getImage());\n }", "public String reverse(String s) {\n String ret = \"\";\n for(int i = 0; i < s.length; i+= 1) {\n ret = s.charAt(i) + ret; //this will go in reverse as the next character will appear before the previously placed ret character.\n }\n return ret;\n}", "public void flipHorizontal() {\n\t\t\tfor(int row = 0; row < TILE_DIM; row++) {\n\t\t\t\tString tmp = \"\";\n\t\t\t\tfor(int col = TILE_DIM-1; col >= 0; col--) {\n\t\t\t\t\ttmp += this.data[row].charAt(col);\n\t\t\t\t}\n\t\t\t\tthis.data[row] = tmp;\n\t\t\t}\n\t\t\tcomputeHashes();\n\t\t}", "private static void swap(char[] a, int i, int j) {\r\n\r\n\t\tchar c;\r\n\t\tc = a[i];\r\n\t\ta[i] = a[j];\r\n\t\ta[j] = c;\r\n\t}", "public static void inverseTransform() {\n int first = BinaryStdIn.readInt();\n String st = BinaryStdIn.readString();\n char[] t1 = st.toCharArray();\n int length = t1.length;\n\n int[] count = new int[R + 1];\n int[] next = new int[length];\n\n for (int i = 0; i < length; i++)\n count[t1[i] + 1]++;\n for (int r = 0; r < R; r++)\n count[r + 1] += count[r];\n for (int i = 0; i < length; i++)\n next[count[t1[i]]++] = i;\n\n\n for (int i = 0; i < length; i++) {\n first = next[first];\n BinaryStdOut.write(t1[first]);\n\n }\n BinaryStdOut.close();\n }", "public static void transpose(String chord, int ammount) {\n if (chord.contains(\"/\")) {\n int chordSeparatorIdx = chord.indexOf(\"/\");\n String chord1 = chord.substring(0, chordSeparatorIdx);\n System.out.println(\"chord1 \" + chord1);\n String chord2 = chord.substring(chordSeparatorIdx + 1);\n System.out.println(\"chord2 \" + chord2);\n } else {\n // by default we are using major scale\n String[] scaleArray = ((chord.contains(\"b\")) ? flatArray : majorArray);\n ArrayList<String> scale = new ArrayList<String>(Arrays.asList(scaleArray));\n System.out.println(\"Used scale \" + scale);\n String transposedKey = null;\n for (String scaleKey : scale) {\n if (chord.equalsIgnoreCase(scaleKey)) {\n int idx = scale.indexOf(scaleKey);\n transposedKey = scale.get(idx + ammount);\n break;\n }\n }\n System.out.println(\"transposed key is \" + transposedKey);\n }\n\n }", "public char[][] toMatrix() {\n\t\tint tmp1 = this.player1_moves;\n\t\tint tmp2 = this.player2_moves;\n\n\t\tchar[][] matrix = new char[3][3];\n\t\tfor (int n = 0; n < 9; n++) {\n\t\t\tint i = n / 3;\n\t\t\tint j = n % 3;\n\t\t\tif ((tmp1 & 1) == 1)\n\t\t\t\tmatrix[i][j] = 'X';\n\t\t\telse if ((tmp2 & 1) == 1)\n\t\t\t\tmatrix[i][j] = 'O';\n\t\t\ttmp1 >>= 1;\n\t\t\ttmp2 >>= 1;\n\t\t}\n\n\t\treturn matrix;\n\t}", "private ArrayList<String> convertChar() {\r\n \tArrayList<String> patterns = new ArrayList<String>();\r\n \tfor (int i = 0; i < this.patterns.size(); i++) {\r\n \t\tString s = \"\";\r\n \t\tfor (int j = 0; j < this.patterns.get(i).length; j++) {\r\n \t\t\ts += this.patterns.get(i)[j];\r\n \t\t}\r\n \t\tpatterns.add(s);\r\n \t}\r\n \treturn patterns;\r\n }", "public void reverseString(char[] s) {\n for(int i = 0; i < s.length/2; i++){\n char temp = s[i];\n s[i] = s[s.length-(i+1)];\n s[s.length-(i+1)] = temp;\n \n }\n \n \n }", "int main()\n{\n char s[10000]; \n scanf(\"%s\",s); \n int c; char t[1000][1000]; \n scanf(\"%d\",&c); \n int i,j=0,k=0; \n for(i=0;i<strlen(s); i+=c)\n {\n for(j=0;j<c;j++)\n {\n if(k%2==0)\n {\n if(i+j < strlen(s) )\n {t[k][j]=s[i+j];} \n else\n {t[k][j]='X';}\n }\n else\n {\n if(i+j < strlen(s))\n {\n t[k][c-j-1]=s[i+j]; \n } else\n {\n t[k][c-j-1]='X'; \n }\n } \n }\n k++;\n } \n for(i=0;i<c;i++)\n {\n for(j=0;j<k;j++)\n {\n printf(\"%c\",t[j][i]); \n }\n }\n}", "static void reverse(StringBuffer str)\n\t {\n\t\t Stack<Character> s = new Stack<Character>();\n\t\t int len = str.length();\n\t\t for(int i= 0; i<len ;i ++)\n\t\t {\n\t\t\t s.push(str.charAt(i));\n\t\t }\n\t\t \n\t\t //pop the string and print it\n\t\t for(int i= 0; i<len ;i ++)\n\t\t {\n\t\t\t System.out.print(s.pop());\n\t\t }\n\t }", "public static String reverseComplementSequence(String sequence) {\n\t\tStringBuilder buffer = new StringBuilder(sequence);\n\t\tbuffer.reverse();\n\t\tfor (int i = 0; i < buffer.length(); ++i) {\n\t\t\tswitch (buffer.charAt(i)) {\n\t\t\tcase 'A':\n\t\t\t\tbuffer.setCharAt(i, 'T');\n\t\t\t\tbreak;\n\t\t\tcase 'C':\n\t\t\t\tbuffer.setCharAt(i, 'G');\n\t\t\t\tbreak;\n\t\t\tcase 'G':\n\t\t\t\tbuffer.setCharAt(i, 'C');\n\t\t\t\tbreak;\n\t\t\tcase 'T':\n\t\t\t\tbuffer.setCharAt(i, 'A');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn buffer.toString();\n\t}", "private String shiftingBack(String s) {\n int diff = s.charAt(0) - 'a';\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i ++) {\n if (s.charAt(i) - 'a' >= diff) {\n char c = (char) (s.charAt(i) - diff);\n sb.append(c);\n } else {\n char c = (char) (s.charAt(i) - diff + 26);\n sb.append(c);\n }\n }\n return new String(sb);\n }", "public static char complement(char c)\n\t{\n\tswitch(c)\n\t\t{\n case 'A': return 'T';\n case 'T': case 'U': return 'A';\n case 'G': return 'C';\n case 'C': return 'G';\n\n case 'a': return 't';\n case 't': case 'u': return 'a';\n case 'g': return 'c';\n case 'c': return 'g';\n\n case 'w': return 'w';\n case 'W': return 'W';\n\n case 's': return 's';\n case 'S': return 'S';\n\n case 'y': return 'r';\n case 'Y': return 'R';\n\n case 'r': return 'y';\n case 'R': return 'Y';\n\n case 'k': return 'm';\n case 'K': return 'M';\n\n case 'm': return 'k';\n case 'M': return 'K';\n\n case 'b': return 'v';\n case 'd': return 'h';\n case 'h': return 'd';\n case 'v': return 'b';\n\n\n case 'B': return 'V';\n case 'D': return 'H';\n case 'H': return 'D';\n case 'V': return 'B';\n\n case 'N': return 'N';\n case 'n': return 'n';\n\t\tdefault: return 'N';\n\t\t}\n\t}", "private static void swap(char[] arr, int i, int j) {\r\n\t\tchar c = arr[i];\r\n\t\tarr[i] = arr[j];\r\n\t\tarr[j] = c;\r\n\t}", "private char convert(char Char) {\n int num = (int) Char;\n\n num = (num - '0' + 7) % 10; // Subtracts '0' to get the integer value and the\n // rest is as instructed\n Char = (char) (num + '0'); // Translates it back to ASCII value by adding '0'\n\n return Char;\n\n }", "public String swap(String a, int i, int j)\n {\n char temp;\n char[] charArray = a.toCharArray();\n temp = charArray[i];\n charArray[i] = charArray[j];\n charArray[j] = temp;\n return String.valueOf(charArray);\n }", "private static String remix(String str, int[] arr){\n StringBuilder sb = new StringBuilder();\n char[] charArray = new char[arr.length];\n for (int i=0; i< arr.length;i++){\n charArray[i] = str.charAt(arr[i]);\n sb.append(charArray[i]);\n }\n// String returnString = charArray.toString();\n// return returnString;\n return sb.toString();\n\n }", "@Override\r\n\tpublic String desencriptar(String string) {\n\r\n\t\tString palabra = string;\r\n\t\tString[] parts = string.split(\",\");\r\n String newName=\"\";\r\n for (int i = 0; i < parts.length; i++) {\r\n // instrucción switch con tipo de datos int\r\n switch (parts[i]) \r\n {\r\n case \"1\" : newName+=\"a\";\r\n break;\r\n case \"2\" : newName+=\"b\";\r\n break;\r\n case \"3\" : newName+=\"c\";\r\n break;\r\n case \"4\" : newName+=\"d\";\r\n break;\r\n case \"5\" : newName+=\"e\";\r\n break;\r\n case \"6\" : newName+=\"f\";\r\n break;\r\n case \"7\" : newName+=\"g\";\r\n break;\r\n case \"8\" : newName+=\"h\";\r\n break;\r\n case \"9\" : newName+=\"i\";\r\n break;\r\n case \"10\" : newName+=\"j\";\r\n break;\r\n case \"11\" : newName+=\"k\";\r\n break;\r\n case \"12\" : newName+=\"l\";\r\n break;\r\n case \"13\" : newName+=\"m\";\r\n break;\r\n case \"14\" : newName+=\"n\";\r\n break;\r\n case \"15\" : newName+=\"ñ\";\r\n break;\r\n case \"16\" : newName+=\"o\";\r\n break;\r\n case \"17\" : newName+=\"p\";\r\n break;\r\n case \"18\" : newName+=\"q\";\r\n break;\r\n case \"19\" : newName+=\"r\";\r\n break;\r\n case \"20\" : newName+=\"s\";\r\n break;\r\n case \"21\" : newName+=\"t\";\r\n break;\r\n case \"22\" : newName+=\"u\";\r\n break;\r\n case \"23\" : newName+=\"v\";\r\n break;\r\n case \"24\" : newName+=\"w\";\r\n break;\r\n case \"25\" : newName+=\"x\";\r\n break;\r\n case \"26\" : newName+=\"y\";\r\n break;\r\n case \"27\" : newName+=\"z\";\r\n break;\r\n case \"0\" : newName+=\" \";\r\n break;\r\n case \"28\" : newName+=\" \";\r\n break;\r\n \r\n \r\n }\r\n \r\n }\r\n \r\n return newName ;\r\n\t}", "public static void decode() {\r\n int[] index = new int[R + 1];\r\n char[] charAtIndex = new char[R + 1];\r\n for (int i = 0; i < R + 1; i++) { \r\n index[i] = i; \r\n charAtIndex[i] = (char) i;\r\n }\r\n while (!BinaryStdIn.isEmpty()) {\r\n int c = BinaryStdIn.readChar();\r\n char t = charAtIndex[c];\r\n BinaryStdOut.write(t);\r\n for (int i = c - 1; i >= 0; i--) {\r\n char temp = charAtIndex[i];\r\n int tempIndex = ++index[temp];\r\n charAtIndex[tempIndex] = temp;\r\n }\r\n charAtIndex[0] = t;\r\n index[t] = 0;\r\n }\r\n BinaryStdOut.close(); \r\n }", "private static String swap(String str, int i, int j) {\n \n\t\tchar temp;\n char[] charArray = str.toCharArray();\n \n temp = charArray[i];\n charArray[i] = charArray[j];\n charArray[j] = temp;\n \n return String.valueOf(charArray);\n }", "protected static char[] expand(char[] stack) {\n char[] newStack = new char[stack.length * 2];\n System.arraycopy(stack, 0, newStack, 0, stack.length);\n return newStack;\n }", "private char translateChar(char[] mapping, char character)\n { if (character==' ') return character;\n\n int lower = lowerKeyCodeMapping.indexOf(character);\n int upper = upperKeyCodeMapping.indexOf(character);\n\n int mapValue = lower;\n if (lower<0) mapValue = upper;\n if (mapValue<0) return '\\0';\n return mapping[mapValue];\n }", "String view(Stack<Character> flip){\r\n String output = \"\";\r\n while(!flip.empty())\r\n {\r\n if(flip.peek() =='|'){\r\n flip.pop();\r\n }\r\n else{\r\n char s = flip.pop();\r\n output += s;\r\n }\r\n }\r\n System.out.println(output);\r\n return output;\r\n }", "public static void transform() {\n String input = BinaryStdIn.readString();\n CircularSuffixArray csa = new CircularSuffixArray(input);\n int first = 0;\n for (int i = 0; i < csa.length(); i++) {\n if (csa.index(i) == 0) {\n first = i;\n break;\n }\n }\n BinaryStdOut.write(first);\n\n for (int i = 0; i < csa.length(); i++) {\n if (csa.index(i) == 0) {\n BinaryStdOut.write(input.charAt(csa.length() - 1));\n }\n else BinaryStdOut.write(input.charAt(csa.index(i) - 1));\n }\n BinaryStdOut.close();\n }", "char permute(char p) {\n return _alphabet.toChar(permute(_alphabet.toInt(p)));\n }", "public void reverseString(char[] s) {\n for(int i = 0, j = s.length - 1; i < s.length / 2; i++,j--){\n //temporary holder\n char temp = s[j];\n //swap characters\n s[j] = s[i];\n s[i] = temp;\n }\n }", "private static char recompose(RecomposeArgs paramRecomposeArgs, int paramInt, UnicodeSet paramUnicodeSet)\n/* */ {\n/* 1315 */ int i3 = 0;int i4 = 0;\n/* */ \n/* */ \n/* */ \n/* 1319 */ int[] arrayOfInt = new int[2];\n/* 1320 */ int i7 = -1;\n/* 1321 */ int n = 0;\n/* 1322 */ int i6 = 0;\n/* 1323 */ int i5 = 0;\n/* */ \n/* 1325 */ NextCombiningArgs localNextCombiningArgs = new NextCombiningArgs(null);\n/* 1326 */ localNextCombiningArgs.source = paramRecomposeArgs.source;\n/* */ \n/* 1328 */ localNextCombiningArgs.cc = '\\000';\n/* 1329 */ localNextCombiningArgs.c2 = '\\000';\n/* */ for (;;)\n/* */ {\n/* 1332 */ localNextCombiningArgs.start = paramRecomposeArgs.start;\n/* 1333 */ int m = getNextCombining(localNextCombiningArgs, paramRecomposeArgs.limit, paramUnicodeSet);\n/* 1334 */ int i1 = localNextCombiningArgs.combiningIndex;\n/* 1335 */ paramRecomposeArgs.start = localNextCombiningArgs.start;\n/* */ \n/* 1337 */ if (((m & 0x80) != 0) && (i7 != -1)) { int i;\n/* 1338 */ int j; int k; if ((i1 & 0x8000) != 0)\n/* */ {\n/* */ \n/* */ \n/* */ \n/* 1343 */ if (((paramInt & 0x100) != 0) || (i5 == 0)) {\n/* 1344 */ i = -1;\n/* 1345 */ m = 0;\n/* 1346 */ localNextCombiningArgs.c2 = paramRecomposeArgs.source[i7];\n/* 1347 */ if (i1 == 65522)\n/* */ {\n/* */ \n/* */ \n/* 1351 */ localNextCombiningArgs.c2 = ((char)(localNextCombiningArgs.c2 - 'ᄀ'));\n/* 1352 */ if (localNextCombiningArgs.c2 < '\\023') {\n/* 1353 */ i = paramRecomposeArgs.start - 1;\n/* 1354 */ localNextCombiningArgs.c = ((char)(44032 + (localNextCombiningArgs.c2 * '\\025' + (localNextCombiningArgs.c - 'ᅡ')) * 28));\n/* */ \n/* 1356 */ if ((paramRecomposeArgs.start != paramRecomposeArgs.limit) && ((localNextCombiningArgs.c2 = (char)(paramRecomposeArgs.source[paramRecomposeArgs.start] - 'ᆧ')) < '\\034'))\n/* */ {\n/* */ \n/* 1359 */ paramRecomposeArgs.start += 1; NextCombiningArgs \n/* 1360 */ tmp261_259 = localNextCombiningArgs;tmp261_259.c = ((char)(tmp261_259.c + localNextCombiningArgs.c2));\n/* */ }\n/* */ else {\n/* 1363 */ m = 64;\n/* */ }\n/* 1365 */ if (!nx_contains(paramUnicodeSet, localNextCombiningArgs.c)) {\n/* 1366 */ paramRecomposeArgs.source[i7] = localNextCombiningArgs.c;\n/* */ }\n/* */ else {\n/* 1369 */ if (!isHangulWithoutJamoT(localNextCombiningArgs.c)) {\n/* 1370 */ paramRecomposeArgs.start -= 1;\n/* */ }\n/* */ \n/* 1373 */ i = paramRecomposeArgs.start;\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1388 */ else if (isHangulWithoutJamoT(localNextCombiningArgs.c2)) {\n/* 1389 */ NextCombiningArgs tmp351_349 = localNextCombiningArgs;tmp351_349.c2 = ((char)(tmp351_349.c2 + (localNextCombiningArgs.c - 'ᆧ')));\n/* 1390 */ if (!nx_contains(paramUnicodeSet, localNextCombiningArgs.c2)) {\n/* 1391 */ i = paramRecomposeArgs.start - 1;\n/* 1392 */ paramRecomposeArgs.source[i7] = localNextCombiningArgs.c2;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1397 */ if (i != -1)\n/* */ {\n/* 1399 */ j = i;\n/* 1400 */ k = paramRecomposeArgs.start;\n/* 1401 */ while (k < paramRecomposeArgs.limit) {\n/* 1402 */ paramRecomposeArgs.source[(j++)] = paramRecomposeArgs.source[(k++)];\n/* */ }\n/* 1404 */ paramRecomposeArgs.start = i;\n/* 1405 */ paramRecomposeArgs.limit = j;\n/* */ }\n/* */ \n/* 1408 */ localNextCombiningArgs.c2 = '\\000';\n/* */ \n/* 1410 */ if (m != 0)\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1417 */ if (paramRecomposeArgs.start == paramRecomposeArgs.limit) {\n/* 1418 */ return (char)i5;\n/* */ }\n/* */ \n/* */ \n/* 1422 */ n = 65520;\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1438 */ else if (((n & 0x8000) == 0) && ((paramInt & 0x100) != 0 ? (i5 == localNextCombiningArgs.cc) || (i5 != 0) : (i5 < localNextCombiningArgs.cc) || (i5 == 0)))\n/* */ {\n/* */ int i2;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1446 */ if (0 != (i2 = combine(combiningTable, n, i1, arrayOfInt)))\n/* */ {\n/* */ \n/* 1449 */ if (!nx_contains(paramUnicodeSet, (char)i3, (char)i4))\n/* */ {\n/* 1451 */ i3 = arrayOfInt[0];\n/* 1452 */ i4 = arrayOfInt[1];\n/* */ \n/* */ \n/* */ \n/* 1456 */ i = localNextCombiningArgs.c2 == 0 ? paramRecomposeArgs.start - 1 : paramRecomposeArgs.start - 2;\n/* */ \n/* */ \n/* 1459 */ paramRecomposeArgs.source[i7] = ((char)i3);\n/* 1460 */ if (i6 != 0) {\n/* 1461 */ if (i4 != 0)\n/* */ {\n/* 1463 */ paramRecomposeArgs.source[(i7 + 1)] = ((char)i4);\n/* */ }\n/* */ else\n/* */ {\n/* 1467 */ i6 = 0;\n/* 1468 */ j = i7 + 1;\n/* 1469 */ k = j + 1;\n/* 1470 */ while (k < i) {\n/* 1471 */ paramRecomposeArgs.source[(j++)] = paramRecomposeArgs.source[(k++)];\n/* */ }\n/* 1473 */ i--;\n/* */ }\n/* 1475 */ } else if (i4 != 0) {\n/* 1476 */ i6 = 1;\n/* 1477 */ paramRecomposeArgs.source[(i7 + 1)] = ((char)i4);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1483 */ if (i < paramRecomposeArgs.start) {\n/* 1484 */ j = i;\n/* 1485 */ k = paramRecomposeArgs.start;\n/* 1486 */ while (k < paramRecomposeArgs.limit) {\n/* 1487 */ paramRecomposeArgs.source[(j++)] = paramRecomposeArgs.source[(k++)];\n/* */ }\n/* 1489 */ paramRecomposeArgs.start = i;\n/* 1490 */ paramRecomposeArgs.limit = j;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1496 */ if (paramRecomposeArgs.start == paramRecomposeArgs.limit) {\n/* 1497 */ return (char)i5;\n/* */ }\n/* */ \n/* */ \n/* 1501 */ if (i2 > 1) {\n/* 1502 */ n = getCombiningIndexFromStarter((char)i3, (char)i4); continue;\n/* */ }\n/* */ \n/* 1505 */ i7 = -1;\n/* */ \n/* */ \n/* */ \n/* 1509 */ continue;\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* 1514 */ i5 = localNextCombiningArgs.cc;\n/* 1515 */ if (paramRecomposeArgs.start == paramRecomposeArgs.limit) {\n/* 1516 */ return (char)i5;\n/* */ }\n/* */ \n/* */ \n/* 1520 */ if (localNextCombiningArgs.cc == 0)\n/* */ {\n/* 1522 */ if ((m & 0x40) != 0)\n/* */ {\n/* 1524 */ if (localNextCombiningArgs.c2 == 0) {\n/* 1525 */ i6 = 0;\n/* 1526 */ i7 = paramRecomposeArgs.start - 1;\n/* */ } else {\n/* 1528 */ i6 = 0;\n/* 1529 */ i7 = paramRecomposeArgs.start - 2;\n/* */ }\n/* 1531 */ n = i1;\n/* */ }\n/* */ else {\n/* 1534 */ i7 = -1;\n/* */ }\n/* 1536 */ } else if ((paramInt & 0x2000) != 0)\n/* */ {\n/* 1538 */ i7 = -1;\n/* */ }\n/* */ }\n/* */ }", "private void reverse(StringBuffer s)\n {\n s.reverse();\n String k = s.toString();\n String tokens[] = k.split(\" \");\n for(int i=0;i<tokens.length;i++)\n {\n StringBuffer temp = new StringBuffer(tokens[i]);\n System.out.print(temp.reverse()+\" \");\n }\n //Normal method\n /*String[] words = s.split(\" \");\n int i = words.length-1;\n while(i>=0)\n {\n System.out.print(words[i]+\" \");\n i--;\n }*/\n }", "public String alternateWordSwap() {\n\t\tString output=\"\";\r\n\t\tString arr[]=this.str.split(\" \");\r\n\t\tfor(int i=0,j=1;i<arr.length;i+=2,j+=2){\r\n\t\t\tString temp=arr[i];\r\n\t\t\tarr[i]=arr[j];\r\n\t\t\tarr[j]=temp;\r\n\t\t}\r\n\t\t\r\n\t\tfor(String s:arr){\r\n\t\t\toutput+=s+\" \";\r\n\t\t}\r\n\t\treturn output.trim();\r\n\t}", "@Override\n\tchar toChar() {\n\t\treturn 'R';\n\t}", "public String swap(String a, int i, int j) {\r\n char temp;\r\n char[] charArray = a.toCharArray();\r\n temp = charArray[i];\r\n charArray[i] = charArray[j];\r\n charArray[j] = temp;\r\n return String.valueOf(charArray);\r\n }", "private static char [] yy_unpack_cmap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 1742) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "public static void main(String[] args) {\nString given=\"hello im jaiprashanth hw are you\";\nchar ch[]=given.toCharArray();\n\nfor(int i=0;i<ch.length;i++) {\n\tif(ch[i]==' ') {\n\tch[i+1]=(char)(ch[i+1]-32);\n\t}\nSystem.out.println(ch);\n}\n}", "public String decompress() {\r\n \tString decompressed = \"\";\r\n \tString cursor = \"\";\r\n \tfor (int i = 0; i < compressedText.length(); i++) {\r\n \t\tcursor += compressedText.charAt(i);\r\n \t\tif (codeToChar.containsKey(cursor)) {\r\n \t\t\tdecompressed += codeToChar.get(cursor);\r\n \t\t\tcursor = \"\";\r\n \t\t}\r\n \t}\r\n return decompressed;\r\n }", "static String leftrotate(String s) {\n\n System.out.print(\" left rotate \" + s + \" \");\n char arr[] = s.toCharArray();\n char newarr[]= new char[arr.length];\n for (int i = 0; i < arr.length - 1; i++) {\n newarr[i + 1] = arr[i];\n }\n newarr[0]=s.charAt(s.length()-1);\n\n s = \"\";\n for (int i = 0; i < arr.length; i++)\n s += newarr[i];\n System.out.println(\"Return \" + s);\n return s;\n\n }", "private static void reverseIntraStringCharacterGroups(StringBuffer buf,\n int groupLength)\n {\n if (buf == null || groupLength <= 0 || groupLength > buf.length())\n {\n return;\n }\n char[][] reverseBuffer =\n new char[(int) Math.ceil(buf.length() / (groupLength * 1.0f))][];\n\n for (int currentPosition = 0, currentGroup = 0, positionInGroup = 0;\n currentPosition < buf.length(); currentPosition++)\n {\n if (positionInGroup == 0)\n {\n reverseBuffer[currentGroup] =\n new char[Math.min(groupLength, buf.length() - currentPosition)];\n }\n reverseBuffer[currentGroup][positionInGroup] =\n buf.charAt(currentPosition);\n positionInGroup++;\n if (positionInGroup == groupLength)\n {\n positionInGroup = 0;\n currentGroup++;\n }\n }\n\n // clear the buffer so that the characters can be added back in.\n buf.setLength(0);\n for (int currentGroup = 0; currentGroup < reverseBuffer.length;\n currentGroup++)\n {\n for (int currentPosition = reverseBuffer[currentGroup].length - 1;\n currentPosition >= 0; currentPosition--)\n {\n buf.append(reverseBuffer[currentGroup][currentPosition]);\n }\n }\n }", "public void permute( ){\n\t\tif( out.length() == in.length() ){\n\t\t\tSystem.out.println( out );\n\t\t\treturn;\n\t\t}\n\t\t//for each character in the input\n\t\tfor( int i = 0; i < in.length(); ++i ){\n\t\t\t//if already marked then skip\n\t\t\tif( used[i] ) \n\t\t\t\tcontinue;\n\t\t\t//otherwise put the character in current position of permuted string\n\t\t\tout.append( in.charAt(i) );\n\t\t\t//mark the position as visited\n\t\t\tused[i] = true;\n\t\t\t//permute remaining characters\n\t\t\tpermute();\n\t\t\t//unmark the position\n\t\t\tused[i] = false;\n\t\t\t//clear the permuted string to start over again\n\t\t\tout.setLength( out.length() - 1 );\n\t\t}\n\t}", "int invert(char c) {\n return _alphabet.toChar(invert(_alphabet.toInt(c)));\n }", "public void complement() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (char c : seq) {\n newSeq.add(complement(c));\n }\n seq = newSeq;\n }", "private static String[] rotateGrid(String[] grid) {\n\t\tString[] tmp = new String[grid.length];\n\t\tfor(int col = 0; col < grid.length; col++) {\n\t\t\ttmp[col] = \"\";\n\t\t\tfor(int row = grid.length-1; row >= 0; row--) {\n\t\t\t\ttmp[col] += grid[row].charAt(col);\n\t\t\t}\n\t\t}\n\t\treturn tmp;\n\t}", "public String swap(String a, int i, int j)\n\t{\n\t\tchar temp;\n\t\tchar[] charArray = a.toCharArray();\n\t\ttemp = charArray[i];\n\t\tcharArray[i] = charArray[j];\n\t\tcharArray[j] = temp;\n\t\treturn String.valueOf(charArray);\n\t}", "public void reverse() {\n\t\t\n\t\tif(isEmpty()==false){\n\t\t\tDoubleNode left=head, right=tail;\n\t\t\tchar temp;\n\t\t\twhile(left!=right&&right!=left.getPrev()){\n\t\t\t\ttemp=left.getC();\n\t\t\t\tleft.setC(right.getC());\n\t\t\t\tright.setC(temp);\n\t\t\t\tleft=left.getNext();\n\t\t\t\tright=right.getPrev();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private static void swap(char[] arr,int i,int j){\n char temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }", "public static char[][] rotate(char[][] array) {\n\n char[][] rotateArray = array;\n char[][] tempArray = new char[8][8];\n\n for (int i = 0; i < 8; i++ ){\n\n for (int j = 0; j < 8; j++){\n\n tempArray[i][j] = rotateArray[7-j][i];\n }\n }\n return tempArray;\n }", "private Matriks Transpose(){\r\n\t\tMatriks Mhasil = new Matriks(KolEff,BrsEff);\r\n\t\tfor(int i=0;i<BrsEff;i++){\r\n\t\t\tfor(int j=0;j<KolEff;j++){\r\n\t\t\t\tMhasil.Elmt[j][i] = this.Elmt[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Mhasil;\r\n\t}", "public static String headsAndTails(Stack<Integer> binary) {\n String sBackwards = \"\";//string that stores the initial conversion \n String s = \"\";//string that stores the conversion in the correct order\n \n //goes through the stack and adds an H or T to sBackwords\n while(!binary.isEmpty()) {\n for(int i = 0; i < 9; i++) {\n if(binary.pop() == 0) {\n sBackwards += \"H \";\n } else {\n sBackwards += \"T \";\n }\n }\n }\n \n //puts the string in the correct order\n for(int i = sBackwards.length() - 1; i >= 0; i--) {\n s += sBackwards.charAt(i);\n }\n return s;\n }", "public static void transform()\r\n {\r\n \t\r\n \tString in = BinaryStdIn.readString();\r\n \tint length = in.length();\r\n \t\t\t\r\n \tchar[] characters = new char[length];\r\n \tcharacters[0] = in.charAt(length-1);\r\n \tfor (int i = 1; i < length ; i++)\r\n \t\tcharacters[i] = in.charAt(i-1);\r\n \t\r\n \tCircularSuffixArray sortedSuffixes = new CircularSuffixArray(in);\r\n \t\r\n \tStringBuilder out = new StringBuilder();\r\n \tint first = -1;\r\n \tfor (int i = 0; i < length; i++)\r\n \t{\r\n \t\tint index = sortedSuffixes.index(i);\r\n \t\tout = out.append(characters[index]);\r\n \t\tif (index == 0)\r\n \t\t\tfirst = i;\r\n \t}\r\n \t\r\n \tBinaryStdOut.write(first);\r\n \tBinaryStdOut.write(out.toString());\r\n \tBinaryStdOut.close();\r\n\r\n }", "private String decode(String puzzle) {\n\t\tString solution = \"\";\n\t\tfor (int i = 0; i < puzzle.length(); i++) {\n\t\t\tif (i % 2 == 0) {\n\t\t\t\tif (puzzle.charAt(i) == 'Z') {\n\t\t\t\t\tsolution += 'A';\n\t\t\t\t} else {\n\t\t\t\t\tsolution += (char) ((int) puzzle.charAt(i) + 1);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (puzzle.charAt(i) == 'A') {\n\t\t\t\t\tsolution += 'Z';\n\t\t\t\t} else {\n\t\t\t\t\tsolution += (char) ((int) puzzle.charAt(i) - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn solution;\n\t}", "public static void main(String[] args) {\n\t\r\n\t\r\n\tString str=\"Welcome\";\r\n\t\r\n\tchar[] arr=str.toCharArray();\r\n\tList<Character> l=new LinkedList<>();\r\n\tfor (Character c1 : arr) {\r\n\t\tl.add(c1);\r\n\t}\r\n\tCollections.reverse(l);\r\n\tListIterator<Character> i=l.listIterator();\r\n\twhile (i.hasNext()) {\r\n\t\tSystem.out.print(i.next());\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\t\r\n}", "public String reverse()\n {\n Stack<String> words = new Stack<String>() ;\n char[] r = s.toCharArray() ;\n StringBuffer sb = new StringBuffer() ; \n String[] w = s.split(\" \");\n \n for(String c : w)\n {\n words.push(c) ;\n }\n while(!words.isEmpty())\n {\n \n \tsb.append(words.pop()) ;\n \n sb.append(\" \") ;\n }\n return sb.substring(0, s.length()) .toString();\n }", "public void invertirFrase(Cadena C1, String frase) {\r\n\r\n char aux;\r\n String resp = \"\";\r\n\r\n for (int i = C1.getFrase().length() - 1; i >= 0; i--) {\r\n\r\n aux = C1.getFrase().charAt(i);\r\n resp = resp + aux;\r\n\r\n }\r\n System.out.println(resp);\r\n\r\n }", "void circulardecode()\n{\nfor(i=0;i<s.length();i++)\n{\nc=s.charAt(i);\nk=(int)c;\nif(k==90)\nk1=65;\nelse\nif(k==122)\nk1=97;\nelse\nk1=k+1;\nc1=caseconverter(k,k1);\nSystem.out.print(c1);\n}\n}", "protected char map(char c) {\r\n int index = findFromIndex(c);\r\n if(index < 0) return c;\r\n return toChars[index];\r\n }", "public String compress() {\r\n \tfor (int i = 0; i < text.length(); i++)\r\n \t\tcompressedText += charToCode.get(text.charAt(i));\r\n return compressedText;\r\n }", "char decipher(int charToDeCipher);", "private static String scramble(final String byte_, final boolean reverse)\n\t{\n\t\tStringBuilder builder = new StringBuilder(byte_);\n\t\tfor( int i = 0; i < byte_.length(); i ++)\n\t\t\tif(byte_.charAt(i) == ( !reverse ? BIT_ONE : BIT_ZERO))\n\t\t\t{\n\t\t\t\tbuilder.setCharAt(i, ( !reverse ? BIT_ZERO : BIT_ONE));\n\t\t\t\treturn builder.toString();\n\t\t\t}\n\t\treturn null;\n\t}", "public BufferedImage transpose(String src) {\n return this.transpose(ImportExportImage.importImage(src));\n }", "public String decompile() {\r\n\t\t\r\n\t\treturn \"\\\"\" + symbol + \"\\\"\";\r\n\t}", "public static void decode () {\n // read the input\n int firstThing = BinaryStdIn.readInt();\n s = BinaryStdIn.readString();\n char[] t = s.toCharArray();\n char[] firstColumn = new char[t.length];\n int [] next = new int[t.length];\n \n // copy array and sort\n for (int i = 0; i < t.length; i++) {\n firstColumn[i] = t[i];\n }\n Arrays.sort(firstColumn);\n \n // decode\n int N = t.length;\n int [] count = new int[256];\n \n // counts frequency of each letter\n for (int i = 0; i < N; i++) {\n count[t[i]]++;\n }\n \n int m = 0, j = 0;\n \n // fills the next[] array with appropriate values\n while (m < N) {\n int _count = count[firstColumn[m]];\n while (_count > 0) {\n if (t[j] == firstColumn[m]) {\n next[m++] = j;\n _count--;\n }\n j++;\n }\n j = 0;\n }\n \n // decode the String\n int _next = next.length;\n int _i = firstThing;\n for (int i = 0; i < _next; i++) {\n _i = next[_i];\n System.out.print(t[_i]);\n } \n System.out.println();\n }", "static String stringReverser( String inputString) {\n\t\t// Create an char array of given String \n char[] ch = inputString.toCharArray();\n // Initialize outputString; \n String outputString = \"\";\n // Go through the characters within the given input string, from last to first, and concatinate it to the output String\n for (int i = ch.length -1; (i >= 0) ; i--) {\n \toutputString += ch[i]; \n }\n\t\treturn outputString;\n\t}", "public static char[] flipBoard(char[] b) {\n\t\tfor (int i = 0; i < b.length; i++) {\n\t\t\tif (b[i] == 'W') {\n\t\t\t\tb[i] = 'B';\n\t\t\t} else if (b[i] == 'B') {\n\t\t\t\tb[i] = 'W';\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}", "public static void transform() {\n String st = BinaryStdIn.readString();\n CircularSuffixArray csa = new CircularSuffixArray(st);\n int length = csa.length();\n int[] index = new int[length];\n for (int i = 0; i < length; i++) {\n index[i] = csa.index(i);\n if (index[i] == 0) {\n BinaryStdOut.write(i);\n }\n }\n\n for (int i = 0; i < length; i++) {\n if (index[i] != 0) BinaryStdOut.write(st.charAt(index[i] - 1));\n else BinaryStdOut.write(st.charAt(length - 1));\n }\n BinaryStdOut.close();\n }", "CharacterTarget put(char[] symbols, int from, int to) throws PrintingException;", "private char invertColor(char color) {\r\n\t\tassert color == 'B' || color == 'W';\r\n\t\tchar invertedColor = 'W';\r\n\t\tif (color == 'W') {\r\n\t\t\tinvertedColor = 'B';\r\n\t\t}\r\n\t\treturn invertedColor;\r\n\t}", "public static void main(String[] args) {\nScanner scn=new Scanner(System.in);\nSystem.out.print(\"½Ð¿é¤J¤å¦r\");\nString str=scn.nextLine();\nchar[]data=str.toCharArray();\nint len=str.length();\nchar[]data1=new char[len];\nfor(int i=0;i<len;i++){\n\tdata1[i]=data[len-i-1];\n}\nString str2=new String(data1);\nSystem.out.println(data1);\n\t}", "private String encodedBoard() {\r\n char[] result = new char[Square.SQUARE_LIST.size() + 1];\r\n result[0] = turn().toString().charAt(0);\r\n for (Square sq : SQUARE_LIST) {\r\n result[sq.index() + 1] = get(sq).toString().charAt(0);\r\n }\r\n return new String(result);\r\n }", "public static String decode (String original){\n\n // WRITE YOUR RECURSIVE CODE HERE\n int length = original.length();\n if (length == 0){\n\t\t\treturn \"\";\n\t\t}\n String decodeString = new String();\n\t\tchar a = original.charAt(0);\n\t\tif (Character.isDigit(a)){\n\t\t\tint index = a-'0';\n\t\t\tif (index == 0){\n\t\t\t\treturn decode(original.substring(2));\n\t\t\t}else{\n\t\t\t\tint preIndex = index-1; \n\t\t\t\treturn original.charAt(1)+decode(preIndex+original.substring(1));\t\n\t\t\t}\n\t\t}else{\n\t\t\treturn a + decode(original.substring(1));\n\t\t\t}\n\t\t}", "private String concatReverse(String orignalState, String concat){\n if(orignalState.equals(\"e\")){\n return concat;\n }\n else{\n return orignalState.concat(concat);\n }\n }", "public static void reverseOrder (Character[] symbols)\n {\n // Setup temporary character variable\n \t\n \tchar temp;\n \t\n \t// Cycle through the array and swap the corresponding first position with the last and onward. If there are an odd number of elements\n \t// the center element will not be switched with anything and will still appropriately switch the order of the array\n \t\n \tfor(int startingElements = 0, endingElements = (symbols.length - 1); startingElements < (symbols.length / 2); startingElements++)\n \t{\n \t\ttemp = symbols[endingElements];\n \t\tsymbols[endingElements] = symbols[startingElements];\n \t\tsymbols[startingElements] = temp;\n \t\t\n \t\tendingElements--;\n \t}\n }" ]
[ "0.5812203", "0.56652266", "0.5628507", "0.5625685", "0.5621307", "0.5551251", "0.5533018", "0.5469708", "0.53844154", "0.53764206", "0.533183", "0.5331568", "0.53177154", "0.53000754", "0.5287281", "0.52673805", "0.5266065", "0.5255053", "0.5236014", "0.52351296", "0.52299887", "0.5227562", "0.5193891", "0.5182621", "0.51761234", "0.5175684", "0.5170577", "0.5162871", "0.51458174", "0.5131035", "0.51309764", "0.50814754", "0.50784755", "0.5076153", "0.5071429", "0.50497186", "0.5019816", "0.50182325", "0.50138575", "0.5005342", "0.5002999", "0.4999674", "0.49856704", "0.49656692", "0.495975", "0.49549562", "0.49537137", "0.4953705", "0.4942046", "0.49418506", "0.4940845", "0.49294978", "0.49291328", "0.4926433", "0.49177676", "0.49112058", "0.49095854", "0.49088055", "0.4893901", "0.48867023", "0.4885701", "0.48787063", "0.48764157", "0.48669302", "0.48621973", "0.48525068", "0.48512897", "0.48512495", "0.48446125", "0.48407942", "0.48326418", "0.4828718", "0.48214152", "0.4821372", "0.48170468", "0.48168093", "0.48155245", "0.48152038", "0.48111022", "0.4807122", "0.4804413", "0.47959527", "0.47943783", "0.47899425", "0.4787316", "0.47792438", "0.47766665", "0.4757426", "0.4755772", "0.47550046", "0.47542295", "0.47530127", "0.47501525", "0.4739357", "0.4738512", "0.47366142", "0.47294798", "0.47275373", "0.47252053", "0.47235647", "0.47161964" ]
0.0
-1
Constructs a Guidance object
public Guidance(ChopperStatus status, BluetoothOutput bT, Angler angler) { if (status == null || angler == null) { throw new NullPointerException(); } mStatus = status; mRec = new LinkedList<Receivable>(); mBt = bT; mAngler = angler; createHandler(); // Overridden at thread start. Here for testing. //Temporary: need real tuning values at some point. Crap. for (int i = 0; i < 3; i++) mGain[i][0] = .01; //mGain[3][0] = .01; try { if (mEnableLogging) logfile = new FileWriter(logname, false); } catch (IOException e) { e.printStackTrace(); Log.e(TAG, "Cannot open log file."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GantBuilder ( ) { }", "public GuidanceTest(String name) {\n\t\tsuper(name);\n\t}", "public DABeneficios() {\n }", "public Generateur() {\n }", "UsabilityGoal createUsabilityGoal();", "public Genetic() {\r\n }", "public Garage() {\n\t\tid = generateId();\n\t}", "Cancion createCancion();", "public Gasto() {\r\n\t}", "public Competence() {\r\n\t\tsuper();\r\n\t}", "Oracion createOracion();", "Girl(String n,String p,String i,String a,String b,String t,String pr) {\n \n name = n;\n pairedto = p;\n intelligence = Integer.parseInt(i);\n attractiveness = Integer.parseInt(a);\n mBudget = Integer.parseInt(b); \n type = t;\n pref = pr;\n \n }", "public Achterbahn() {\n }", "private HabitContract() {\n }", "public Loyalty() {}", "public Chant(){}", "public Lanceur() {\n\t}", "Active_Digital_Artifact createActive_Digital_Artifact();", "public God() {}", "public a dD() {\n return new a(this.HG);\n }", "public Potencial() {\r\n }", "public Gov() {\n }", "public Guide create() {\n\t\tfinal Guide res = super.create(Guide.class);\n\n\t\tres.setIncidents(new HashSet<Incident>());\n\t\tres.setExhibitions(new HashSet<Exhibition>());\n\n\t\treturn res;\n\t}", "public Animal()\n\t{\t\n\t\tgender = rng.nextBoolean();\n\t\tstrength = rng.nextFloat() * 100;\n\t}", "public Bid() {}", "private static Dog createLabrador(){\n try {\n UtilityMethods.print(\"Creating labrador for you...!\"); \n DogGenerator dogGenerator = new DogGenerator();\n DogBuilder labradorDogBuilder = new LabradorBuilder();\n dogGenerator.setDogBuilder(labradorDogBuilder);\n dogGenerator.constructDog(\n \"Animal\",\n \"Male\",\n 20,\n \"Carnivores\"\n );\n Dog labradordog = dogGenerator.getDog();\n UtilityMethods.print(\"\\n\"); \n labradordog.eat();\n UtilityMethods.print(\"\\n\"); \n labradordog.speak();\n UtilityMethods.print(\"\\n\"); \n labradordog.walk();\n UtilityMethods.print(\"\\n\"); \n return labradordog;\n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n return null;\n }", "public DetArqueoRunt () {\r\n\r\n }", "@Generated\n public Anotacion() {\n }", "DD createDD();", "public BloodType(){\r\n\r\n }", "public Clade() {}", "public Visitante() {\r\n }", "public Ambulance() {\n\t}", "public EspressoDrink(){\t\n\t}", "public ExpertiseEntity() {\n }", "public Aanbieder() {\r\n\t\t}", "ReferenceTreatment createReferenceTreatment();", "@Override\n\tpublic void createGerant(Gerant g) {\n\t\t\n\t}", "public EnsembleLettre() {\n\t\t\n\t}", "public Boat() {\n }", "@Override\n\tpublic void createAgence(Agence a) {\n\t\t\n\t}", "public CircleCADTool() {\r\n }", "private Instantiation(){}", "SpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche createSpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche();", "public Household() {\n }", "public Deck()\n {\n this(1);\n }", "TGG createTGG();", "QualityRisk createQualityRisk();", "Dog(){\n\t\t\n\t\t//I want to create a chemicals object. Inorder to do this, I have to first create a Cardiac obj, then a Cells obj, then a Chemicals object.\n\t\t//I have to create a Chemicals object, to get a chemicals constructor \n\t\tnew Cardiac().new Cells().new Chemicals();\n\t\t\n\t}", "public CampLease( ) {}", "public OrchardGame() {\n\t\t\n\t}", "public Ads() {\n }", "UMLDomainConcept createUMLDomainConcept();", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-02-24 13:04:41.591 -0500\", hash_original_method = \"FA063F91D44E7D4042E286E05194EEE9\", hash_generated_method = \"669017D820CEDFE100C3C214E1FCE2C7\")\n \nstatic Instance createInstance(int sequenceType, int orientationType, Gesture gesture, String label) {\n float[] pts;\n Instance instance;\n if (sequenceType == GestureStore.SEQUENCE_SENSITIVE) {\n pts = temporalSampler(orientationType, gesture);\n instance = new Instance(gesture.getID(), pts, label);\n instance.normalize();\n } else {\n pts = spatialSampler(gesture);\n instance = new Instance(gesture.getID(), pts, label);\n }\n return instance;\n }", "public Absence() {\n this(DSL.name(\"Absence\"), null);\n }", "Digital_Artifact createDigital_Artifact();", "public Dependency() \r\n {\r\n }", "public MMCAgent() {\n\n\t}", "public DozentPublikation(){}", "DomainConcept createDomainConcept();", "public Mitarbeit() {\r\n }", "@Test\n public void goalCustomConstructor_isCorrect() throws Exception {\n\n int goalId = 11;\n int userId = 1152;\n String name = \"Test Name\";\n int timePeriod = 1;\n int unit = 2;\n double amount = 1000.52;\n\n\n //Create goal\n Goal goal = new Goal(goalId, userId, name, timePeriod, unit, amount);\n\n // Verify Values\n assertEquals(goalId, goal.getGoalId());\n assertEquals(userId, goal.getUserId());\n assertEquals(name, goal.getGoalName());\n assertEquals(timePeriod, goal.getTimePeriod());\n assertEquals(unit, goal.getUnit());\n assertEquals(amount, goal.getAmount(),0);\n }", "public Trening() {\n }", "RentalObject createRentalObject();", "public Odontologo() {\n }", "@Override\n\tDough createDought() {\n\t\treturn new NYDough();\n\t}", "public BuiltBy() {\n }", "ActivityConcept createActivityConcept();", "@Override\n\t\tTruerandomness newInstance() {\n\t\t\treturn null;\n\t\t}", "public Program7()\n { \n _tc = new TravelingCreature( 200, 200 );\n }", "public Spell() {}", "public Alojamiento() {\r\n\t}", "public Gate(){\n\n }", "Elevage createElevage();", "Determinante createDeterminante();", "public Vehicle(){}", "Drone createDrone();", "public AgenteEstAleatorio() {\r\n }", "public DBEpisode() {}", "private DescriptorBuilder() {\n // empty\n \n // NOTE: No tracing is performed, since this constructor is never used\n }", "public static Agrement createEntity(EntityManager em) {\n Agrement agrement = new Agrement()\n .codeAgrement(DEFAULT_CODE_AGREMENT);\n return agrement;\n }", "public BaseballCard(){\r\n\r\n\t}", "public DieteticBrotherModel() {\n database = new Database();\n availableFood = database.initializeAvailableFood();\n recipes = database.initializeRecipes(availableFood);\n\n recipe = new Recipe(0, \"My Recipe\");\n }", "Habit createHabit(Habit habit);", "public Egrga() {\r\n\t}", "public static void createArmy() {\n Unit unitOne = new Unit(\"Unit One\");\n Unit unitTwo = new Unit(\"Unit Two\");\n Unit unitThree = new Unit(\"Unit Three\");\n Unit unitFour = new Unit(\"Unit Four\");\n Unit unitFive = new Unit(\"Unit Five\");\n\n Knight knightOne = new Knight(\"Knight One\");\n Knight knightTwo = new Knight(\"Knight Two\");\n Knight knightThree = new Knight(\"Knight Three\");\n\n General general = new General(\"General\");\n Doctor doctor = new Doctor(\"Doctor\");\n }", "public Door()\n {\n // initialize instance variables\n this.id = 0;\n this.room = new Room();\n this.isLocked = false;\n }", "ObligacionDeber createObligacionDeber();", "public Partage() {\n }", "public Blacksmith(){\n\t\t\n\t}", "public Domain() {\n\n }", "private Gng() {\n }", "public DomainKnowledge() {\r\n\t\tthis.construct(3);\r\n\t}", "GoalModel createGoalModel();", "public RcvfvrGuidanceCvplRequstVo() {\n\n }", "public Candidatura (){\n \n }", "public AnalysisDef() {}", "public WallAnt()\n {\n health = 4;\n cost = 4;\n }", "public ExamMB() {\n }", "public Good() {\n }" ]
[ "0.62342745", "0.61997825", "0.58502114", "0.5834123", "0.5769803", "0.57629365", "0.5760649", "0.57514244", "0.5734548", "0.57120454", "0.57107604", "0.5689262", "0.56668144", "0.56649315", "0.56606865", "0.5659312", "0.5646286", "0.56338084", "0.56334335", "0.5618288", "0.56180716", "0.5613758", "0.55932134", "0.5569071", "0.55686146", "0.55670273", "0.5563671", "0.5559818", "0.55519205", "0.55457956", "0.55425113", "0.55413777", "0.55391014", "0.5536393", "0.552686", "0.5525464", "0.5519248", "0.5512915", "0.5511585", "0.55042994", "0.5492733", "0.5486943", "0.54797703", "0.54696655", "0.5441171", "0.5439709", "0.54391235", "0.54354906", "0.54333556", "0.5425446", "0.54232424", "0.54125434", "0.54123443", "0.5411695", "0.54114175", "0.54022264", "0.540133", "0.5400521", "0.53824764", "0.53797936", "0.53751755", "0.5374829", "0.53743905", "0.5371586", "0.53694636", "0.5366739", "0.53627867", "0.5361876", "0.5359794", "0.5347327", "0.5345045", "0.534105", "0.53353983", "0.5335027", "0.5334443", "0.53309095", "0.53241", "0.53182757", "0.5314814", "0.5301666", "0.52997994", "0.52917624", "0.52862453", "0.5285417", "0.52739066", "0.5272178", "0.5264776", "0.52639604", "0.52623427", "0.5260695", "0.5257385", "0.52568305", "0.52543575", "0.52520627", "0.52507615", "0.52500796", "0.5247604", "0.5241896", "0.5240444", "0.5239003" ]
0.5539235
32
Obtains the current P error values, concatenates into a string
private String getErrorString() { return "GUID:ERROR:" + mErrors[0][0] + ":" + mErrors[1][0] + ":" + mErrors[2][0] + ":" + mErrors[3][0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String errors() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(impossibleLapTime());\n\t\tsb.append(multipleStartTimes());\n\t\treturn sb.toString();\n\t}", "java.lang.String getErr();", "String getErrorsString();", "java.lang.String getError();", "java.lang.String getError();", "java.lang.String getError();", "public String toString() {\n return \"Error on line \" + lineNum + \": \" + errorMessage;\n }", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "private String errorMessage() {\n\n StringBuilder strBuilder = new StringBuilder();\n strBuilder.append(eventBasedXorGatewayNode + \" => eventBasedXorGatewayNode \\n\");\n strBuilder.append(intermediateEvent1Node + \" => intermediateEvent1Node \\n\");\n strBuilder.append(intermediateEvent2Node + \" => intermediateEvent2Node \\n\");\n strBuilder.append(endNode1 + \" => endNode1 \\n\");\n strBuilder.append(endNode2 + \" => endNode2 \\n\");\n\n return strBuilder.toString();\n }", "public java.lang.String getError() {\n return localError;\n }", "public java.lang.String getError() {\n return localError;\n }", "public java.lang.String getError() {\n return localError;\n }", "java.lang.String getErrmsg();", "public final String getError(){\n return lastKnownError;\n }", "public java.lang.String getErrorMsg() {\r\n return localErrorMsg;\r\n }", "public String getError() {\n\treturn mistake;\n }", "public String getError() {\r\n\t\tString error = _error;\r\n\t\t_error = null;\r\n\t\treturn error;\r\n\t}", "public String toString()\n {\n return \"<ERROR>\";\n }", "public String toString() {\n final StringBuffer sb = new StringBuffer(\"<Errors>[ \");\n \n for(Iterator fieldNames = this.errors.keySet().iterator(); fieldNames.hasNext(); ) {\n final String fieldName = (String) fieldNames.next();\n final Iterator errorMessages = getErrors(fieldName).iterator();\n\n sb.append(fieldName + \"=> { \");\n sb.append(toString(errorMessages)); \n sb.append(\"}\" + (fieldNames.hasNext() ? \", \" : \" \"));\n }\n sb.append(\"]\");\n return sb.toString();\n }", "public String getError() {\r\n\t\treturn error;\r\n\t}", "public String getError() {\n return error != null ? error : \"An unknown error occurred.\";\n }", "public String getError() {\n return writeResult.getError();\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\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 errorInfo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\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 errorInfo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\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 errorInfo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\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 errorInfo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getError() {\r\n if (scriptError == null) return \"\";\r\n return scriptError;\r\n }", "public String getErrorString()\r\n\t{\r\n\t\t\r\n\t\treturn ERROR_STRING;\r\n\t}", "public java.lang.String getError() {\n return error;\n }", "public String getErrorString()\n\t{\n\t\treturn errorString;\n\t}", "public String errorMessage()\n {\n return new String(errorMessageAsBytes());\n }", "public String getError() {\n\t\treturn error;\n\t}", "public String getError() {\n\t\treturn error;\n\t}", "@Override\n public String toString() {\n String retval = \"[\";\n int pos = 0;\n for (final Iterator<ErrorMessage> i = errors.iterator(); i.hasNext();) {\n if (pos > 0) {\n retval += \",\";\n }\n pos++;\n retval += i.next().toString();\n }\n retval += \"]\";\n \n return retval;\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\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 errorInfo_ = s;\n return s;\n }\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\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 errorInfo_ = s;\n return s;\n }\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\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 errorInfo_ = s;\n return s;\n }\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\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 errorInfo_ = s;\n return s;\n }\n }", "public String getError() {\n return errMsg;\n }", "public String getError() {\n return error;\n }", "public String getError() {\n return error;\n }", "public String getError() {\n return error;\n }", "public String getError() {\n return error;\n }", "public java.lang.String getErr() {\n java.lang.Object ref = err_;\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 err_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String[] getError() {\n return error;\n }", "public java.lang.String getError() {\n java.lang.Object ref = error_;\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 error_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getErrorStrings() {\n return this.errorStrings;\n }", "public static String getErrorDescription(int errCode) {\n switch (errCode) {\n case ERROR_PACKET_HEADER:\n return \"Invalid packet header\";\n case ERROR_PACKET_TYPE:\n return \"Invalid packet type\";\n case ERROR_PACKET_LENGTH:\n return \"Invalid packet length\";\n case ERROR_PACKET_ENCODING:\n return \"Unsupported packet encoding\";\n case ERROR_PACKET_PAYLOAD:\n return \"Invalid packet payload\";\n case ERROR_PACKET_CHECKSUM:\n return \"Invalid checksum\";\n case ERROR_PACKET_ACK:\n return \"Invalid ACL sequence\";\n case ERROR_PROTOCOL_ERROR:\n return \"Protocol error\";\n case ERROR_PROPERTY_READ_ONLY:\n return \"Property is read-only\";\n case ERROR_PROPERTY_WRITE_ONLY:\n return \"Property is write-only\";\n case ERROR_PROPERTY_INVALID_ID:\n return \"Invalid/Unrecognized property key\";\n case ERROR_PROPERTY_INVALID_VALUE:\n return \"Invalid propery value\";\n case ERROR_PROPERTY_UNKNOWN_ERROR:\n return \"Unknown property error\";\n case ERROR_COMMAND_INVALID:\n return \"Invalid/Unsupported command\";\n case ERROR_COMMAND_ERROR:\n return \"Command error\";\n case ERROR_UPLOAD_TYPE:\n return \"Invalid upload type\";\n case ERROR_UPLOAD_LENGTH:\n return \"Invalid upload length\";\n case ERROR_UPLOAD_OFFSET_OVERLAP:\n return \"Upload offset overlap\";\n case ERROR_UPLOAD_OFFSET_GAP:\n return \"Upload offset gap\";\n case ERROR_UPLOAD_OFFSET_OVERFLOW:\n return \"Upload offset overflow\";\n case ERROR_UPLOAD_FILE_NAME:\n return \"Invalid uploaded filename\";\n case ERROR_UPLOAD_CHECKSUM:\n return \"Invalid uploaded checksum\";\n case ERROR_UPLOAD_SAVE:\n return \"Unable to save uploaded file\";\n case ERROR_GPS_EXPIRED:\n return \"GPS fix expired\";\n case ERROR_GPS_FAILURE:\n return \"GPS failure\";\n }\n if ((errCode >= ERROR_INTERNAL_ERROR_00) && (errCode <= ERROR_INTERNAL_ERROR_0F)) {\n return \"Internal error\";\n }\n return \"Unknown [\" + StringTools.toHexString(errCode, 16) + \"]\";\n }", "public String toDisplayString() {\n return errors.stream()\n .sorted()\n .map(e -> e.toDisplayString(source))\n .collect(Collectors.joining(\"\\n\"));\n }", "public java.lang.String getErr() {\n java.lang.Object ref = err_;\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 err_ = s;\n }\n return s;\n }\n }", "public String getErrorMsg() {\r\n\t\treturn errorMsg;\r\n\t}", "java.util.List<WorldUps.UErr> \n getErrorList();", "@Override\n\tpublic String getMessage()\n\t{\n\t\treturn errMessage;\n\t}", "public String getErrorMsg() {\n return this.emsg;\n }", "public TCodeRep getErr() {\n return err;\n }", "public String getErrorMessage() {\n\t\treturn this.errMsg;\n\t}", "public java.lang.String getError() {\n java.lang.Object ref = error_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n error_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getError() {\n java.lang.Object ref = error_;\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 error_ = s;\n return s;\n }\n }", "public int getERRReps() { \r\n \treturn getReps(\"ERR\");\r\n }", "public String getMessage() {\n return super.getMessage()+\"\\n error code=\"+error_code+\" error value=\"+error_value; //$NON-NLS-1$ //$NON-NLS-2$\n }", "public String getErrorMessage() {\r\n String toReturn = recentErrorMessage;\r\n\r\n return toReturn;\r\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:14:32.469 -0400\", hash_original_method = \"D1B8F575AC734282ABB979C20EC6B537\", hash_generated_method = \"BFEE1A7165C05BCE7710145BAB73FE2E\")\n \n public static String getErrorString(int errorCode){\n \tdouble taintDouble = 0;\n \ttaintDouble += errorCode;\n \n \tString retObj = new String(); \n \tretObj.addTaint(taintDouble);\n \treturn retObj;\n }", "public java.lang.String getError() {\n java.lang.Object ref = error_;\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 error_ = s;\n }\n return s;\n }\n }", "public String getErrorMsg() {\n return errorMsg;\n }", "public Map getError() {\n return this.error;\n }", "public String toString() {\n return this.error + \"(\" + this.statusCode + \")\";\n }", "public String GetErro()\r\n { \r\n for (Object erro : erros) {\r\n this.strErro += erro.toString() + \"\\n\";\r\n }//for (Object erro : erros) {\r\n \r\n return this.strErro;\r\n }", "public String getError() throws DeviceException {\n \t\ttry {\n \t\t\tString errorCode = controller.caget(errChannel);\n \t\t\treturn \"Error Code \" + errorCode + \" : \" + lookupErrorCode(errorCode);\n \t\t} catch (Throwable e) {\n \t\t\tthrow new DeviceException(\"failed to get error code from robot\", e);\n \t\t}\n \t}", "public WorldUps.UErr getError(int index) {\n if (errorBuilder_ == null) {\n return error_.get(index);\n } else {\n return errorBuilder_.getMessage(index);\n }\n }", "public WorldUps.UErr getError(int index) {\n return error_.get(index);\n }", "String errorMessage();", "public String getERR_MSG() {\n return ERR_MSG;\n }", "String getError(int i) {\n if (i >= 0 & i < msgs.length)\n return msgs[i];\n else\n return \"Invalid Error Code\";\n }", "ExternalCompiler.ErrorExpression getErrorExpression () {\n return errorExpression;\n }", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "public java.util.List<WorldUps.UErr> getErrorList() {\n return error_;\n }", "protected String formatErrorMessage() throws SQLException {\n \tint errCode = SQLite.extendederrcode(getConnection().getSqliteDb());\r\n \tString message = SQLite.errmsg(getConnection().getSqliteDb());\r\n\t\tString s = StringUtil.format(\"Code:{0}\\n{1}\", errCode, message);\r\n\t\treturn s;\r\n\t}", "public String getErrorMsg() {\n return this.state == null ? null : this.state.msg;\n }", "public String error();", "WorldUps.UErr getError(int index);", "public static String getLastLrcErrorMsg() {\n String str = new String(mLrcErrorMsg);\n return str;\n }", "public String genResultWithErrors(Database db) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(genResult()).append(\"; \");\n\t\tsb.append(startT()).append(\"; \");\n\t\tfor (int i = 0; i < maxLaps - 1; i++) {\n\t\t\tsb.append(getMeanTime(i)).append(\"; \");\n\t\t}\n\t\tsb.append(finishT()).append(\"; \");\n\t\tsb.append(errors());\n\t\tString out = sb.toString();\n\t\treturn (out.length() == 0) ? \"\" : out.substring(0, out.length() - 2);\n\t}", "com.google.protobuf.ByteString\n getErrBytes();", "public String getMsgError() {\r\n\t\treturn msgError;\r\n\t}", "public com.google.protobuf.ByteString\n getErrBytes() {\n java.lang.Object ref = err_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n err_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static String getStdErr(Process p) throws IOException\n {\n return IOUtils.toString(p.getErrorStream());\n }" ]
[ "0.72468555", "0.7138045", "0.7134642", "0.7026301", "0.7026301", "0.7026301", "0.67808735", "0.663383", "0.663383", "0.663383", "0.663383", "0.6605592", "0.65606326", "0.65606326", "0.65606326", "0.6519436", "0.65124834", "0.64353526", "0.6399276", "0.63866824", "0.63854164", "0.6368967", "0.63538045", "0.63509154", "0.6347168", "0.6340448", "0.6340448", "0.6340448", "0.6340448", "0.63317615", "0.6317843", "0.6310971", "0.6309503", "0.6298899", "0.6295645", "0.6295645", "0.6293143", "0.6254201", "0.6254201", "0.6254201", "0.6254201", "0.6220361", "0.6177898", "0.6177898", "0.6177898", "0.6177898", "0.61682665", "0.61596507", "0.61545676", "0.61510646", "0.6139638", "0.6129116", "0.6096671", "0.6091664", "0.6084396", "0.6083986", "0.6071615", "0.60525584", "0.6052078", "0.60511", "0.60295415", "0.60248387", "0.6012438", "0.6009978", "0.60062915", "0.59942925", "0.5986298", "0.59766394", "0.5970909", "0.5968279", "0.5950241", "0.5932537", "0.5932129", "0.5926806", "0.59156287", "0.59119177", "0.59057736", "0.589235", "0.589235", "0.589235", "0.589235", "0.589235", "0.589235", "0.589235", "0.589235", "0.589235", "0.589235", "0.589235", "0.589235", "0.58886904", "0.5884727", "0.58790606", "0.5875339", "0.5869357", "0.58650786", "0.58631533", "0.58560497", "0.58525234", "0.58184254", "0.5806998" ]
0.6554929
15
Closes the log file.
public void onDestroy() { try { if (logfile != null) logfile.close(); } catch (IOException e) { Log.e(TAG, "Cannot close logfile."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void closeLogFile()\r\n {\n try\r\n {\r\n GregorianCalendar gc = new GregorianCalendar();\r\n String now = su.DateToString(gc.getTime(), DTFMT);\r\n writeToLogFile(\"identifyFTPRequests processing ended at \" +\r\n now.substring(8, 10) + \":\" + now.substring(10, 12) + \".\" +\r\n now.substring(12, 14) + \" on \" + now.substring(6, 8) + \"/\" +\r\n now.substring(4, 6) + \"/\" + now.substring(0, 4));\r\n logWriter.close();\r\n }\r\n catch (Exception ex)\r\n {\r\n System.out.println(\"Error closing log file: \" + ex.getMessage());\r\n System.exit(1);\r\n }\r\n }", "LogFile close() throws IOException\n {\n try {\n if (channel.isOpen())\n {\n // prevent multiple close\n position = channel.position(); // remember postion at close\n // FEATURE 300922; unlock the file if we obtained a lock.\n if (lock != null)\n {\n lock.release();\n // TODO: log lock released\n // System.err.println(file.getName() + \" unlocked\");\n }\n channel.close();\n // TODO: log file closed\n // System.err.println(file.getName() + \" closed\");\n }\n } catch(IOException e) {\n // BUG 303907 - add message to IOException\n IOException ioe = new IOException(\"LogFile.close(): attempting to close \" + \n file.getName() + \" [\" + e.getMessage() + \"]\");;\n ioe.setStackTrace(e.getStackTrace());\n throw ioe;\n }\n return this;\n }", "public void closeLog(){\n if(logWriter!=null){\n logWriter.closeLog();\n logWriter = null;\n }\n }", "public void close() throws IOException {\n this.snapLog.close();\n }", "public void close() {\n if (mEditLog != null) {\n mEditLog.close();\n }\n }", "public void finishUp() throws IOException {\n log.close();\r\n }", "public static void closeFile() {\n\t\tif (input != null)\n\t\t\tinput.close();\n\t\t\n\t}", "@Override\n public void closeLog() {\n \n }", "public void close(){\r\n\t\tif (this.fileWriter != null){\r\n\t\t\ttry {\r\n\t\t\t\tthis.fileWriter.flush();\r\n\t\t\t\tthis.fileWriter.close();\r\n\t\t\t\tthis.fileWriter = null;\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlogger.error(\"Cannot close the file handle \"+this.myfilename+\". Your results might be lost. Cause: \"+e.getMessage());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\r\n\t\t}\r\n\t}", "public void closeFile(){\n\t\t\n\t\ttry{\n\n\t\t\tbufferedInput.close();\n\t\t}\n\t\tcatch(IOException ex) {\n \t\tSystem.err.println(\"Error: Some problem while closing file\");; \n\t\t\tSystem.exit(1); \n \t}\n\t}", "public void closeFile() throws IOException {\n finstream.close();\n writer.close();\n }", "public void close(){\n\t\ttry {\n\t\t\tout.close();\n\t\t\tout = null;\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"Problem closing file.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void closeFile() \r\n {\r\n try // close file and exit\r\n {\r\n if ( input != null )\r\n input.close();\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"Error closing file.\" );\r\n System.exit( 1 );\r\n } // end catch\r\n }", "public void close() {\n\t\ttry {\n\t\t\tcancel(true);\n\t\t\tif (future != null) {\n\t\t\t\tfuture.get();\n\t\t\t}\n\t\t}\n\t\tcatch (Throwable ex) {}\n\t\tfinally {\n\t\t\tlogger.close();\n\t\t}\n\t}", "public void close() throws java.io.IOException {\n\t\tbr.close(); \t\t\t//Closes the file\n\t}", "public void closeFile() throws IOException{\r\n\t\toutRCVictim.close();\r\n\t\tf[0][0].close();\r\n\t\t\r\n\t}", "public void closeFile(){\n }", "public static void close()\n {\n if(!info) return;\n debugger.log.close();\n }", "public void close() throws IOException{\n\t\tcp.close();\n\t\tSuaDB.fileMgr().flushFile(fileName);\n\t}", "public synchronized void close() {\n\t\ttry {\n\t\t\tif (reader != null) reader.close();\n\t\t\tif (writer != null) writer.close();\n\t\t\tif (fromMonet != null) fromMonet.close();\n\t\t\tif (toMonet != null) toMonet.close();\n\t\t\tif (con != null) con.close();\n\t\t\tif (debug && log instanceof FileWriter) log.close();\n\t\t} catch (IOException e) {\n\t\t\t// ignore it\n\t\t}\n\t}", "public void openLogFile(String filename) throws IOException {\n\n if (objectOutputStream != null) {\n objectOutputStream.close();\n objectOutputStream = null;\n }\n\n if (new File(filename).exists()) {\n // Open for append\n fileOutputStream = new FileOutputStream(filename, true);\n objectOutputStream = new ObjectOutputStream(fileOutputStream);\n outputLogFilename = filename;\n } else {\n fileOutputStream = new FileOutputStream(filename);\n objectOutputStream = new ObjectOutputStream(fileOutputStream);\n outputLogFilename = filename;\n }\n }", "public void close() {\r\n Log.d(LOG_TAG, \"close()\");\r\n if (mCurrentFileStream != null) {\r\n try {\r\n mCurrentFileStream.close();\r\n } catch (IOException e) {\r\n Log.e(LOG_TAG, \"Error closing file\", e);\r\n }\r\n }\r\n mFailedOpen = false;\r\n mCurrentFileStream = null;\r\n }", "@Override\r\n\tpublic final void close() throws IOException {\r\n\t\tf.close();\r\n\t\tf = null;\r\n\t}", "public static void closeFile() throws IOException {\n\t\ttry {\n\t\t\tinput.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Could not close input file. Make sure it isn't open elsewhere.\");\n\t\t\tthrow e;\n\t\t}\t\t\n\t}", "public void close() {\n this.fileName = \"\";\n System.out.println(\"Closing the settings file\");\n }", "@Override\n public synchronized void close() {\n closeReportFile();\n }", "public void Close() {\n\t\tfd.close();\r\n\t}", "public static void close( RandomAccessFile file )\n {\n if ( file != null )\n {\n try\n {\n file.close();\n }\n catch ( IOException e )\n {\n log.error( \"Error closing random access file: \" + file, e );\n }\n }\n }", "private void closeLogHandler() {\n\t\tif (logHandler != null) {\n\t\t\tlogger.removeHandler(logHandler);\n\t\t\tlogHandler.close();\n\t\t\tlogHandler = null;\n\t\t}\n\t}", "public void close() {\n saveConfigurationSettings();\n removeAllLogHandlers();\n try {\n Constants.PREFS.flush();\n }\n catch ( Exception e ) {\n e.printStackTrace();\n }\n }", "public void close() {\n Preconditions.checkState(channel != null, \"File not open.\");\n try {\n if (channel.isOpen())\n channel.close();\n } catch (IOException e) {\n LOGGER.error(\"Failed to closed file channel for {}\", path, e);\n } finally {\n channel = null;\n }\n }", "public void logClose() throws IOException {\n\t\t\t\tlong finish = System.currentTimeMillis();\n\t\t\t\tString time = getCurrentDateTimeFull();\n\t\t\t\t// Scanning Failure Counter record:\n\t\t\t\tint failed = 0;\n\t\t\t\tif (fileExist(\"failed.num\", false)) { failed = Integer.valueOf(fileScanner(\"failed.num\")); }\n\t\t\t\t// Scanning Test Counter record:\n\t\t\t\tint n = 1;\n\t\t\t\tif (fileExist(\"test.num\", false)) {\n\t\t\t\t\tif (!fileScanner(\"test.num\").equals(null)) { n = Integer.valueOf(fileScanner(\"test.num\")); }\n\t\t\t\t}\n\t\t\t\tif (n > 1) {\n\t\t\t\t\t// Scanning Initialization record:\n\t\t\t\t\tString startingTime = fileScanner(\"ini.time\");\n\t\t\t\t\tlong start = convertStringToLong(startingTime);\n\t\t\t\t\tfileWriterPrinter(\"TOTAL TESTS: \" + Integer.valueOf(fileScanner(\"test.num\")));\n\t\t\t\t\tfileWriterPrinter(\" FAILED: \" + failed);\n\t\t\t\t\tfileWriterPrinter(\"TEST START: \" + convertCalendarMillisecondsAsLongToDateTimeHourMinSec(start));\n\t\t\t\t\tfileWriterPrinter(\"TEST FINISH: \" + time);\n\t\t\t\t\tfileWriterPrinter(\"TOTAL TIME: \" + convertTimeMillisecondsAsLongToDuration(finish - start));\n\t\t\t\t\tfileWriterPrinter();\n\t\t\t\t\t// Final Log record:\n\t\t\t\t\tif (fileExist(\"run.log\")) { \n\t\t\t\t\t\tfileWriter(\"run.log\", \"\");\n\t\t\t\t\t\tfileWriter(\"run.log\", \"TOTAL TESTS: \" + Integer.valueOf(fileScanner(\"test.num\")));\n\t\t\t\t\t\tfileWriter(\"run.log\", \" FAILED: \" + failed);\n\t\t\t\t\t\tfileWriter(\"run.log\", \"TEST START: \" + convertCalendarMillisecondsAsLongToDateTimeHourMinSec(start));\n\t\t\t\t\t\tfileWriter(\"run.log\", \"TEST FINISH: \" + time);\n\t\t\t\t\t\tfileWriter(\"run.log\", \"TOTAL TIME: \" + convertTimeMillisecondsAsLongToDuration(finish - start));\n\t\t\t\t\t\tfileWriter(\"run.log\", \"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Clean-up unnecessary file(s)\n\t\t\t\tfileCleaner(\"failed.num\");\n\t\t\t\tfileCleaner(\"finish.time\");\n\t\t\t\tfileCleaner(\"ini.time\");\n\t\t\t\tfileCleaner(\"start.time\");\n\t\t\t\tfileCleaner(\"stack.trace\");\n\t\t\t\tfileCleaner(\"test.num\");\n\t\t\t\tfileCleaner(\"xml.path\");\n\t\t\t}", "public void close() {\n if (this.accessFile != null) {\n try {\n this.accessFile.close();\n } catch (IOException unused) {\n }\n this.accessFile = null;\n }\n }", "public synchronized void close() {}", "public synchronized void close()\n {\n if (open) {\n open = false;\n reset();\n line.close();\n }\n }", "public void close() throws IOException {\n open = false;\n stream.close();\n }", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "protected void close() {\r\n\t\ttry {\r\n\t\t\t_asciiIn.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Error ocurred while closing file \" + _directory + _filename + _filetype + \":\" + e.getMessage());\r\n\t\t} // catch\r\n\t}", "public void close()\r\n\t{\r\n\t if (isOpen()) try {\r\n\t \tfd.close();\r\n\t } catch (IOException ex) {\r\n\t \t/* do nothing */\r\n\t } finally {\r\n\t\t thisc = EOF;\r\n\t\t holdc = EOF;\r\n\t\t fd = null;\r\n\t }\r\n\t}", "public void close()\n {\n try\n {\n stop();\n }\n catch (IOException ioex)\n {\n logger.error(\"Failed to stop \" + getClass().getSimpleName(), ioex);\n }\n }", "public void close() {\n\t\t}", "public void close() throws IOException {\n if (dataFile != null)\n dataFile.close();\n dataFile = null;\n super.close();\n }", "public synchronized void close() {\r\n\t\tHashSet copiedLoggers = new HashSet(this.openLoggers);\r\n\t\tfor (Iterator iterator = copiedLoggers.iterator(); iterator.hasNext();) {\r\n\t\t\tXAResourceLogger logger = (XAResourceLogger) iterator.next();\r\n\t\t\ttry {\r\n\t\t\t\tlogger.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t;\r\n\t\t\t}\r\n\t\t\topenLoggers.remove(logger);\r\n\t\t}\r\n\r\n\t}", "public void close() {\n if (cleanup != null) {\n cleanup.disable();\n }\n if (isOpen()) {\n forceClose();\n }\n }", "public void writeLog(String log){\n //Create, if no files.\n if(!this.loggingFile.exists()){\n try {\n this.loggingFile.createNewFile();\n FileWriter fileWriter = new FileWriter(this.loggingFile, true);\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n bufferedWriter.write(log);\n bufferedWriter.newLine();\n bufferedWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n //Open the file.\n else{\n try {\n synchronized (this.loggingFile) {\n FileWriter fileWriter = new FileWriter(this.loggingFile, true);\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n bufferedWriter.write(log);\n bufferedWriter.newLine();\n bufferedWriter.close();\n }\n }catch (IOException e){\n e.printStackTrace();\n }\n }\n\n }", "public void close() throws IOException {\n/* 202 */ this.randomAccessFile.close();\n/* */ }", "public void close() {}", "public void closeFile() throws IOException{\n\t\tsourceReader.close();\n\t}", "public void close() throws IOException {\n FileOutputStream out = new FileOutputStream(fileName);\n wb.write(out);\n\n out.close();\n wb.close();\n }", "public synchronized void close() throws IOException {\n if (isOpen()) {\n randomAccessFile.close();\n randomAccessFile = null;\n ioBuffer = null;\n }\n }", "public void close() {\t\t\n\t}", "public void close() {\n try { out.flush(); } catch (Exception e) {}; // just to be sure\n \n cleanup();\n }", "private void openLogFile()\r\n {\n try\r\n {\r\n GregorianCalendar gc = new GregorianCalendar();\r\n runTS = su.reformatDate(\"now\", null, DTFMT);\r\n logFile = new File(logDir + File.separator + runTS + \"_identifyFTPRequests_log.txt\");\r\n logWriter = new BufferedWriter(new FileWriter(logFile));\r\n String now = su.DateToString(gc.getTime(), DTFMT);\r\n writeToLogFile(\"identifyFTPRequests processing started at \" +\r\n now.substring(8, 10) + \":\" + now.substring(10, 12) + \".\" +\r\n now.substring(12, 14) + \" on \" + now.substring(6, 8) + \"/\" +\r\n now.substring(4, 6) + \"/\" + now.substring(0, 4));\r\n }\r\n catch (Exception ex)\r\n {\r\n System.out.println(\"Error opening log file: \" + ex.getMessage());\r\n System.exit(1);\r\n }\r\n }", "public void close() {\r\n\t}", "private void close() {\n try {\n if (reader != null) {\n this.reader.close();\n }\n if (writer != null) {\n this.writer.close();\n }\n }\n catch (IOException e) {\n log.error(e);\n log.debug(Constants.STREAM_IS_CLOSED);\n }\n }", "public void close()\n\t\t{\n\t\t}", "@Override\n public void close() throws IOException {\n raf.close();\n }", "private void open()\n {\n try\n {\n // Found how to append to a file here \n //http://stackoverflow.com/questions/1625234/how-to-append-text-to-an-existing-file-in-java\n r = new PrintWriter( new BufferedWriter(new FileWriter(filePath, true)));\n }\n catch( IOException e )\n {\n r = null;\n UI.println(\"An error occored when operning stream to the log file.\\n This game wont be logged\");\n Trace.println(e);\n }\n }", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "public void close() {\n\t}", "public void close() throws IOException {\n\n\t}", "private void closeFile() {\n if (fileSpec != null) {\n boolean modOK = modIfChanged();\n if (currentFileModified) {\n filePrefs.handleClose();\n }\n }\n currentFileModified = false;\n }", "public void close() {\n\t\t\n\t}", "public void close() {\n\t\t\n\t}", "public void close() {\n\t\t\n\t}", "public void close() throws IOException {\n\t}", "public void close() throws IOException {\n\t}", "public void close() {\n/* */ try {\n/* 50 */ this.dat.close();\n/* */ }\n/* 52 */ catch (Exception e) {\n/* 53 */ Utilidades.writeError(\"FlujoDetalleDAO:close \", e);\n/* */ } \n/* */ }", "public void close() {\n\n\t}", "public void close() {\n\n\t}", "@Override\n public void close() throws IOException {\n if (closed.compareAndSet(false, true)) {\n timer.cancel();\n\n // If there was a currently executing task wait for it, to\n // avoid false positives on file handle leak.\n try {\n timerThread.join();\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt(); // Restore interrupted flag\n }\n\n try {\n IOUtils.close(systemsCache.values());\n } finally {\n storesCache.clear();\n }\n }\n }", "public void finishCapturingLog() {\n if (logFileHandle_ == null) {\n // Either starting the capture failed, or we were erroneously called\n // when capture is not running.\n endCfg_ = getCurrentConfigFile();\n syncEndingConfig();\n return;\n }\n\n final String logFileName = logFileName_;\n\n core_.logMessage(\"Problem Report: End of log capture\");\n try {\n core_.stopSecondaryLogFile(logFileHandle_);\n } catch (Exception ignore) {\n // This is an unlikely error unless there are programming errors.\n // Let's continue and see if we can read the file anyway.\n }\n logFileHandle_ = null;\n logFileName_ = null;\n\n File logFile = new File(logFileName);\n capturedLogContent_ = null;\n try {\n capturedLogContent_ = readTextFile(logFile);\n } catch (IOException ioe) {\n ReportingUtils.logError(ioe);\n }\n if (capturedLogContent_ == null) {\n capturedLogContent_ = \"<<<Failed to read captured log file>>>\";\n }\n if (reportDir_ == null) { // We used an ad-hoc temporary file\n logFile.delete();\n }\n\n endCfg_ = getCurrentConfigFile();\n syncEndingConfig();\n }", "public static void writeToLog(String filename,String log)\r\n\t{\n\t\ttry \r\n\t\t{\r\n\t\t\tString str = log + \" at \" + new Date() + \"\\n\";\r\n\t\t\tFiles.write(Paths.get(\"log.log\"),str.getBytes(),StandardOpenOption.APPEND);\r\n\t\t\t/*PrintWriter out = new PrintWriter(f);\r\n\t\t\tout.append(log + \" at \" + new Date());\r\n\t\t\tout.flush();\r\n\t\t\tout.close();*/\r\n\t\t} \r\n\t\tcatch (FileNotFoundException e) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"FNE: \" + e.getMessage());\r\n\t\t} \r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"IOE: \" + e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t}", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();" ]
[ "0.8105347", "0.7345836", "0.7250355", "0.7053873", "0.6703623", "0.6500291", "0.6425382", "0.6401848", "0.6383946", "0.6380347", "0.63684237", "0.6281661", "0.62243503", "0.62227136", "0.6192994", "0.6163387", "0.6057735", "0.60415924", "0.6031295", "0.60167754", "0.59868044", "0.5964346", "0.59508353", "0.5950587", "0.59262055", "0.5904828", "0.5879674", "0.5847502", "0.58320683", "0.58256286", "0.5818152", "0.57933813", "0.57448965", "0.5744052", "0.573878", "0.5735853", "0.5728549", "0.5728549", "0.5728549", "0.5728549", "0.5728549", "0.5728549", "0.5728549", "0.5728549", "0.5710288", "0.56818444", "0.5674001", "0.5670909", "0.5663783", "0.5652003", "0.56512755", "0.56452245", "0.56382406", "0.5636398", "0.5630261", "0.56276596", "0.5618049", "0.561293", "0.5604272", "0.56040055", "0.5600264", "0.5592741", "0.5592397", "0.558337", "0.55699515", "0.55699486", "0.55699486", "0.55699486", "0.55699486", "0.55699486", "0.55699486", "0.55699486", "0.55699486", "0.55699486", "0.55699486", "0.55699486", "0.5568649", "0.55682045", "0.5568177", "0.5559194", "0.5559194", "0.5559194", "0.5558373", "0.5558373", "0.55499303", "0.5531964", "0.5531964", "0.55265826", "0.5526447", "0.5524678", "0.55218315", "0.55218315", "0.55218315", "0.55218315", "0.55218315", "0.55218315", "0.55218315", "0.55218315", "0.55218315", "0.55218315" ]
0.62098294
14
Starts the guidance thread
public void run() { Looper.prepare(); Thread.currentThread().setName("Guidance"); Thread.currentThread().setPriority(Thread.MAX_PRIORITY); createHandler(); //mHandler.sendEmptyMessage(EVAL_MOTOR_SPEED); receiveMessage("DIRECT:0:0:0:0", null); Looper.loop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void start() {\n\t\ttrackerThread.start();\n\t}", "public void start() {\n\tanimator = new Thread(this);\n\tanimator.setName(\"erly_boid:::swarm intelligence\");\n\terlang =new Thread(co);\n\terlang.start();\n\tanimator.start();\n \n \n \t\n }", "public void start() {\n\t\tai = new Thread(this);\n\t\tai.start();\n\t}", "private void start() {\r\n\t\tif (running)\r\n\t\t\treturn;\r\n\t\trunning = true;\r\n\t\tthread = new Thread(this);//creates threat to run program on\r\n\t\tthread.start();\r\n\t}", "void startToPerformAsLeader();", "public void start() {\n\t\tmyThread = new Thread(this); myThread.start();\n\t}", "public void start()\n\t{\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t}", "void start() {\n\tsleepThread = new Thread(this);\n\tsleepThread.start();\n }", "public void start() {\n thread = new Thread(this);\n thread.start();\n System.out.println(\"---\\t Ober \" + naam + \" is gestart.\");\n }", "public void start(){\n thread.start();\n }", "public void Start() {\r\n\t\tthread.run();\r\n\t}", "protected void sync() {\n System.out.println(\"Starting playback thread with \" + terms);\n startThread();\n }", "public void start ()\n {\n Thread th = new Thread (this);\n // start this thread\n th.start ();\n\n }", "public void ThreadStart()\r\n\t{\r\n\t\tthread_running=true;\r\n\t\tNewBallTheard.start();\r\n\t}", "public void startThread(){\n String message = \"Connecting to RescueNet...Please Wait\";\n showProgressDialog(message);\n connectionThread = new ConnectionThread(mwifiAdmin, handlerMain);\n connectionThread.start();\n }", "private void startGame() {\r\n\t\tlog(mName + \": print an opening message (something useful, it is up to you)\");\r\n\t\tnew Thread(new Host(mRightPercent)).start();\r\n\r\n\t\tfor (Contestant c : Contestant.mGame.getContestants()) {\r\n\t\t\tlog(mName + \": Welcome \" + c.getName() + \" to the game.\");\r\n\t\t\tsynchronized (c.mConvey) {\r\n\t\t\t\tc.mConvey.notify();\r\n\t\t\t}\r\n\r\n\t\t\tsynchronized (intro) {\r\n\t\t\t\twaitForSignal(intro, null);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tsynchronized (Contestant.mGame) {\r\n\t\t\tContestant.mGame.setGameStarted(true);\r\n\t\t\tContestant.mGame.notify();\r\n\t\t}\r\n\t}", "void startThread();", "public void start() {\n if (runner == null) {\n runner = new Thread(this, \"Runner\");\n runner.start();\n }\n }", "private void start()\n {\n _taskThread.start();\n _state = ActivityState.RUNNING;\n }", "public void start()\n\t{\n\n\t\ttry\n\t\t{\n\t\t\tnew JDABuilder(this.appconfig.authType)\n\t\t\t\t.setToken(this.appconfig.authToken)\n\t\t\t\t.setAudioEnabled(false)\n\t\t\t\t.setAutoReconnect(true)\n\t\t\t\t.addEventListener(new DiscordMonitorListenerAdapterPrep())\n\t\t\t\t.buildBlocking(); // TODO use .buildAsync()?\n\t\t}\n\t\tcatch (LoginException | IllegalArgumentException e)\n\t\t{\n\t\t\tSystem.err.println(\"error: Log in failed. Please check provided token.\");\n\t\t}\n\t\tcatch (RateLimitedException e)\n\t\t{\n\t\t\tSystem.err.println(\"error: This application is being rate limited by Discord.\");\n\t\t}\n\t\tcatch (InterruptedException e)\n\t\t{\n\t\t\tSystem.err.println(\"fatal: Unexpected interrupt.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void start() {\n \t\tisFinished = false;\n \t\trunning = true;\n \t\tpluginHandler.startAll();\n \t\tThread engine = new Thread(this, \"engine\");\n \t\tengine.start();\n \t\tissueHandler.checkAllIssues();\n \t}", "public void start() {\n thread = new Thread(this);\n thread.setPriority(Thread.MIN_PRIORITY);\n thread.start();\n }", "public void start() {\n\n\t\tisRunning = true;\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\n\t}", "public synchronized void startup() {\n\n if (mThread == null) {\n mThread = new CounterThread();\n new Thread(mThread).start();\n }\n Log.d(TAG, \"startup\");\n }", "public void start()\n\t{\n\t\taskUser();\n\t\tloop();\n\n\t}", "@Override\n public void startThread() {\n Log.d(TAG, \"Starting \" + getName() + \" thread!\");\n if (!started)\n start();\n running = enabled;\n doStartAction();\n }", "public void start() {\n if (!started) {\n thread = new Thread(this);\n thread.start();\n started = true;\n }\n }", "private void startClientStatisticsThread() {\r\n\t\tnew Thread(clientStatistics).start();\r\n\t}", "public void start () {\r\n // Declaras un hilo\r\n Thread th = new Thread (this);\r\n // Empieza el hilo\r\n th.start ();\r\n }", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start() {\n // EFFECTS: starts a new thread from this instance.\n (new Thread(instance)).start();\n }", "public void start() {}", "public void start() {}", "void start() {\n \t\tThread logicThread = new Thread(logic);\n \t\tThread graphicThread = new Thread(graphics);\n \n \t\tlogicThread.start();\n \t\tgraphicThread.start();\n \t}", "public void run() {\n\t\t\t\tLog.e(\"bc\", \"thread started!\");\n\n\t\t\t\t// UTPDirectTest();\n\t\t\t\t// UDPTest();\n\t\t\t\tUDPBroadcastTest();\n\n\t\t\t}", "private void start(){\n isRunning = true;\n thread = new Thread(this);\n thread.start();\n }", "public void start() {\n\t\tif(t == null) {\n\t\t\tt = new Thread(this);\n\t\t\tt.start();\n\t\t}\n\t}", "public void start() {\n // Declaras un hilo\n Thread th = new Thread(this);\n // Empieza el hilo\n th.start();\n }", "public synchronized void start() {\r\n\t\tthread = new Thread(this);\r\n\t\tthread.start();\r\n\t\tisRunning = true;\r\n\t }", "public void start() {\r\n\t\trunning = true;\r\n\t\tt = new Thread(this);\r\n\t\tt.start();\r\n\t}", "public void start() {\n\t\tinstanceConfigUpdated();\n\n\t\tnew Thread(getUsageData, \"ResourceConsumptionManager : GetUsageData\").start();\n\n\t\tLoggingService.logInfo(MODULE_NAME, \"started\");\n\t}", "private void go() {\n\n new Thread(this).start();\n }", "public void run() {\n\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+\"准备。。。\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tp.await();//等待\n\t\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+\"已接受。。。\");\n\t\t\t\t\t\tThread.sleep((long)(Math.random()*10000));\n\t\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+\"完成。。。\");\n\t\t\t\t\t\ts.countDown();//三次后为0 释放主线程中的等待\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}", "public void startTask() {\n\t}", "public void start()\n {\n animator = new Thread(this);\n animator.start();\n }", "public void start() {\r\n isRunning = true;\r\n Thread thread = new myThread();\r\n thread.start();\r\n }", "public synchronized void start() {\n\t\tif(isRunning) return; //If the game is already running, exit method\n\t\tisRunning = true; //Set boolean to true to show that it is running\n\t\tthread = new Thread(this); //Create a new thread\n\t\tthread.start(); //Start the thread\n\t}", "public void start()\n {\n }", "private void startThread()\n {\n if (workerThread == null || !workerThread.isLooping())\n {\n workerThread = new LiveViewThread(this);\n workerThread.start();\n }\n }", "public void startThread() {\n\t\tpm = (PowerManager) getSystemService(Context.POWER_SERVICE);\n\t\twl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, \"My Tag\");\n\t\twl.acquire();\n\t\tthread = new FrameworkThread((Context) this);\n\t\tthread.start();\n\t}", "public void start()\r\n {\r\n if (_keepGoing) return;\r\n\r\n _keepGoing = true;\r\n\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n }", "public synchronized void start() {\r\n\r\n\t\tif (!running) {\r\n\t\t\trunning = true;\r\n\t\t\tnew Thread(this, name).start();\r\n\t\t}\r\n\t}", "public void run() {\n mSyncStart = null;\n\n // start sync\n SyncAdapter.requestSync(NumberValidation.this, true);\n\n // if we have been called internally, start ConversationList\n if (mFromInternal)\n startActivity(new Intent(getApplicationContext(), ConversationList.class));\n\n Toast.makeText(getApplicationContext(), R.string.msg_authenticated, Toast.LENGTH_LONG).show();\n\n // end this\n abortProgress();\n finish();\n }", "public synchronized void start() {\n\t\tif (running) {\n\t\t\treturn;\n\t\t}\n\t\trunning = true; // thread\n\t\tthread = new Thread(this);\n\t\tthread.start(); // calls run method, where majority of game code wil go\n\t}", "private void initShooter() {\n m_task = new ShooterThread(this);\n m_task.start();\n }", "public void start() {\n logger.info(\"LeaderSelector start racing for leadership\");\n leaderElection();\n }", "public void start() {\r\n\t\tisRunning = true;\r\n\t\tnew Thread(this).start();\r\n\t}", "public synchronized void start(){\n\t\tthis.running = true;\n\t\tthis.thread = new Thread(this,\"Game\");\n\t\tthread.start();\n\n\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tIntent mainIntent = new Intent(mThis,GuideActivity_.class);\n\t\t\t\t\t//Intent mainIntent = new Intent(LuanchActivity.this, \"guideactivity\");\n\t\t\t\t\tmThis.startActivity(mainIntent);\n\t\t\t\t\tmThis.finish();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n//\t\t\t\t\tIntent mainIntent = new Intent(LuanchActivity.this,\n//\t\t\t\t\t\t\tMainActivity.class);\n//\t\t\t\t\tLuanchActivity.this.startActivity(mainIntent);\n//\t\t\t\t\tLuanchActivity.this.finish();\n\t\t\t\t}", "public void run() {\n\n /**\n * let the user the know what is going to happen\n */\n showExecutionStart();\n\n /**\n * create an archetype for the new application\n */\n executeArchetypeCommand();\n\n /**\n * Provide some delay to allow thread to create the archetype\n */\n splash = new SplashScreen();\n\n for (int i = 0; i < 7; i++) {\n updateStatus(i);\n try {\n Thread.sleep(500);\n } catch (InterruptedException ie) {\n ie.printStackTrace();\n }\n }\n\n hideSplashScreen();\n splash = null;\n\n /**\n * let the user the know what is going to happen\n */\n showExecutionEnd();\n }", "public void StartFailureDetection()\n\t{\n\t\tm_FailDetThread = new Thread(m_oMember);\n\t\tm_FailDetThread.start();\n\t}", "public void start() {\n\t\tdata = new SharedData(output, input); // handles all shared data\n\t\ttimer = new Thread(new TimeHandler(data)); \n\t\tbuttons = new Thread(new ButtonHandler(input, data, signal));\n\n\t\ttimer.start();\n\t\tbuttons.start();\n\t}", "private void start() {\n\n\t}", "@Override\n public synchronized void start() {\n init();\n }", "private void startGame() {\r\n\t\tthis.lobbyTimerActive = false;\r\n\t\tthis.gameStarted = true;\r\n\t\tthis.queueMessage(\"% START\");\r\n\t\tthis.dealer = new Dealer(this, this.players);\r\n\r\n\t\t// Start the dealer thread\r\n\t\tThread dealerThread = new Thread(dealer);\r\n\t\tdealerThread.start();\r\n\t}", "protected void start() {\n }", "void doManualStart();", "public synchronized void start() {\n\t\tif (running)\n\t\t\treturn;\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t\trunning = true;\n\t}", "public void start() {\n\t\tcanvas.createBufferStrategy(2);\n\t\tbuffer = canvas.getBufferStrategy();\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t}", "public void start() {\n }", "private void tokenRingThread() throws Exception {\n\t\tThread thread = new Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttokenRing.init();\n\t\t\t}\n\t\t});\n\t\tthread.start();\n\t}", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "private void startTurn() {\n\n playerThread = new Thread(new Runnable()\n {\n @Override\n public void run() {\n try {\n processPlayerTurns();\n } catch (DeficitException e) {\n e.printStackTrace();\n }\n }\n });\n playerThread.start(); // start the new thread with the provided run() method\n\n }", "public void start() {\r\n running = true;\r\n new Thread(this).start();;\r\n }", "public void run() {\n\t\tSystem.out.println(\"我要一个教练\");\n\t\ttry {\n\t\t\tThread.sleep(2000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"教练来了\"+Thread.currentThread().getName());\n\t\t\n\t\t\n\t}" ]
[ "0.6837454", "0.6683634", "0.64656895", "0.63306004", "0.6297676", "0.6289696", "0.62744427", "0.62508565", "0.6238268", "0.62263584", "0.6212329", "0.61951315", "0.61912394", "0.6162063", "0.61364853", "0.61354536", "0.6133501", "0.6113517", "0.6058963", "0.6051982", "0.60489625", "0.60483474", "0.6042639", "0.6039659", "0.60390663", "0.60105044", "0.60006213", "0.5993617", "0.59847033", "0.5982339", "0.5982339", "0.5982339", "0.5982339", "0.5982339", "0.5982339", "0.5982339", "0.5982339", "0.5982339", "0.5982339", "0.5982339", "0.5982339", "0.59744287", "0.5962043", "0.5962043", "0.5956416", "0.5955085", "0.5951091", "0.5947874", "0.5932471", "0.59251714", "0.59199685", "0.59084463", "0.5897669", "0.5897411", "0.5887363", "0.5879744", "0.587833", "0.58753407", "0.5872652", "0.5869316", "0.58539796", "0.58420867", "0.5838447", "0.5837636", "0.58343285", "0.5829453", "0.5818294", "0.58139205", "0.58131796", "0.58083785", "0.58076006", "0.5802046", "0.5801311", "0.5796006", "0.5795731", "0.579312", "0.57810444", "0.5779544", "0.5778516", "0.5777347", "0.5775816", "0.5772224", "0.5763245", "0.5763245", "0.5763245", "0.5763245", "0.5763245", "0.5763245", "0.5763245", "0.5763245", "0.5763245", "0.5763245", "0.5763245", "0.5763245", "0.5763245", "0.5763245", "0.5763245", "0.57592136", "0.57567465", "0.5755916" ]
0.60941845
18
Registers a receiver to receive Guidance updates.
public void registerReceiver(Receivable rec) { synchronized (mRec) { mRec.add(rec); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void registerReceiver(IReceiver receiver);", "public void registerReceiver(Channel.Receiver receiver);", "private void registerReceiver() {\n // TODO: Is this needed?\n mRegistrationReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n boolean sentToken = PreferencesUtils.getBoolean(mActivity, R.string.gcm_sent_to_server_key, false);\n\n if (sentToken) {\n LogUtils.LOGE(\"***>GCM\", \"sent\");\n } else {\n LogUtils.LOGE(\"***>GCM\", \"error\");\n }\n }\n };\n }", "private void registerReceivers() {\n \t\t\n \t\t// register for readings updates\n IntentFilter mIntentFilter = new IntentFilter();\n mIntentFilter.addAction(getString(R.string.system_broadcast_intent_new_reading_action));\n try {\n \t\t\tmIntentFilter.addDataType(ReadingsContract.CONTENT_TYPE_ITEM);\n \t\t} catch (MalformedMimeTypeException e) {\n \t\t\tLog.e(sLogTag, \"unable to set type for new reading receiver\", e);\n \t\t}\n \n registerReceiver(newReadingsReceiver, mIntentFilter);\n \n // register for sensor status updates\n mIntentFilter = new IntentFilter();\n mIntentFilter.addAction(getString(R.string.system_broadcast_intent_sensor_status_action));\n \n registerReceiver(sensorStatusReceiver, mIntentFilter);\n \n // register for changes in the status of Serval Mesh\n mIntentFilter = new IntentFilter();\n \n for(int i = 0; i < ServalStatusReceiver.SERVAL_STATUS_ACTIONS.length; i++) {\n \tmIntentFilter.addAction(ServalStatusReceiver.SERVAL_STATUS_ACTIONS[i]);\n }\n \n if(servalMeshStatusReceiver == null) {\n \tservalMeshStatusReceiver = new ServalStatusReceiver();\n }\n \n registerReceiver(servalMeshStatusReceiver, mIntentFilter);\n \n \t // send off an intent to poll for the current state of the serval mesh\n \t\tIntent mIntent = new Intent(ServalStatusReceiver.SERVAL_STATE_CHECK_ACTION);\n \t\tstartService(mIntent);\n \t}", "private void registerReceivers() {\r\n\r\n\t\tThatItApplication.getApplication().registerReceiver(\r\n\t\t\t\tnew IncomingReceiver(),new IntentFilter(\"UPDATE_ROSTER_MANUALLY\"));\r\n\t\tThatItApplication.getApplication().registerReceiver(\r\n\t\t\t\tnew IncomingReceiver(),new IntentFilter(\"Refresh_Group_Adapter\"));\r\n\t\tThatItApplication.getApplication().registerReceiver(\r\n\t\t\t\tnew IncomingReceiver(),new IntentFilter(\"GROUP NEW MESSAGE RECEIVED\"));\r\n\t\tThatItApplication.getApplication().registerReceiver(\r\n\t\t\t\tnew IncomingReceiver(),new IntentFilter(\"Refresh_User_Adapter\"));\r\n\t\tThatItApplication.getApplication().registerReceiver(\r\n\t\t\t\tnew IncomingReceiver(),new IntentFilter(\"Refresh_Adapter\"));\r\n\t}", "private void registerBLEBrocastReceiver() {\n BlueToothReceiver.registerCardStatusMonitoring(mHandler);\n\n //MyBroadcastReceiver\n mBleReceiver = new BlueToothReceiver();\n IntentFilter filter = new IntentFilter();\n filter.addAction(\"android.bluetooth.device.action.ACL_CONNECTED\");\n filter.addAction(\"android.bluetooth.device.action.ACL_DISCONNECTED\");\n filter.addAction(\"android.bluetooth.device.action.FOUND\");\n filter.addAction(\"android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED\");\n //register receiver\n registerReceiver(mBleReceiver, filter);\n }", "@SuppressLint(\"NewApi\")\n\tprivate void registReciver() {\n\t\tmyReciver = new MyReciver();\n\t\tIntentFilter filter = new IntentFilter();\n\t\tfilter.addAction(\"justlink.action.intent.data_inited_outside_order\");\n\t\tfilter.addAction(\"justlink.action.intent.refresh_searchcount\");\n\t\tgetActivity().registerReceiver(myReciver, filter);\n\t\t\n\t}", "public void setReceiver (Receiver receiver) {\n\t\t_receiver = receiver;\n\t}", "private void registerDeviceReceiver() {\n filter = new IntentFilter(\"ie.ucd.smartrideRT\");\n registerReceiver(MyReceiver, filter);\n filter = new IntentFilter(\"ie.ucd.smartrideRT.message\");\n registerReceiver(stateReceiver, filter);\n filter = new IntentFilter(\"ie.ucd.smartrideRT.connection\");\n registerReceiver(connectionReceiver, filter);\n }", "public void setReceiver(String receiver) {\n Receiver = receiver;\n }", "private void registerBroadcastReceiver() {\n IntentFilter filter = new IntentFilter();\n filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);\n filter.addAction(Constants.GRAB_ORDER_FAIL_ACTION);\n filter.addAction(Constants.GRAB_ORDER_SUCCESS_ACTION);\n filter.addAction(Constants.DISPATCH_ORDER_SUCCESS_ACTION);\n filter.addAction(Constants.IS_OPERATING_STATE_ORDER_ACTION);\n filter.addAction(Constants.OPERATED_ORDER_ACTION);\n filter.addAction(Constants.CANCLE_ORDER_ACTION);\n filter.addAction(Constants.CANCLE_GRABBED_ORDER_ACTION);\n registerReceiver(receiver, filter);\n }", "public void setReceiver(Receiver receiver) {\n\t this.receiver = receiver;\n\t }", "public abstract void registerDataReceiverToAndroid(Context context);", "private void registerBroadCastReceiver() {\n // Create a filter with the broadcast intents we are interested in.\n IntentFilter filter = new IntentFilter();\n filter.addAction(Intent.ACTION_SCREEN_ON);\n filter.addAction(Intent.ACTION_SCREEN_OFF);\n // Register for broadcasts of interest.\n registerReceiver(mBroadcastReceiver, filter, null, null);\n }", "public void registerForDownloadEvent(BroadcastReceiver receiver) {\n LocalBroadcastManager.getInstance(context).registerReceiver(receiver,\n new IntentFilter(DOWNLOAD_INTENT));\n }", "@Override\n public void receiverAddressChanged(String receiver) {\n }", "public void registerReceiver() {\n if (mReceiver == null)\n mReceiver = new NetworkReceiver(new Listener() {\n @Override\n public void post(NetworkChangeEvent event) {\n if (mOnNetworkChangedListener != null) {\n mOnNetworkChangedListener.onChanged(event);\n }\n }\n });\n IntentFilter filter = new IntentFilter();\n filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);\n filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);\n mContext.registerReceiver(mReceiver, filter);\n }", "private void registerSearchResultsReceiver() {\n IntentFilter filter = new IntentFilter();\n filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);\n filter.addAction(BluetoothDevice.ACTION_FOUND);\n filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_STARTED);\n filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n\n registerReceiver(mReceiver, filter);\n }", "@Override\n\t\t\t\t\tpublic Intent myRegisterReceiver(BroadcastReceiver receiver, IntentFilter filter)\n\t\t\t\t\t{\n\t\t\t\t\t\tregisterReceiver(receiver, filter);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}", "private void registerTransferBroadcastReceiver() {\n\t\tIntentFilter filter = new IntentFilter();\n\t\tfilter.addAction(TransferManager.BROADCAST_ACTION_SENT);\n\t\tfilter.addAction(TransferManager.BROADCAST_ACTION_RECEIVED);\n\t\tfilter.addAction(TransferManager.BROADCAST_ACTION_EXCEPTION);\n\t\tregisterReceiver(mTransferBroadcastReceiver, filter);\n\t}", "private void setReceiver() {\n broadcastReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n Bundle bundle = intent.getExtras();\n update(bundle);\n }\n };\n IntentFilter filter = new IntentFilter();\n filter.addAction(RunningContract.progress);\n registerReceiver(broadcastReceiver, filter);\n }", "private void registerReceivers() {\n\n postChangeController = new PostChangeController();\n PostChangeListener listener = new PostChangeListener(callbackManager);\n postChangeController.registerReceivers(listener, getActivity(), toString());\n\n userUpdater = new UserUpdater(callbackManager);\n\n LocalBroadcastManager.getInstance(getActivity()).registerReceiver(\n userUpdater,\n new IntentFilter(AppSession.USER_UPDATE)\n );\n }", "private void registerDeepLinkReceiver() {\n mDeepLinkReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n if (AppInviteReferral.hasReferral(intent)) {\n launchDeepLinkActivity(intent);\n }\n }\n };\n\n IntentFilter intentFilter = new IntentFilter(Constants.ACTION_DEEP_LINK_JOIN_ACTIVITY);\n LocalBroadcastManager.getInstance(mActivity.getApplicationContext()).registerReceiver(mDeepLinkReceiver, intentFilter);\n }", "private void regFliter() {\n\t\tIntentFilter filter = new IntentFilter();\r\n\t\tfilter.addAction(OsConstants.JSH.ADD_DEVICES_SUCCES);\r\n\t\tfilter.addAction(OsConstants.JSH.SETTIING_WIFI_SUCCESS);\r\n\t\tregisterReceiver(mReceiver, filter);\r\n\t}", "public static void addStateListener(BroadcastReceiver receiver)\r\n\t{\r\n\t\tAppContext.context.registerReceiver(receiver, new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED));\r\n\t}", "private void registerBroadcastReceiver(){\n final IntentFilter hceNotificationsFilter = new IntentFilter();\n hceNotificationsFilter.addAction(\"unitap.action.NOTIFY_MAIN_DATA\");\n activity.registerReceiver(hceNotificationsReceiver, hceNotificationsFilter);\n Log.v(\"Registering Receiver\", \"MAIN Receiver\");\n }", "public void register() {\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"android.intent.action.AIRPLANE_MODE\");\n if (this.dispatcher.scansNetworkChanges) {\n intentFilter.addAction(\"android.net.conn.CONNECTIVITY_CHANGE\");\n }\n this.dispatcher.context.registerReceiver(this, intentFilter);\n }", "private void registerForBatteryStatus()\n\t{\n\t\tif(!isReceiverRegistered)\n\t\t{\n\t\t\tLogger.D(TAG, \"registerForBatteryStatus async\");\n\t\t\tActivity activity = RhodesActivity.safeGetInstance();\n\t\t\tif(activity != null)\n\t\t\t{\n\t\t\t\tactivity.registerReceiver(this, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));\n\t\t\t\tactivity.registerReceiver(this, new IntentFilter(Intent.ACTION_BATTERY_LOW));\n\t\t\t\tisReceiverRegistered = true;\n\t\t\t}\n\t\t\telse Logger.E(TAG, \"Could not communicate with main Activity\");\n\t\t}\n\t}", "@Override\n public void registerForMessage(CommReceiver recClass) {\n commSender.registerForMessage(recClass);\n }", "public BLEBroadcastReceiver getReceiver() { return receiver; }", "public static void registerReceiver(Context context) {\n\n //Get the milliseconds for next hour\n Calendar calendar = Calendar.getInstance(TimeZone.getDefault());\n calendar.setTimeZone(TimeZone.getTimeZone(\"Asia/Calcutta\"));\n calendar.add(Calendar.HOUR_OF_DAY, 1);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n\n //Prepare the pending intent\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context,\n REA_CODE_PENDING_INTENT,\n new Intent(context, TimeReminderReceiver.class),\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n //Set the alarm\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC, calendar.getTimeInMillis(), pendingIntent);\n } else {\n alarmManager.setExact(AlarmManager.RTC, calendar.getTimeInMillis(), pendingIntent);\n }\n\n Log.d(TAG, \"registerReceiver: Next alarm registered.\");\n }", "private void registerBroadcastReceivers(){\n if (!mBufferBroadcastIsRegistered){\n this.registerReceiver(BufferBroadcastReceiver,\n new IntentFilter(TalePlay_Service.BROADCAST_BUFFER));\n mBufferBroadcastIsRegistered=true;\n }\n /** register broadcastReceiver for seekBar*/\n if (!mSeekBarBroadcastIsRegistered) {\n this.registerReceiver(seekBarBroadcastReceiver,\n new IntentFilter(TalePlay_Service.BROADCAST_ACTION));\n mSeekBarBroadcastIsRegistered = true;\n }\n /** register broadcastReceiver for alertDialog in case call when audioTale is playing*/\n if(!mADialogBroadcastIsRegistered){\n this.registerReceiver(afterCallBroadcastReceiver,\n new IntentFilter(TalePlay_Service.BROADCAST_ADIALOG));\n mADialogBroadcastIsRegistered = true;\n }\n\n\n }", "private void registerLoginReceiver() {\n\t\t\tif (loginReceiver == null) loginReceiver = new LoginReceiver();\n\t\t\tIntentFilter intentFilter = new IntentFilter(LoginActivity.LOGIN_RESULT_ACTION);\n\t\t\tregisterReceiver(loginReceiver, intentFilter);\n\t\t}", "public void addListener(@NotNull ReceiverListener listener) {\n myListeners.add(listener);\n }", "public void registerRingerTracker() {\n this.mRingerModeTracker.getRingerMode().observeForever(this.mRingerModeObserver);\n }", "private void registerReceivers() {\n IntentFilter networkFilter = new IntentFilter();\n networkFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);\n registerReceiver(networkStatusReceiver, networkFilter);\n }", "public void setReceiverId(java.lang.String receiverId) {\r\n this.receiverId = receiverId;\r\n }", "private void register() {\n Intent registrationIntent = new Intent(REQUEST_REGISTRATION_INTENT);\n registrationIntent.setPackage(GSF_PACKAGE);\n registrationIntent.putExtra(\n EXTRA_APPLICATION_PENDING_INTENT, PendingIntent.getBroadcast(context, 0, new Intent(), 0));\n registrationIntent.putExtra(EXTRA_SENDER, senderId);\n context.startService(registrationIntent);\n }", "public void setReceiverId(String receiverId) {\n this.receiverId = receiverId;\n }", "@Override\n\t\t\t\t\tpublic void myUnregisterReceiver(BroadcastReceiver receiver)\n\t\t\t\t\t{\n\t\t\t\t\t\tunregisterReceiver(receiver);\n\t\t\t\t\t}", "private void registerIntentReceivers() {\n \n \t\tIntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);\n \t\tfilter.addAction(Intent.ACTION_PACKAGE_REMOVED);\n \t\tfilter.addAction(Intent.ACTION_PACKAGE_CHANGED);\n \t\tfilter.addDataScheme(\"package\");\n \t\tregisterReceiver(mApplicationsReceiver, filter);\n \t}", "private void registrarEventosBluetooth() {\n IntentFilter filtro = new IntentFilter();\n filtro.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);\n filtro.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n filtro.addAction(BluetoothDevice.ACTION_FOUND);\n activity.registerReceiver(bluetoothReceiver, filtro);\n }", "private void registerWithC2DMServer() {\n Intent registrationIntent = \n new Intent(\"com.google.android.c2dm.intent.REGISTER\");\n\n registrationIntent.putExtra(\"app\", \n PendingIntent.getBroadcast(this, 0, new Intent(), 0));\n\n registrationIntent.putExtra(\"sender\",\n \"myC2DMaccount@gmail.com\");\n\n startService(registrationIntent);\n }", "public void setReceiverAddress(java.lang.String _receiverAddress)\n {\n receiverAddress = _receiverAddress;\n }", "public void setReceiverAddress(String receiverAddress) {\n this.receiverAddress = receiverAddress;\n }", "public void startReceiving() {\n\t\tHandlerThread handlerThread = new HandlerThread(\n\t\t\t\t\"DataExportationReceiverThread\");\n\t\thandlerThread.start();\n\t\tcallerContext.registerReceiver(this, new IntentFilter(\n\t\t\t\tDataExportationService.BROADCAST_ACTION), null, new Handler(\n\t\t\t\thandlerThread.getLooper()));\n\t}", "private void register(ICommunicationAddress sender) {\n\t\t\tRegister register = new Register(bidderId, groupToken);\n\t\t\t\n\t\t\tJiacMessage msg = new JiacMessage(register);\n\t\t\t\n\t\t\tIActionDescription sendAction = retrieveAction(ICommunicationBean.ACTION_SEND);\n\t\t\tinvoke(sendAction,new Serializable[] {msg, sender});\t\n\t\t}", "private void registerReceivers() { \n\t\t\n\t\tregisterReceiver ( mConnReceiver, new IntentFilter ( ConnectivityManager.CONNECTIVITY_ACTION ) );\n\t\n\t}", "private void setupRSSIsNRBroadcastReceiver() {\n broadcastReceiverRSSI = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n if (\"com.example.loravisual.RSSI_RECEIVED\".equals(intent.getAction())) {\n byte[] bytes = intent.getByteArrayExtra(\"com.example.loravisual.RSSISNR\");\n int rssi = LVUtil.makeByteUnsigned(bytes[1]);\n int bitErrors = LVUtil.makeByteUnsigned(bytes[3]);\n String rssiSnr = \"RSSI: -\" + rssi + \" SNR: \" + (bytes[2]);\n rssiSnrTextView.setText(rssiSnr);\n if (dbEntries == null) {\n dbEntries = new String[5];\n dbEntries[2] = \"-\" + rssi;\n dbEntries[3] = Byte.toString(bytes[2]);\n dbEntries[4] = Integer.toString(bitErrors);\n } else {\n dbEntries[2] = \"-\" + rssi;\n dbEntries[3] = Byte.toString(bytes[2]);\n dbEntries[4] = Integer.toString(bitErrors);\n databaseHandler.logReceivedTransmission(Integer.toString(experimentNumber), dbEntries);\n dbEntries = null;\n }\n }\n }\n };\n IntentFilter filter = new IntentFilter(\"com.example.loravisual.RSSI_RECEIVED\");\n registerReceiver(broadcastReceiverRSSI, filter);\n\n }", "public void setReceiverAddress(java.lang.String receiverAddress) {\r\n this.receiverAddress = receiverAddress;\r\n }", "private void initReceiver() {\n\t\tIntentFilter screenOnOffFilter = new IntentFilter(Intent.ACTION_SCREEN_OFF);\n\t\tscreenOnOffFilter.addAction(Intent.ACTION_SCREEN_ON);\n\t\tscreenOnOffFilter.addAction(Intent.ACTION_USER_PRESENT);\n\t\tscreenOnOffFilter.addAction(Intent.ACTION_PACKAGE_ADDED);\n\t\tscreenOnOffFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);\n\t\tscreenOnOffFilter.addDataScheme(\"package\");\n\t\treceiver1 = new ScreenLockReceiver();\n\t\tmContext.registerReceiver(receiver1, screenOnOffFilter);\n\t}", "void setReceiversImpl(java.lang.Class clazz);", "public void setReceiverQualifier(java.lang.String receiverQualifier) {\r\n this.receiverQualifier = receiverQualifier;\r\n }", "public void launchReceiver() {\n try {\n mCastClientListener = new Cast.Listener() {\n\n @Override\n public void onApplicationDisconnected(int errorCode) {\n Log.d(context.getString(R.string.LOGTAG), \"application has stopped\");\n teardown();\n }\n\n };\n // Connect to Google Play services\n mConnectionCallbacks = new ConnectionCallbacks();\n mConnectionFailedListener = new ConnectionFailedListener();\n Cast.CastOptions.Builder apiOptionsBuilder = Cast.CastOptions\n .builder(mSelectedDevice, mCastClientListener);\n mApiClient = new GoogleApiClient.Builder(this.context)\n .addApi(Cast.API, apiOptionsBuilder.build())\n .addConnectionCallbacks(mConnectionCallbacks)\n .addOnConnectionFailedListener(mConnectionFailedListener)\n .build();\n\n mApiClient.connect();\n } catch (Exception e) {\n Log.e(context.getString(R.string.LOGTAG), \"Failed launchReceiver\", e);\n }\n }", "private void m5312e() {\n Intent intent = new Intent(\"data.receiver\");\n intent.putExtra(\"isReLoginHK\", true);\n BaseApplication.m4925a().sendBroadcast(intent);\n }", "public DataBeadReceiver getReceiver() {\r\n\t\treturn receiver;\r\n\t}", "public void setReceiverName(String receiverName) {\n this.receiverName = receiverName;\n }", "public void setReceiverName(String receiverName) {\n this.receiverName = receiverName;\n }", "public void unregisterReceiver() {\n try {\n mContext.unregisterReceiver(mReceiver);\n } catch (IllegalArgumentException e) {\n }\n }", "public void mo5976m() {\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"com.android.activity.SoundRecorder.MARKRECEIVER\");\n registerReceiver(this.f5430ma, intentFilter);\n }", "public static Receiver getReceiver() {\n return receiver;\n }", "public void register() {\n unregister();\n Log.d(TAG, \"[register in eventbus]\");\n EventBus.getDefault().register(this);\n }", "private void registerWithService() {\n\n try {\n\n Message msg = Message.obtain(null, TallyDeviceService.MSG_REGISTER_MESSAGE_ACTIVITY);\n if (msg == null) { return; }\n msg.obj = this;\n msg.replyTo = messenger;\n service.send(msg);\n\n } catch (Exception e) {\n Log.e(LOG_TAG, \"Line 306 :: \" + e.getMessage());\n service = null;\n }\n\n }", "public void setSubscriber(ARDInstanceSubscriber subscriber);", "public String getReceiverId() {\n return receiverId;\n }", "public String getReceiver() {\n\t\treturn receiverId;\n\t}", "public void setReceiver(String address) throws MessagingException\r\n {\r\n String[] re = {address};\r\n setReceivers(re);\r\n }", "public void register(Context context) {\n IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);\n context.registerReceiver(this, filter);\n Log.d(TAG, \"ConnectionReceiver registered!\");\n }", "public Builder setReceiverid(int value) {\n bitField0_ |= 0x00000004;\n receiverid_ = value;\n onChanged();\n return this;\n }", "public void registerEventReceiver(Enum event, IModule module, EventReceiver eventReceiver) {\n eventQueue.registerEventReceiver(event, module, eventReceiver);\n }", "public void setReceiverAddress2(java.lang.String receiverAddress2) {\r\n this.receiverAddress2 = receiverAddress2;\r\n }", "private void unregisterBroadcastReceivers(){\n if (mBufferBroadcastIsRegistered)\n try {\n this.unregisterReceiver(BufferBroadcastReceiver);\n mBufferBroadcastIsRegistered=false;\n }catch (Exception e){\n e.printStackTrace();\n }\n\n /**unregister broadcastReceiver for seekBar*/\n if (mSeekBarBroadcastIsRegistered){\n try {\n this.unregisterReceiver(seekBarBroadcastReceiver);\n mSeekBarBroadcastIsRegistered=false;\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n\n /** register broadcastReceiver for afterCall alertDialog\n * in StopService in case of call while playing */\n\n }", "public void registerListener() {\n mPhone.listen(mPhoneStateListener,\n PhoneStateListener.LISTEN_SERVICE_STATE\n | PhoneStateListener.LISTEN_SIGNAL_STRENGTHS\n | PhoneStateListener.LISTEN_CALL_STATE\n | PhoneStateListener.LISTEN_DATA_CONNECTION_STATE\n | PhoneStateListener.LISTEN_DATA_ACTIVITY\n | PhoneStateListener.LISTEN_CARRIER_NETWORK_CHANGE);\n mContext.getContentResolver().registerContentObserver(Global.getUriFor(Global.MOBILE_DATA),\n true, mObserver);\n mContext.getContentResolver().registerContentObserver(Global.getUriFor(\n Global.MOBILE_DATA + mSubscriptionInfo.getSubscriptionId()),\n true, mObserver);\n /* SPRD: only show one sim icon after many time hotplug for bug 672530. @{ */\n if (mIsRegImsChange) {// SPRD: Bug 806908 add For VoWiFi icon\n Log.d(mTag, \"registerListener ,mIsVoLteBoard: \" + mIsVoLteBoard + \" address: \"\n + super.toString());\n IntentFilter filter = new IntentFilter();\n filter.addAction(ImsManager.ACTION_IMS_SERVICE_UP);\n filter.addAction(ImsManager.ACTION_IMS_SERVICE_DOWN);\n mContext.registerReceiver(mImsIntentReceiver, filter);\n // SPRD: modify for bug723743\n mIsImsReceiverRegistered = true;\n tryRegisterImsListener();\n }\n /* @} */\n // SPRD: modify for bug693456\n mContext.registerReceiver(mModemStateChangeReciver, new IntentFilter(ACTION_MODEM_CHANGE));\n // SPRD: modify for bug723743\n mIsModemReciverRegistered = true;\n /* SPRD: Dual volte signalStrength display for bug 666045. @{ */\n refreshDualVoLTEListener();\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(TelephonyIntents.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED);\n intentFilter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);\n mContext.registerReceiver(mReceiver, intentFilter);\n /* @} */\n }", "public void registerConnection(TCPReceiverThread receiverThread, String sourceID, String targetID);", "public void registerCallback() {\n if (mLocalManager == null) {\n Log.e(TAG, \"registerCallback() Bluetooth is not supported on this device\");\n return;\n }\n mLocalManager.setForegroundActivity(mFragment.getContext());\n mLocalManager.getEventManager().registerCallback(this);\n mLocalManager.getProfileManager().addServiceListener(this);\n forceUpdate();\n }", "@Override\n protected void onRegistered(Context context, String registrationId) {\n Log.i(TAG, \"Device registered: regId = \" + registrationId);\n UnityPlayer.UnitySendMessage(\"ECPNManager\",\"RegisterAndroidDevice\",registrationId);\n }", "public java.lang.String getReceiverId() {\r\n return receiverId;\r\n }", "public void setReceiverId(int v) \n {\n \n if (this.receiverId != v)\n {\n this.receiverId = v;\n setModified(true);\n }\n \n \n }", "@Override\n public void onResume() {\n super.onResume();\n registerReceiver(manager, intentFilter);\n }", "public void setReceiver(String receiver) {\n\t\tif (getSwiftMessage() == null) {\n\t\t\tthis.m = new SwiftMessage(true);\n\t\t}\n\t\tSwiftBlock2 b2 = getSwiftMessage().getBlock2();\n\t\tif (b2.isInput()) {\n\t\t\t((SwiftBlock2Input)b2).setReceiver(receiver);\n\t\t}\n\t}", "public Builder setReceiver(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n receiver_ = value;\n onChanged();\n return this;\n }", "public Builder receiver(String receiver) {\n\t\t\tentries.removeAll(getEntriesContainingKey(entries, MessageEntryKey.Receiver.toString()));\n\t\t\tentries.add(new AbstractMap.SimpleImmutableEntry<String, String>(MessageEntryKey.Receiver.toString(), receiver));\n\t\t\treturn this;\n\t\t}", "private void unregisterReceivers() {\n LocalBroadcastManager.getInstance(getActivity()).unregisterReceiver(userUpdater);\n postChangeController.unregisterReceivers(getActivity());\n }", "public void registerForEvents(Context context)\n {\n LocalBroadcastManager.getInstance(context).registerReceiver(\n mMessageReceiver, new IntentFilter(\"tts-event\"));\n }", "@Bean\n Receiver receiver() {\n return new Receiver();\n }", "public void subscribe(Player spectator) {\r\n\t\tspectators.add(spectator);\r\n\t}", "public Receiver(String name) {\n super(name);\n }", "private void unregisterReceivers() {\n \t\t\n\t\tunregisterReceiver(newReadingsReceiver);\n\t\tunregisterReceiver(sensorStatusReceiver);\n\t\tunregisterReceiver(servalMeshStatusReceiver);\n \t}", "public void startRecording() {\n heartRateBroadcastReceiver = new HeartRateBroadcastReceiver();\n LocalBroadcastManager.getInstance(activity).registerReceiver(heartRateBroadcastReceiver, new IntentFilter(LiveRecordingActivity.ACTION_RECEIVE_HEART_RATE));\n }", "private void register() {\n\t\tInetAddress iNA;\n\t\ttry {\n\t\t\tiNA = InetAddress.getLocalHost();\n\t\t\tmyIPAddress = iNA.getAddress();\n\t\t\tOverlayNodeSendsRegistration register = new OverlayNodeSendsRegistration(\n\t\t\t\t\tmyIPAddress, myServerThreadPortNum);\n\t\t\tthis.registry.getSender().sendData(register.getBytes());\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(e1.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t}\n\t}", "public void add(MessageReceiver msgReceiver) {\n subscribedMessageReceivers.add(msgReceiver);\n }", "public void initReceiver() {\n }", "public int getReceiverid() {\n return receiverid_;\n }", "public int getReceiverid() {\n return receiverid_;\n }", "public void setReceiverPhone(String receiverPhone) {\n this.receiverPhone = receiverPhone;\n }", "private void setupGeneralBroadcastReceiver() {\n generalBroadcastReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n if (\"com.example.loravisual.GENERAL_BROADCAST\".equals(intent.getAction())) {\n int status = intent.getIntExtra(\"com.example.loravisual.GENERAL\", 0);\n if (status == -2) {\n Toast.makeText(context, \"Sender device ready\", Toast.LENGTH_SHORT).show();\n getSupportActionBar().setSubtitle(getString(R.string.connected));\n }\n }\n }\n };\n IntentFilter filter = new IntentFilter(\"com.example.loravisual.GENERAL_BROADCAST\");\n registerReceiver(generalBroadcastReceiver, filter);\n }", "private void m6599P() {\n if (this.f5398R == null) {\n this.f5398R = new C1269Oa(this);\n registerReceiver(this.f5398R, new IntentFilter(\"android.vivo.bbklog.action.CHANGED\"));\n }\n }", "public Node send(Node receiver) {\n receiver.setChannelHint(channelHint);\n this.downstream.add(receiver);\n return receiver;\n }", "@Override \n protected void onResume() {\n\t super.onResume(); \n\t registerReceiver(mReceiver, mIntentFilter); \n }", "public void register(RegistrationData d) {}" ]
[ "0.747024", "0.739836", "0.6574229", "0.6402818", "0.6378896", "0.62283903", "0.6227552", "0.6157395", "0.6144067", "0.61326945", "0.608884", "0.6084777", "0.5996661", "0.59161854", "0.58933777", "0.5883116", "0.5868326", "0.5865344", "0.5851211", "0.5834283", "0.57589155", "0.57520455", "0.5740929", "0.5725957", "0.5711876", "0.56912225", "0.56886655", "0.5668466", "0.56568974", "0.56547564", "0.5632996", "0.56313527", "0.55786693", "0.5553638", "0.5550721", "0.5522923", "0.55138075", "0.55058664", "0.54313064", "0.5405909", "0.5346828", "0.534097", "0.5325405", "0.5306777", "0.528331", "0.52559674", "0.52452594", "0.5222028", "0.52080035", "0.5186699", "0.51787597", "0.5175555", "0.515815", "0.51560974", "0.5148435", "0.5133544", "0.51314557", "0.51314557", "0.5117559", "0.51097035", "0.5082581", "0.5068827", "0.5056648", "0.5048869", "0.5034887", "0.5012896", "0.50112706", "0.49966764", "0.49944568", "0.49932784", "0.49922052", "0.49918634", "0.4990474", "0.4968724", "0.49639004", "0.49561897", "0.49483404", "0.4926643", "0.49265128", "0.4925045", "0.49245042", "0.49212334", "0.49076912", "0.49031255", "0.4902754", "0.48882258", "0.48778766", "0.4865384", "0.4852493", "0.48513228", "0.4844415", "0.48437318", "0.48307183", "0.48271298", "0.48146486", "0.4811885", "0.48113084", "0.4794918", "0.47909474", "0.47788623" ]
0.60644174
12
Core of the class; calculates new motor speeds based on status
public void reviseMotorSpeed() { mHandler.removeMessages(EVAL_MOTOR_SPEED); long starttime = System.currentTimeMillis(); //Retrieve current orientation. mAzimuth = mStatus.getReadingField(AZIMUTH); mPitchDeg = mStatus.getReadingField(PITCH); mRollDeg = -mStatus.getReadingField(ROLL); double[] errors = new double[4]; synchronized (mAngleTarget) { //logArray("mAngleTarget", mAngleTarget); errors[0] = mAngleTarget[0] - mRollDeg; errors[1] = mAngleTarget[1] - mPitchDeg; errors[2] = mAngleTarget[2] - mStatus.getGpsField(dALT); errors[3] = mAngleTarget[3] - mAzimuth; //logArray("errors", errors); } @SuppressWarnings("unused") String errs = "errors: "; for (int i = 0; i < 4; i++) { errs += errors[i] + ": "; } //Log.v(TAG, errs); //For azimuth, multiple possibilities exist for error, each equally valid; but only the error nearest zero makes practical sense. if (errors[3] > 180.0) errors[3] -= 360.0; if (errors[3] < -180.0) errors[3] += 360.0; for (int i = 0; i < 4; i++) { //Calculate proportional errors double err = errors[i];//mTarget[i] - mCurrent[i]; //Calculate derivative errors. long timeInterval = starttime - mLastUpdate; if (timeInterval != 0) { mErrors[i][2] = (err - mErrors[i][0]) * 1000.0 / timeInterval; } else { mErrors[i][2] = 0.0; } //Mark proportional error mErrors[i][0] = err; /*if (i == 2) Log.v(TAG, "guid, dalt err is " + err);*/ //Update integral errors mErrors[i][1] -= mIntegralErrors[i][mIntegralIndex]; mIntegralErrors[i][mIntegralIndex] = err; mErrors[i][1] += err; mIntegralIndex = ++mIntegralIndex % PIDREPS; //Calculate changes in output for (int j = 0; j < 3; j++) { mControlVars[i] += mErrors[i][j] * mGain[i][j]; } } if (mGuidanceMode.get() == MANUAL) { synchronized (mAngleTarget) { mControlVars[2] = mAngleTarget[2]; } } mLastUpdate = starttime; // Constrain control vars: mControlVars[0] = constrainValue(mControlVars[0], -1, 1); mControlVars[1] = constrainValue(mControlVars[1], -1, 1); mControlVars[2] = constrainValue(mControlVars[2], 0, 1); mControlVars[3] = constrainValue(mControlVars[3], -2, 2); /*String vars = "Control vars: "; for (int i = 0; i < 4; i++) { vars += mControlVars[i] + ": "; } Log.v(TAG, vars);*/ controlVarsToMotorSpeeds(); //Send motor values to motors here: updateMotors(); updateAngleTarget(); //Log.v(TAG, "motors: " + mMotorSpeed[0] + ", " + mMotorSpeed[1] + ", " + mMotorSpeed[2] + ", " + mMotorSpeed[3]); //Sleep a while long timetonext = (1000 / PIDREPS) - (System.currentTimeMillis() - starttime); //Log.v(TAG, "time to next: " + timetonext); int currentMode = mGuidanceMode.get(); if ((currentMode == MANUAL) || (currentMode == AUTOPILOT)) { if (timetonext > 0) mHandler.sendEmptyMessageDelayed(EVAL_MOTOR_SPEED, timetonext); else { Log.e(TAG, "Guidance too slow"); mHandler.sendEmptyMessage(EVAL_MOTOR_SPEED); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateMotors() {\n\t\t//Pass filtered values to ChopperStatus.\n\t\tmStatus.setMotorFields(mMotorSpeed);\n\t\tString logline = Long.toString(System.currentTimeMillis()) + \" \" + mMotorSpeed[0] + \" \" + mMotorSpeed[1] + \" \" + mMotorSpeed[2] + \" \" + mMotorSpeed[3] + \"\\n\";\n\t\ttry {\n\t\t\tif (logfile != null) {\n\t\t\t\tlogfile.write(logline);\n\t\t\t\tlogfile.flush();\n\t\t\t}\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\t//Log.e(TAG, \"Cannot write to logfile\");\n\t\t}\n\t\t//Pass motor values to motor controller!\n\t\tMessage msg = Message.obtain();\n\t\tmsg.what = SEND_MOTOR_SPEEDS;\n\t\tmsg.obj = mMotorSpeed;\n\t\tmBt.sendMessageToHandler(msg);\n\t\t//Log.i(TAG, \"Guidance sending message.\");\n\t\t\n\t}", "private void run() {\n\n //if no time has elapsed, do not do anything\n if (Harness.getTime().equals(lastRunTime)) {\n return;\n }\n\n //double deltaV, deltaX;\n double newSpeed;\n double newPosition;\n double targetSpeed = 0;\n double currentSpeed = 0;\n double acceleration = 0;\n\n switch (driveOrderedState.speed()) {\n case STOP:\n targetSpeed = 0.0;\n break;\n case LEVEL:\n targetSpeed = LevelingSpeed;\n break;\n case SLOW:\n targetSpeed = SlowSpeed;\n break;\n case FAST:\n targetSpeed = FastSpeed;\n break;\n default:\n throw new RuntimeException(\"Unknown speed\");\n }\n /*\n * JDR Bug fix to make the speed stop in the case where the command is\n * Direction=STOP but speed is something other than STOP.\n */\n if (driveOrderedState.direction() == Direction.STOP) {\n targetSpeed = 0.0;\n }\n if (driveOrderedState.direction() == Direction.DOWN) {\n targetSpeed *= -1;\n }\n\n currentSpeed = driveSpeedState.speed();\n if (driveSpeedState.direction() == Direction.DOWN) {\n currentSpeed *= -1;\n }\n\n if (Math.abs(targetSpeed) > Math.abs(currentSpeed)) {\n //need to accelerate\n acceleration = Acceleration;\n } else if (Math.abs(targetSpeed) < Math.abs(currentSpeed)) {\n //need to decelerate\n acceleration = -1 * Deceleration;\n } else {\n acceleration = 0;\n }\n if (currentSpeed < 0) {\n //reverse everything for negative motion (going down)\n acceleration *= -1;\n }\n\n //get the time offset in seconds since the last update\n double timeOffset = SimTime.subtract(Harness.getTime(), lastRunTime).getFracSeconds();\n //remember this time as the last update\n lastRunTime = Harness.getTime();\n\n //now update speed\n //deltav = at\n newSpeed = currentSpeed + (acceleration * timeOffset);\n\n //deltax= vt+ 1/2 at^2\n newPosition = carPositionState.position() +\n (currentSpeed * timeOffset) + \n (0.5 * acceleration * timeOffset * timeOffset);\n if ((currentSpeed < targetSpeed &&\n newSpeed > targetSpeed) ||\n (currentSpeed > targetSpeed &&\n newSpeed < targetSpeed)) {\n //if deltaV causes us to exceed the target speed, set the speed to the target speed\n driveSpeedState.setSpeed(Math.abs(targetSpeed));\n } else {\n driveSpeedState.setSpeed(Math.abs(newSpeed));\n }\n //determine the direction\n if (driveSpeedState.speed() == 0) {\n driveSpeedState.setDirection(Direction.STOP);\n } else if (targetSpeed > 0) {\n driveSpeedState.setDirection(Direction.UP);\n } else if (targetSpeed < 0) {\n driveSpeedState.setDirection(Direction.DOWN);\n }\n carPositionState.set(newPosition);\n\n physicalConnection.sendOnce(carPositionState);\n physicalConnection.sendOnce(driveSpeedState);\n\n log(\" Ordered State=\", driveOrderedState,\n \" Speed State=\", driveSpeedState,\n \" Car Position=\", carPositionState.position(), \" meters\");\n }", "protected void execute() {\n \t// Scales the speed based on a proportion of ideal voltage over actual voltage\n \tRobot.shooter.talon.set(0.59 * (12.5 / Robot.pdp.getVoltage()));\n// \tRobot.shooter.talon.enable();\n// \tRobot.shooter.talon.set(Shooter.IDEAL_SPEED * (12.5 / Robot.pdp.getVoltage()));\n }", "public abstract double getSpeed();", "public final void modifyMotorcycle(){\r\n \tgetOffer();\r\n \tgetExhaustSystem();\r\n \tgetTires();\r\n getWindshield();\r\n getLED();\r\n getEngineGuards();\r\n /* Note that any of this methods \r\n \t * could provide a default implementation \r\n \t * by being concretely defined\r\n \t */\r\n }", "@Override\r\n protected void execute() {\n driveSubsystem.setSpeed(speed, speed);\r\n }", "void changeUpdateSpeed();", "@Override\n\tpublic int getMotorSpeed() {\n\t\tupdateIR();\n\t\treturn direction*360;\n\t}", "public double getCurrentSpeed();", "@Override\r\n public void runOpMode() {\n robot.init(hardwareMap);\r\n\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n telemetry.update();\r\n\r\n //Wait for the Pressing of the Start Button\r\n waitForStart();\r\n\r\n // run until the end of the match (driver presses STOP)\r\n while (opModeIsActive()) {\r\n\r\n motorSpeed[0] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[0];\r\n motorSpeed[1] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[1];\r\n motorSpeed[2] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[2];\r\n motorSpeed[3] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[3];\r\n\r\n robot.drive1.setPower(motorSpeed[0]);\r\n robot.drive1.setPower(motorSpeed[1]);\r\n robot.drive1.setPower(motorSpeed[2]);\r\n robot.drive1.setPower(motorSpeed[3]);\r\n\r\n telemetry.addData(\"Drive 1 Speed\", motorSpeed[0]);\r\n telemetry.addData(\"Drive 2 Speed\", motorSpeed[1]);\r\n telemetry.addData(\"Drive 3 Speed\", motorSpeed[2]);\r\n telemetry.addData(\"Drive 4 Speed\", motorSpeed[3]);\r\n telemetry.update();\r\n\r\n }\r\n }", "private void configVelocityControl() {\n //config remote sensors\n //sets the sensor to be a quad encoder, sets our feedback device to be that sensor\n m_masterMotor.configSelectedFeedbackSensor(TalonSRXFeedbackDevice.CTRE_MagEncoder_Relative, RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //zero the encoders on every init\n zeroEncoder();\n\n //sets whether our motor is inverted\n //this is currently false but can be switched based on testing\n m_masterMotor.setInverted(RobotMap.LAUNCHER_MASTER_INVERTED);\n m_masterMotor.setSensorPhase(RobotMap.LAUNCHER_MASTER_INVERTED);\n\n //this sets how often we pull data from our sensor\n m_masterMotor.setStatusFramePeriod(StatusFrame.Status_2_Feedback0, RobotMap.LAUNCHER_FEEDBACK_PERIOD_MS, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //this configs the deadband for the PID output. Any output with an absolute value less than this will be treated as zero\n m_masterMotor.configNeutralDeadband(0, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //this sets the peak output for our motor controller.\n m_masterMotor.configPeakOutputForward(RobotMap.LAUNCHER_PID_PEAK_OUTPUT, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n //this does the same thing but for the reverse direction\n m_masterMotor.configPeakOutputReverse(0, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n \n //sets the period of the velocity sample\n //effectively this defines the amount of time used to calculate the velocity\n m_masterMotor.configVelocityMeasurementPeriod(RobotMap.VELOCITY_MEASUREMENT_PERIOD, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //Sets the number of samples used in the rolling average for calculating velocity\n m_masterMotor.configVelocityMeasurementWindow(RobotMap.LAUNCHER_VELOCITY_MEASUREMENT_WINDOW, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n \n //set p, i, d, f values\n //the zero is the PID slot, in this case it is zero for the primary PID\n //the launcher has no auxillary or turning PID control\n m_masterMotor.config_kP(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_P);\n m_masterMotor.config_kI(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_I);\n m_masterMotor.config_kD(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_D);\n m_masterMotor.config_kF(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_F);\n\n //this sets the acceptable amount of Integral error, where if the absolute accumulated error exceeds this ammount, it resets to zero\n //this is designed to prevent the PID from going crazy if we move too far from our target\n m_masterMotor.config_IntegralZone(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_I_ZONE, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //sets the max output of the motor specifically within closed loop control\n m_masterMotor.configClosedLoopPeakOutput(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_PID_PEAK_OUTPUT, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //this configures an allowable error in closed loop control\n //any error less than this is treated as zero.\n m_masterMotor.configAllowableClosedloopError(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_ACCEPTABLE_ERROR, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //configures the period for closed loop calculations in MS \n //should be increased if the can bus is haveing issues\n m_masterMotor.configClosedLoopPeriod(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_CLOSED_LOOP_PERIOD_MS, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //configures ramp speed\n m_masterMotor.configOpenloopRamp(RobotMap.LAUNCHER_OPEN_LOOP_RAMP_TIME_S);\n m_masterMotor.configClosedloopRamp(0);\n\n //sets our closed loop control to use our primary PID slot\n m_masterMotor.selectProfileSlot(RobotMap.PID_PRIMARY_SLOT, 0);\n }", "@Override\r\n\tpublic void speed() {\n\t}", "@Override\npublic int accelerate(int speed) {\n\tint carSpeed=getSpeed();\n\treturn carSpeed;\n}", "@Override\n public void periodic() {\n\t\t// myDrive.\n\n\t\t// System.out.println(Robot.m_oi.getSpeed());\n\t\t// SmartDashboard.putNumber(\"Dial Output: \", Robot.m_oi.getSpeed());\n\n\t\t// //Wheel Speed Limits\n\n\t\t// SmartDashboard.putNumber(\"Front Left Percent\", myDrive.getFLSpeed());\n\t\t// SmartDashboard.putNumber(\"Front Right Percent\", myDrive.getFRSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Left Percent\", myDrive.getRLSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Right Percent\", myDrive.getRRSpeed());\n\n\t\t//Test Code for Selecting Calibration Motor \n\t\t//***COMMENT OUT BEFORE REAL GAME USE***\n\t\t// if (Robot.m_oi.getArmDown()) {\n\t\t// \t// System.out.println(\"Front Left Wheel Selected\");\n\t\t// \tWheel = 1;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getArmUp()) {\n\t\t// \t// System.out.println(\"Back Left Wheel Selected\");\n\t\t// \tWheel = 2;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallIn()) {\n\t\t// \t// System.out.println(\"Front Right Wheel Selected\");\n\t\t// \tWheel = 3;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallOut()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 4;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBlueButton()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 0;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t// } \n\n\t\t// if (Wheel == 1) {\n\n\t\t// \tmyDrive.setFLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 2) {\n\n\t\t// \tmyDrive.setRLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 3) {\n\n\t\t// \tmyDrive.setFRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 4) {\n\n\t\t// \tmyDrive.setRRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// }\n\n\t\t// if (Robot.m_oi.getSafety()) {\n\n\t\t// \tspeedLimit = 1.0;\n\t\t// \tstrafeLimit = 1.0;\n\n\t\t// } else {\n\n\t\t// \tspeedLimit = 0.5; \n\t\t// \tstrafeLimit = 0.8;\n\t\t\t\t\n\t\t// }\n\n\n\n\t\t//System.out.print (\"strafeLimit: \" + strafeLimit);\n\t\t//System.out.println(Robot.m_oi.getX() * strafeLimit);\n\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY() * speedLimit), // set Y speed\n\t\t// \t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t// \t(Robot.m_oi.getRotate() * rotateLimit), // set rotation rate\n\t\t// \t0); // gyro angle \n\t\t\n\t\t//TODO: Rotate robot with vision tracking, set up curve to slow down as target approaches center.\n\t\t// if (Robot.m_oi.getStartButton()) {\n\t\t// \tmyDrive.driveCartesian(\n\t\t// \t\t (0.4), // set Rotation\n\t\t// \t\t (0.0), // set Strafe\n\t\t// \t\t (0.0), // set Forward/Back\n\t\t// \t\t 0);\n\t\t// } else {\n\t\tmyDrive.driveCartesian(\n\t\t\t(Robot.m_oi.getY() * rotateLimit), // set Y speed\n\t\t\t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t\t(Robot.m_oi.getRotate() * speedLimit), // set rotation rate\n\t\t\t0);\n\t\t// }\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY()), // set Y speed\n\t\t// \t(Robot.m_oi.getX()), // set X speed\n\t\t// \t(Robot.m_oi.getRotate()), // set rotation rate\n\t\t// \t0); \n\n }", "public abstract int getSpeed();", "public abstract int getSpeed();", "public abstract void decelerateMotorSpeeds(double[] motorSpeeds, double distanceToTarget, double lastDistanceToTarget, long timeSinceLastCallNano, double configuredMovementSpeed, double configuredTurnSpeed);", "public void updateDrive () {\n leftCurrSpeed = scale (leftCurrSpeed, leftTargetSpeed, Constants.Drivetrain.ACCELERATION_SCALING, Constants.Drivetrain.ACCELERATION_THRESHOLD);\n rightCurrSpeed = scale (rightCurrSpeed, rightTargetSpeed, Constants.Drivetrain.ACCELERATION_SCALING, Constants.Drivetrain.ACCELERATION_THRESHOLD);\n driveRaw (leftCurrSpeed, rightCurrSpeed);\n }", "public void init() {\n delayingTimer = new ElapsedTime();\n\n // Define and Initialize Motors and Servos: //\n tailMover = hwMap.dcMotor.get(\"tail_lift\");\n grabberServo = hwMap.servo.get(\"grabber_servo\");\n openGrabber();\n\n // Set Motor and Servo Directions: //\n tailMover.setDirection(DcMotorSimple.Direction.FORWARD);\n\n tailMover.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n tailMover.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n int prevEncoder = tailMover.getCurrentPosition();\n tailMover.setPower(-0.15);\n mainHW.opMode.sleep (300);\n Log.d(\"catbot\", String.format(\"tail lift power %.2f current position %2d prev %2d\", tailMover.getPower(), tailMover.getCurrentPosition(),prevEncoder));\n runtime.reset();\n while((Math.abs(prevEncoder - tailMover.getCurrentPosition()) > 10)&& (runtime.seconds()<3.0)){\n prevEncoder = tailMover.getCurrentPosition();\n mainHW.opMode.sleep(300);\n Log.d(\"catbot\", String.format(\"tail lift power %.2f current position %2d prev %2d\", tailMover.getPower(), tailMover.getCurrentPosition(),prevEncoder));\n }\n tailMover.setPower(0.0);\n // Set Motor and Servo Modes: //\n tailMover.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n tailMover.setTargetPosition(0);\n tailMover.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n closeGrabber();\n }", "public void teleopPeriodic() {\n\n \t//NetworkCommAssembly.updateValues();\n \t\n\t\t// both buttons pressed simultaneously, time to cal to ground\n\t\tif (gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON1) && gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON2)) {\n\t\t\tprocessGroundCal();\n\t\t}\n\n\t\t// PID CONTROL ONLY\n\t\tdouble armDeltaPos = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armDeltaPos) < ARM_DEADZONE) {\n\t\t\tarmDeltaPos = 0.0f;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarmDeltaPos *= ARM_POS_MULTIPLIER;\n\t\t\tdouble currPos = testMotor.getPosition();\n\t\t\t\n\t\t\tif (((currPos > SOFT_ENCODER_LIMIT_MAX) && armDeltaPos > 0.0) || ((currPos < SOFT_ENCODER_LIMIT_FLOOR) && armDeltaPos < 0.0)) {\n\t\t\t\tSystem.out.println(\"SOFT ARM LIMIT HIT! Setting armDeltaPos to zero\");\n\t\t\t\tarmDeltaPos = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tdouble newPos = currPos + armDeltaPos;\n\t\t\ttestMotor.set(newPos);\n\t\t\tSystem.out.println(\"Setting new front arm pos = \" + newPos);\t\n\t\t}\t\t\n\n \t/*\n\t\tdouble newArmPos = gamepad.getRawAxis(1);\n\t\tif(Math.abs(newArmPos) <= ARM_DEADZONE) {\n\t\t\tnewArmPos = 0.0;\n\t\t}\n\t\tdouble newMotorPos = (newArmPos * ARM_SPEED_MULTIPLIER) + testMotor.getPosition();\n\t\tpositionMoveByCount(newMotorPos);\n\t\tSystem.out.println(\"input = \" + newArmPos + \" target pos = \" + newMotorPos + \" enc pos = \" + testMotor.getPosition());\n \t*/\n \t\n\t\t// PercentVbus test ONLY!!\n \t/*\n\t\tdouble armSpeed = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armSpeed) < ARM_DEADZONE) {\n\t\t\tarmSpeed = 0.0f;\n\t\t}\t\n\t\tarmSpeed *= ARM_MULTIPLIER;\n\t\t\n\t\tdouble pos= testMotor.getPosition();\n\t\tif (((pos > SOFT_ENCODER_LIMIT_1) && armSpeed < 0.0) || ((pos < SOFT_ENCODER_LIMIT_2) && armSpeed > 0.0))\n\t\t\tarmSpeed = 0.0;\n\t\ttestMotor.set(armSpeed);\n\t\t\n\t\tSystem.out.println(\"armSpeed = \" + armSpeed + \" enc pos = \" + testMotor.getPosition());\n\t\t */ \n }", "public void setCurrentSpeed (double speed);", "protected void execute() {\n \n \t\n \t \n \t\n \n System.out.println((Timer.getFPGATimestamp()- starttime ) + \",\" + (RobotMap.motorLeftTwo.getEncPosition()) + \",\"\n + (RobotMap.motorLeftTwo.getEncVelocity()*600)/-4096 + \",\" + RobotMap.motorRightTwo.getEncPosition() + \",\" + (RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n /*if(endpoint > 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft+ angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight - angleorientation.getResult());\n }\n if(endpoint <= 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft- angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight + angleorientation.getResult());\n }*/\n System.out.println(this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition() + \"l\");\n System.out.println(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition() + \"r\");\n \n \n \t if(RobotMap.motorLeftTwo.getEncVelocity()!= velocityLeft)\n velocityLeft = RobotMap.motorLeftTwo.getEncVelocity(); \n velocityRight = RobotMap.motorRightTwo.getEncVelocity();\n SmartDashboard.putNumber(\"LeftWheelError\", (this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition()));\n SmartDashboard.putNumber(\"RightWheelError\",(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition()));\n SmartDashboard.putNumber(\"LeftWheelVelocity\", (RobotMap.motorLeftTwo.getEncVelocity())*600/4096);\n SmartDashboard.putNumber(\"RightWheelVelocity\",(RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n \n count++;\n \tangleorientation.updatePID(RobotMap.navx.getAngle());\n }", "protected void execute() {\r\n\t//double leftSpeed = oi.leftUpAndDown();\r\n\tdouble leftSpeed = motorScalerLeft.scale(oi.leftUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\leftSpeed\", leftSpeed);\r\n\t\r\n\t//double rightSpeed = oi.rightUpAndDown();\r\n\tdouble rightSpeed = motorScalerRight.scale(oi.rightUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\rightSpeed\", rightSpeed);\r\n\t\r\n\ttheDrive.goVariable(-leftSpeed,-rightSpeed);\r\n }", "public void refreshMovementSpeed(){\n\t\tif(orientation==ORIENTATION.RIGHT) moveRight();\n\t\telse if(orientation==ORIENTATION.LEFT) moveLeft();\n\t\telse if(orientation==ORIENTATION.UP) moveUp();\n\t\telse if(orientation==ORIENTATION.DOWN) moveDown();\n\t}", "public double getSpeed();", "@Override\n public void runOpMode () {\n motor1 = hardwareMap.get(DcMotor.class, \"motor1\");\n motor2 = hardwareMap.get(DcMotor.class, \"motor2\");\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n //Wait for game to start (driver presses PLAY)\n waitForStart();\n\n /*\n the overridden runOpMode method happens with every OpMode using the LinearOpMode type.\n hardwareMap is an object that references the hardware listed above (private variables).\n The hardwareMap.get method matches the name of the device used in the configuration, so\n we would have to change the names (ex. motorTest to Motor 1 or Motor 2 (or something else))\n if not, the opMode won't recognize the device\n\n in the second half of this section, it uses something called telemetry. In the first and\n second lines it sends a message to the driver station saying (\"Status\", \"Initialized\") and\n then it prompts the driver to press start and waits. All linear functions should have a wait\n for start command so that the robot doesn't start executing the commands before the driver\n wants to (or pushes the start button)\n */\n\n //run until end of match (driver presses STOP)\n double tgtpower = 0;\n while (opModeIsActive()) {\n telemetry.addData(\"Left Stick X\", this.gamepad1.left_stick_x);\n telemetry.addData(\"Left Stick Y\", this.gamepad1.left_stick_y);\n telemetry.addData(\"Right Stick X\", this.gamepad1.right_stick_x);\n telemetry.addData(\"Right Stick Y\", this.gamepad1.right_stick_y);\n if (this.gamepad1.left_stick_y < 0){\n tgtpower=-this.gamepad1.left_stick_y;\n motor1.setPower(tgtpower);\n motor2.setPower(-tgtpower);\n }else if (this.gamepad1.left_stick_y > 0){\n tgtpower=this.gamepad1.left_stick_y;\n motor1.setPower(-tgtpower);\n motor2.setPower(tgtpower);\n }else if (this.gamepad1.left_stick_x > 0){\n tgtpower=this.gamepad1.left_stick_x;\n motor1.setPower(tgtpower);\n motor2.setPower(tgtpower);\n }else if (this.gamepad1.left_stick_x < 0){\n tgtpower=-this.gamepad1.left_stick_x;\n motor1.setPower(-tgtpower);\n motor2.setPower(-tgtpower);\n }else{\n motor1.setPower(0);\n motor2.setPower(0);\n }\n telemetry.addData(\"Motor1 Power\", motor1.getPower());\n telemetry.addData(\"Motor2 Power\", motor2.getPower());\n telemetry.addData(\"Status\", \"Running\");\n telemetry.update ();\n\n\n /*\n if (this.gamepad1.right_stick_x == 1){\n //trying to make robot turn right, == 1 may be wrong\n motor2.setPower(-1);\n }\n else if (this.gamepad1.right_stick_x == -1){\n //trying to make robot turn left, == -1 may be wrong\n motor1.setPower(-1);\n }\n else {\n\n }\n */\n\n\n /*\n After the driver presses start,the opMode enters a while loop until the driver presses stop,\n while the loop is running it will continue to send messages of (\"Status\", \"Running\") to the\n driver station\n */\n\n\n }\n }", "@Override\n public void execute() {\n if(reversed) {\n driveSubsystem.setSpeed(-max_speed, -max_speed);\n }\n driveSubsystem.setSpeed(max_speed, max_speed);\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}", "private void setSpeed() {\n double cVel = cAccel*0.1;\n speed += round(mpsToMph(cVel), 2);\n speedOutput.setText(String.valueOf(speed));\n }", "public void setSpeed() {\n //assigns the speed based on the shuffleboard with a default value of zero\n double tempSpeed = setpoint.getDouble(0.0);\n\n //runs the proportional control system based on the aquired speed\n controlRotator.proportionalSpeedSetter(tempSpeed);\n }", "@Override\n public void runOpMode() {\n servo0 = hardwareMap.servo.get(\"servo0\");\n servo1 = hardwareMap.servo.get(\"servo1\");\n digital0 = hardwareMap.digitalChannel.get(\"digital0\");\n motor0 = hardwareMap.dcMotor.get(\"motor0\");\n motor1 = hardwareMap.dcMotor.get(\"motor1\");\n motor0B = hardwareMap.dcMotor.get(\"motor0B\");\n motor2 = hardwareMap.dcMotor.get(\"motor2\");\n blinkin = hardwareMap.get(RevBlinkinLedDriver.class, \"blinkin\");\n motor3 = hardwareMap.dcMotor.get(\"motor3\");\n park_assist = hardwareMap.dcMotor.get(\"motor3B\");\n\n if (digital0.getState()) {\n int_done = true;\n } else {\n int_done = false;\n }\n motor_stuff();\n waitForStart();\n if (opModeIsActive()) {\n while (opModeIsActive()) {\n lancher_position();\n slow_mode();\n drive_robot();\n foundation_grabber(1);\n launcher_drive();\n data_out();\n Pickingupblockled();\n lettingoutblockled();\n Forwardled();\n backwardled();\n Turnleftled();\n Turnrightled();\n Stationaryled();\n }\n }\n }", "protected void initialize() {\n \t starttime = Timer.getFPGATimestamp();\n \tthis.startAngle = RobotMap.navx.getAngle();\n \tangleorientation.setSetPoint(RobotMap.navx.getAngle());\n \t\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \n //settting talon control mode\n \tRobotMap.motorLeftTwo.changeControlMode(TalonControlMode.MotionMagic);\t\t\n\t\tRobotMap.motorLeftOne.changeControlMode(TalonControlMode.Follower);\t\n\t\tRobotMap.motorRightTwo.changeControlMode(TalonControlMode.MotionMagic);\t\n\t\tRobotMap.motorRightOne.changeControlMode(TalonControlMode.Follower);\n\t\t//setting peak and nominal output voltage for the motors\n\t\tRobotMap.motorLeftTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorLeftTwo.configNominalOutputVoltage(0.00f, 0.0f);\n\t\tRobotMap.motorRightTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorRightTwo.configNominalOutputVoltage(0.0f, 0.0f);\n\t\t//setting who is following whom\n\t\tRobotMap.motorLeftOne.set(4);\n\t\tRobotMap.motorRightOne.set(3);\n\t\t//setting pid value for both sides\n\t//\tRobotMap.motorLeftTwo.setCloseLoopRampRate(1);\n\t\tRobotMap.motorLeftTwo.setProfile(0);\n\t RobotMap.motorLeftTwo.setP(0.000014f);\n \tRobotMap.motorLeftTwo.setI(0.00000001);\n\t\tRobotMap.motorLeftTwo.setIZone(0);//325);\n\t\tRobotMap.motorLeftTwo.setD(1.0f);\n\t\tRobotMap.motorLeftTwo.setF(this.fGainLeft+0.014);//0.3625884);\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t RobotMap.motorRightTwo.setCloseLoopRampRate(1);\n\t RobotMap.motorRightTwo.setProfile(0);\n\t\tRobotMap.motorRightTwo.setP(0.000014f);\n\t\tRobotMap.motorRightTwo.setI(0.00000001);\n\t\tRobotMap.motorRightTwo.setIZone(0);//325);\n\t\tRobotMap.motorRightTwo.setD(1.0f);\n\t\tRobotMap.motorRightTwo.setF(this.fGainRight);// 0.3373206);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t\t//setting Acceleration and velocity for the left\n\t\tRobotMap.motorLeftTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorLeftTwo.setMotionMagicCruiseVelocity(250);\n\t\t//setting Acceleration and velocity for the right\n\t\tRobotMap.motorRightTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorRightTwo.setMotionMagicCruiseVelocity(250);\n\t\t//resets encoder position to 0\t\t\n\t\tRobotMap.motorLeftTwo.setEncPosition(0);\n\t\tRobotMap.motorRightTwo.setEncPosition(0);\n\t //Set Allowable error for the loop\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(300);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(300);\n\t\t\n\t\t//sets desired endpoint for the motors\n RobotMap.motorLeftTwo.set(motionMagicEndPoint);\n RobotMap.motorRightTwo.set(-motionMagicEndPoint );\n \t\n }", "public double getCurrentSpeed(){\r\n return speed;\r\n }", "private void setSpeedValues(){\n minSpeed = trackingList.get(0).getSpeed();\n maxSpeed = trackingList.get(0).getSpeed();\n averageSpeed = trackingList.get(0).getSpeed();\n\n double sumSpeed =0.0;\n for (TrackingEntry entry:trackingList) {\n\n sumSpeed += entry.getSpeed();\n\n //sets min Speed\n if (minSpeed > entry.getSpeed()){\n minSpeed = entry.getSpeed();\n }\n //sets max Speed\n if (maxSpeed < entry.getSpeed()) {\n maxSpeed = entry.getSpeed();\n }\n\n }\n\n averageSpeed = sumSpeed/trackingList.size();\n }", "public double getCommandSpeed();", "protected void execute()\n\t{\n\t\tdouble speed = Robot.oi.getActuatorSpeed();\n\t\t// Treat a zone around the center position as zero to prevent fluctuating\n\t\t// motor speeds when the joystick is at rest in the center position.\n\t\tRobot.linearActuator.setSpeed(Math.abs(speed) >= .1 ? speed : 0);\n\t}", "double getSpeed();", "@Override\n public void execute() {\n double rightTriggerValue = RobotContainer.joystickDriver.getRawAxis(Ports.OIDriverSlowmode);\n m_subsystem.setSlowmode((rightTriggerValue >= TuningParams.SLOWMODE_TRIGGER_THRESHOLD) ? true : false);\n\n double speedLeft = RobotContainer.joystickDriver.getFilteredAxis(Ports.OIDriverLeftDrive);\n double speedRight = RobotContainer.joystickDriver.getFilteredAxis(Ports.OIDriverRightDrive);\n m_subsystem.setSpeeds(speedLeft, speedRight);\n }", "@Override\n public void runOpMode(){\n motors[0][0] = hardwareMap.dcMotor.get(\"frontLeft\");\n motors[0][1] = hardwareMap.dcMotor.get(\"frontRight\");\n motors[1][0] = hardwareMap.dcMotor.get(\"backLeft\");\n motors[1][1] = hardwareMap.dcMotor.get(\"backRight\");\n // The motors on the left side of the robot need to be in reverse mode\n for(DcMotor[] motor : motors){\n motor[0].setDirection(DcMotor.Direction.REVERSE);\n }\n // Being explicit never hurt anyone, right?\n for(DcMotor[] motor : motors){\n motor[1].setDirection(DcMotor.Direction.FORWARD);\n }\n\n waitForStart();\n\n //Kill ten seconds\n runtime.reset();\n while(runtime.seconds()<10); runtime.reset();\n\n while(runtime.milliseconds()<700){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(100);\n // Set right motor power\n motor[1].setPower(100);\n }\n }\n\n while(runtime.milliseconds()<200){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(-100);\n // Set right motor power\n motor[1].setPower(-100);\n }\n }\n\n runtime.reset();\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(0);\n // Set right motor power\n motor[1].setPower(0);\n }\n }", "@Override\n protected void execute() {\n \n //get velocity from SmartDashboard\n double m_sideVelocity = SmartDashboard.getNumber(\"Side Velocity\", 0);\n double m_beltVelocity = SmartDashboard.getNumber(\"Belt velocity\", 0);\n // if velocity coefficients on SmartDashboard have changed, write new values to controller\n \n Robot.CD7.setSideMotor(m_sideVelocity);\n Robot.CD7.setBeltMotor(m_beltVelocity);\n }", "private void updatePointSpeeds() {\n\t\tfor (int i = 0; i < locations.size(); i++) {\n\t\t\tLocationStructure loc = locations.get(i);\t\t\n\t\t\tDouble dist = Double.MIN_VALUE;\n\t\t\tDouble lat1 = loc.getLatitude().doubleValue();\n\t\t\tDouble lon1 = loc.getLongitude().doubleValue();\n\t\t\t\n\t\t\tDate d = times.get(i);\n\t\t\t\n\t\t\tif( i+1 < locations.size()) {\n\t\t\t\tloc = locations.get(i+1);\n\t\t\t\tDouble lat2 = loc.getLatitude().doubleValue();\n\t\t\t\tDouble lon2 = loc.getLongitude().doubleValue();\n\t\t\t\tdist = calculateDistance(lat1, lon1, lat2, lon2);\n\t\t\t\t\n\t\t\t\tDate d1 = times.get(i+1);\n\t\t\t\tDateTime dt1 = new DateTime(d);\n\t\t\t\tDateTime dt2 = new DateTime(d1);\n\t\t\t\tint seconds = Seconds.secondsBetween(dt1, dt2).getSeconds();\t\t\t\n\t\t\t\tDouble pd = (dist/seconds)*60;\n\t\t\t\tif(!pd.isNaN()) {\n\t\t\t\t\tpointSpeed.add(pd);\t\t\n\t\t\t\t\tSystem.out.println(\"BUS STATE-- Added point speed of \"+ (dist/seconds)*60 + \" for \" +this.vehicleRef);\n\t\t\t\t}\n\t\t\t} else break;\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n public void execute() {\n\n DifferentialDriveWheelPowers powers = mBasicDrive.drive(mThrottle.getAsDouble(), mTurn.getAsDouble(), mTrim.getAsDouble());\n\n DifferentialDriveWheelSpeeds speeds = new DifferentialDriveWheelSpeeds(\n powers.getLeft() * Constants.Drive.kFeedforward.maxAchievableVelocity(Constants.Robot.kMinBatteryVoltage, 0.0),\n powers.getRight() * Constants.Drive.kFeedforward.maxAchievableVelocity(Constants.Robot.kMinBatteryVoltage, 0.0));\n\n mDriveSubsystem.setVelocity(speeds, mDeadband);\n }", "@Override\n public void processUSData(int distance) {\n filter(distance);\n int distanceDiff = BAND_CENTER - this.distance; //the difference between the actual distance and bandcenter\n \n\n //when the distanceDiff is small , no need to adjust the speeds\n if (Math.abs(distanceDiff) <= BAND_WIDTH ) {\n LEFT_MOTOR.setSpeed(MOTOR_HIGH); \n RIGHT_MOTOR.setSpeed(MOTOR_HIGH);\n LEFT_MOTOR.forward();\n RIGHT_MOTOR.forward();\n }\n // if it is too close, back away so that the robot does not \n // touch the wall(for quick turn at the corner)\n else if (this.distance < 35) {\n LEFT_MOTOR.setSpeed(MOTOR_HIGH); \n RIGHT_MOTOR.setSpeed(MOTOR_HIGH + 40);\n LEFT_MOTOR.forward();\n RIGHT_MOTOR.backward();\n }\n //when the difference is within the accepted range\n else if (Math.abs(distanceDiff) <= MAX_DISTANCE_DIFF ){\n //when the actual distance is larger than the bandcenter\n //turn to the left slightly\n if(distanceDiff < 0) {\n LEFT_MOTOR.setSpeed(MOTOR_HIGH - 30); \n RIGHT_MOTOR.setSpeed(MOTOR_HIGH + 30);\n LEFT_MOTOR.forward();\n RIGHT_MOTOR.forward();\n }\n //when the actual distance is smaller than the bandcenter\n //turn to the right slightly\n else if (distanceDiff > 0) {\n LEFT_MOTOR.setSpeed(MOTOR_HIGH + 30); \n RIGHT_MOTOR.setSpeed(MOTOR_HIGH - 30);\n LEFT_MOTOR.forward();\n RIGHT_MOTOR.forward();\n }\n }\n //when the difference is not in the accepted range\n else if (Math.abs(distanceDiff) > MAX_DISTANCE_DIFF) {\n //when the actual distance is way smaller than the bandcenter\n //make a turn to the right so that the robot is not very far from the wall\n if (distanceDiff > 0) {\n LEFT_MOTOR.setSpeed(200); \n RIGHT_MOTOR.setSpeed(100);\n LEFT_MOTOR.forward();\n RIGHT_MOTOR.forward();\n }\n //when the actual distance is way larger than the bandcenter\n //make a wide turn to the left\n else if (distanceDiff < 0) {\n LEFT_MOTOR.setSpeed(100); \n RIGHT_MOTOR.setSpeed(200);\n LEFT_MOTOR.forward();\n RIGHT_MOTOR.forward();\n }\n }\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tif (state == \"auton\") {\n\t\t\tlastState = \"auton\";\n\t\t}\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Left encoder\", Actuators.getLeftDriveMotor().getEncPosition());\n\t\tSmartDashboard.putNumber(\"Right encoder\", Actuators.getRightDriveMotor().getEncPosition());\n\t\tSmartDashboard.putNumber(\"Left speed\", Actuators.getLeftDriveMotor().get());\n\t\tSmartDashboard.putNumber(\"Right speed\", Actuators.getRightDriveMotor().get());\n\t\t\n\t\t\n\t}", "org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.Movement getSpeed();", "public int getSpeed(){return this.speed;}", "@Override\n public double speed() {\n \tif(Robot.drive.getDistance() > 120) {\n \t\treturn 0.2;\n \t}\n \treturn speed;\n }", "@Override\n public void init() {\n\n try {\n\n // Get wheel motors\n wheelMotor1 = hardwareMap.dcMotor.get(\"Wheel 1\");\n wheelMotor2 = hardwareMap.dcMotor.get(\"Wheel 2\");\n\n // Initialize wheel motors\n wheelMotor1.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n wheelMotor2.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n wheelMotor1.setDirection(DcMotor.Direction.FORWARD);\n wheelMotor2.setDirection(DcMotor.Direction.REVERSE);\n robotDirection = DriveMoveDirection.Forward;\n motion = new Motion(wheelMotor1, wheelMotor2);\n\n // Get hook motor\n motorHook = hardwareMap.dcMotor.get(\"Hook\");\n motorHook.setDirection(DcMotor.Direction.REVERSE);\n\n // Get servos\n servoTapeMeasureUpDown = hardwareMap.servo.get(\"Hook Control\");\n servoClimberDumperArm = hardwareMap.servo.get(\"Climber Dumper Arm\");\n servoDebrisPusher = hardwareMap.servo.get(\"Debris Pusher\");\n servoZipLineLeft = hardwareMap.servo.get(\"Zip Line Left\");\n servoZipLineRight = hardwareMap.servo.get(\"Zip Line Right\");\n servoAllClearRight = hardwareMap.servo.get (\"All Clear Right\");\n servoAllClearLeft = hardwareMap.servo.get (\"All Clear Left\");\n\n setServoPositions();\n }\n catch (Exception ex)\n {\n telemetry.addData(\"error\", ex.getMessage());\n }\n }", "@Override\n public void run() {\n while (!stop) {\n /**change the variable that controls the speed of the chassis using the bumpers*/\n if (gamepad1.right_bumper) {\n v = 1;\n } else if (gamepad1.left_bumper) {\n v = 2;\n }\n /**getting the gamepad joystick values*/\n forward = gamepad1.left_stick_y;\n right = -gamepad1.left_stick_x;\n clockwise = gamepad1.right_stick_x;\n\n /**calculating the power for motors */\n df = forward + clockwise - right;\n ss = -forward + clockwise + right;\n sf = -forward + clockwise - right;\n ds = forward + clockwise + right;\n\n /**normalising the power values*/\n max = abs(sf);\n if (abs(df) > max) {\n max = abs(df);\n }\n if (abs(ss) > max) {\n max = abs(ss);\n }\n if (abs(ds) > max) {\n max = abs(ds);\n }\n if (max > 1) {\n sf /= max;\n df /= max;\n ss /= max;\n ds /= max;\n }\n /** setting the speed of the chassis*/\n if (v == 1) {\n POWER(df / 5, sf / 5, ds / 5, ss / 5);\n } else if (v == 2) {\n POWER(df, sf, ds, ss);\n }\n }\n }", "public void start() {\n rfMotor.setPower(1);\n rrMotor.setPower(1);\n lfMotor.setPower(1);\n lrMotor.setPower(1);\n }", "public void currentSpeed()\n\t{\n\t\tif(speed == 0)\n\t\t{\n\t\t\tSystem.out.println(\"The bike is in rest\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"The bike is in motion\");\n\t\t\t\n\t\t}\n\t}", "public void setSpeed() {\r\n\t\tthis.currSpeed = this.maxSpeed * this.myStrategy.setEffort(this.distRun);\r\n\t}", "public double getCurrentSpeed(){\n return currentSpeed;\n }", "public double getCurrentSpeed(){\n return currentSpeed;\n }", "public abstract void drive(double leftSpeed, double rightSpeed);", "protected void ratCrewInit() {\n\n // Init motor state machine.\n motorTurnType = \"none\";\n motorTurnDestination = 0.0f;\n motorTurnAngleToGo = 0.0f;\n motorTurnAngleAdjustedToGo = 0.0f;\n isDriving = false;\n driveLeftStart = 0;\n driveRightStart = 0;\n driveLeftTarget = 0;\n driveRightTarget = 0;\n driveRightSpeed = 0.0f;\n driveLeftSpeed = 0.0f;\n driveAngleOffset = 0.0f;\n driveAngleCorrection = 0.0f;\n\n // TODO: push into initMotor function\n if (doMotors) {\n // Initialize Motors, finding them through the hardware map.\n leftDrive = hardwareMap.get(DcMotor.class, \"motorLeft\");\n rightDrive = hardwareMap.get(DcMotor.class, \"motorRight\");\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n // initialize the encoder\n leftDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n leftDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n leftDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n // Set all motors to zero power.\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n\n gate = hardwareMap.get(Servo.class, \"Gate\");\n gate.setPosition(1.0);\n }\n initGyroscope();\n\n if (doVuforia){\n initVuforia();\n initTfod();\n\n if (tfod != null) {\n tfod.activate();\n\n // The TensorFlow software will scale the input images from the camera to a lower resolution.\n // This can result in lower detection accuracy at longer distances (> 55cm or 22\").\n // If your target is at distance greater than 50 cm (20\") you can adjust the magnification value\n // to artificially zoom in to the center of image. For best results, the \"aspectRatio\" argument\n // should be set to the value of the images used to create the TensorFlow Object Detection model\n // (typically 1.78 or 16/9).\n\n // Uncomment the following line if you want to adjust the magnification and/or the aspect ratio of the input images.\n tfod.setZoom(2.5, 1.78);\n }\n }\n\n // Init run state.\n madeTheRun = false;\n startTime = 0;\n telemetry.addData(\"Init\", \"motors=%b, gyro=%b, vuforia=%b\", doMotors, doGyro, doVuforia);\n telemetry.update();\n }", "public static void setMotorSpeed(double speed){\n setLeftMotorSpeed(speed);\n setRightMotorSpeed(speed);\n }", "void setSpeed(RobotSpeedValue newSpeed);", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Left Speed\", Robot.driveSubsystem.getLeftSpeed());\n\t\tSmartDashboard.putNumber(\"Right Speed\", Robot.driveSubsystem.getRightSpeed());\n\n\t\tScheduler.getInstance().run();\n\t}", "public void update() {\n if (!hasStarted) {\n //drive.setAutonStraightDrive();\n hasStarted = true;\n } else {\n if (Math.abs((Math.abs(rotations) - (Math.abs(drive.getRightSensorValue() / 4096)))) <= TOLERANCE) {\n drive.setBrakeMode(true);\n setFinished(true);\n }\n }\n\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\t//For some reason, right is inverted in auto instead of left\n\t\tString start = autonomousCommand; //from smartDashboard\n\t\t//String start = \"R\";//R for right, FR for far right, L for far left\n\t\t//Starting Far Right\n\t\tif (start == \"FR\") {\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t//Go forward for 5 seconds\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t//stop going\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (start == \"R\") {\n\t\t\t//Starting on the right, aligned with the switch\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 2) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'R') {\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 15 && timer.get() > 7) {\n\t\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t}\n\t\t}\n\t\telse if (start == \"L\") {\n\t\t//This is for starting on the far left\n\t\t\tif(autoStep == 0) {\n\t\t\t\tif (timer.get() < 2.5) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'L') {/**Change this to R if we start on the right side, comment out if we're on the far right or left side**/\n\t\t\t\t\trotateTo(270);\n\t\t\t\t\tif (timer.get()>3 && timer.get()<4) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 7 && timer.get() > 4) {\n\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Default Code\n\t\t\tif (true) {\n\t\t\t\tif(autoStep==0) {\n\t\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override \n\tpublic void periodic() {\n\t\tSmartDashboard.putBoolean(\"Mod 0 Motor Inversion\", mSwerveModules[0].getDriveMotor().getInverted());\n\t\tSmartDashboard.putBoolean(\"Mod 1 Motor Inversion\", mSwerveModules[1].getDriveMotor().getInverted());\n\t\tSmartDashboard.putBoolean(\"Mod 2 Motor Inversion\", mSwerveModules[2].getDriveMotor().getInverted());\n\t\tSmartDashboard.putBoolean(\"Mod 3 Motor Inversion\", mSwerveModules[3].getDriveMotor().getInverted());\n\t\tSmartDashboard.putNumber(\"Mod 0 Angle\", mSwerveModules[0].getCurrentAngle());\n\t\tSmartDashboard.putNumber(\"Mod 1 Angle\", mSwerveModules[1].getCurrentAngle());\n\t\tSmartDashboard.putNumber(\"Mod 2 Angle\", mSwerveModules[2].getCurrentAngle());\n\t\tSmartDashboard.putNumber(\"Mod 3 Angle\", mSwerveModules[3].getCurrentAngle());\n\t\tSmartDashboard.putNumber(\"Encoder Ticks in Inches: \", mSwerveModules[3].getInches());\n\t}", "void OnSpeedChanges(float speed);", "protected void execute() {\n double rightSpeed, leftSpeed, x, y;\n //Set x and y to their axis values\n x = driver.getRawAxis(InputConstants.rightXAxis);\n y = driver.getRawAxis(InputConstants.leftYAxis);\n //Drive Smoothing\n\n //Set the left and rightspeed using x and y\n leftSpeed = y - x;\n rightSpeed = y + x;\n \n\n //Set the left and right side of the drive\n driveTrain.setLeftVBus(-leftSpeed);\n driveTrain.setRightVBus(-rightSpeed);\n\n\n\n }", "protected void initialize() {\r\n \t((Launcher) Robot.fuelLauncher).controlSpeed(i);\r\n }", "@Override\n\tpublic void increaseSpeed() {\n\t\tSystem.out.println(\"increaseSpeed\");\n\t\t\n\t}", "public void setSpeed(float val) {speed = val;}", "public void run() {\n setSpeed(MAX_SPEED, MAX_SPEED);\n while (step(TIME_STEP) != 16) {\n String name = \"\";\n if (behaviourList.get(2).takeControl()){\n name = \"inFrontOfWall\";\n behaviourList.get(2).action();\n } else if (behaviourList.get(1).takeControl()){\n name = \"isBallanceBall\";\n behaviourList.get(1).action();\n } else if (behaviourList.get(0).takeControl()){\n name = \"searchBall\";\n behaviourList.get(0).action();\n }\n printDistanceInfo(name);\n }\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\"); //display on the drivers phone that its working\n\n FLM = hardwareMap.get(DcMotor.class, \"FLM\"); //Go into the config and get the device named \"FLM\" and assign it to FLM\n FRM = hardwareMap.get(DcMotor.class, \"FRM\"); //device name doesn't have to be the same as the variable name\n BLM = hardwareMap.get(DcMotor.class, \"BLM\"); //DcMotor.class because that is what the object is\n BRM = hardwareMap.get(DcMotor.class, \"BRM\");\n\n BigSuck = hardwareMap.get(DcMotor.class, \"BigSUCK\");\n SmallSuck = hardwareMap.get(DcMotor.class, \"SmallSUCK\");\n SmallSuck.setDirection(DcMotor.Direction.REVERSE);\n \n UpLift = hardwareMap.get(DcMotor.class, \"LIFT\");\n UpLift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n UpLift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //Make it so we don't have to add flip the sign of the power we are setting to half the motors\n //FRM.setDirection(DcMotor.Direction.REVERSE); //Run the right side of the robot backwards\n FLM.setDirection(DcMotor.Direction.REVERSE);\n BRM.setDirection(DcMotor.Direction.REVERSE); //the right motors are facing differently than the left handed ones\n\n FLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n FRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n DragArm = hardwareMap.servo.get(\"drag_arm\");\n DragArm.setDirection(Servo.Direction.REVERSE);\n DragArm.setPosition(DragArmRestPosition);\n\n LiftGrab = hardwareMap.servo.get(\"GRAB\");\n LiftGrab.setPosition(LiftGrabRestPosition);\n\n LiftSwivel = hardwareMap.servo.get(\"SWIVEL\");\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n\n Push = hardwareMap.get(Servo.class, \"PUSH\");\n Push.setDirection(Servo.Direction.FORWARD);\n Push.setPosition(PushRestPosition);\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n }", "public void setMotorBehaviors(){\n motors = new ArrayList<>();\n motors.add(rf);\n motors.add(rb);\n motors.add(lf);\n motors.add(lb);\n\n //reset motor encoders\n rf.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rb.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lf.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lb.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n relic_extension.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n //Set motor behaviors\n rf.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rf.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rb.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rb.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lf.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lf.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lb.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lb.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rf.setDirection(DcMotorSimple.Direction.REVERSE);\n rb.setDirection(DcMotorSimple.Direction.REVERSE);\n relic_extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n relic_extension.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n relic_extension.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n lift.setDirection(DcMotorSimple.Direction.REVERSE);\n\n //Set servo behaviors\n leftWheel2.setDirection(DcMotorSimple.Direction.REVERSE);\n rightWheel1.setDirection(DcMotorSimple.Direction.REVERSE);\n\n }", "protected void execute() {\n \tint POV_value = Robot.m_oi.operator.getPOV();\n \tboolean input = true; \n \t//SmartDashboard.putNumber(\"POV Value\", POV_value);\n\t\tSmartDashboard.putNumber(\"Col Speed\", Robot.ss_Collector.getOutSpeed());\n \tswitch (POV_value){\n \tcase 0:\n \t\tthis.speed = .60;\n \t\tbreak;\n \tcase 45:\n \t\tthis.speed = .50;\n \t\tbreak;\n \tcase 90:\n \t\tthis.speed = .40; \n \t\tbreak;\n \tcase 135:\n \t\tthis.speed = .30;\n \t\tbreak;\n \tcase 180:\n \t\tthis.speed = .20;\n \t\tbreak;\n \tcase 270:\n \t\tthis.speed = .80;\n \t\tbreak;\n \tcase 315: \n \t\tthis.speed = .70;\n \t\tbreak;\n \tdefault:\n \t\tinput = false; \n \t\tbreak;\n \t}\n \t\n \tif (!running && input) {\n\t \trunning = true;\n \t\tthis.c_Drive = new C_CollectorDrive(false, -1, speed);\n \t\tc_Drive.start();\n \t}\n \t\n \telse if (running && !input) {\n \t\trunning = false;\n \t\tthis.c_Drive.cancel();\n \t}\n }", "private void speedStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_speedStateChanged\n\n int speedvalue = speed.getValue();//gets the value of the speed slider from the control panel\n roboLogic.speed(speedvalue); // calls the speed method of the RobotLogic class\n\n\n }", "public double getSpeed() {\n\t\tdouble speed = 0;\n\t\tfor (Motor motor : this) {\n\t\t\tspeed += motor.get();\n\t\t}\n\t\treturn speed / this.size();\n\t}", "public void accelerate() {\n\t\tif (this.hasOnlyOneCar())\n\t\t{\n\t\t\tif (this.getHead().getSpeed()==Speed.SLOW)\n\t\t\t\tthis.getHead().setSpeed(Speed.NORMAL);\n\t\t\telse\n\t\t\t\tthis.getHead().setSpeed(Speed.FAST);\n\t\t}\n\t}", "int getSpeed();", "int getSpeed();", "int getSpeed();", "int getSpeed();", "int getSpeed();", "int getSpeed();", "protected void execute() {\n \n \n \torientation.updatePID(RobotMap.navx.getAngle());\n \tRobotMap.motorLeftOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() - speed));\n \tRobotMap.motorLeftTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() - speed));\n \t\n \tRobotMap.motorRightOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() + speed));\n \tRobotMap.motorRightTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() + speed));\n \tSystem.out.println(RobotMap.navx.getAngle()-desiredAngle);\n }", "public void updateSpeed() {\n\t\t// should work b/c of integer arithmetic\n\t\tif(isTwoPlayer)\n\t\t\treturn;\n\t\t//System.out.println(\"speed up factor: \" + speedUpFactor);\n\t\t//System.out.println(\"numlinescleared/6: \" + numLinesCleared/6);\n\t\tif (speedUpFactor != numLinesCleared/6) {\n\t\t\t// speed by 10% every lines cleared, needs to be checked\n\t\t\tspeedUpFactor = numLinesCleared/6;\n\t\t\tif(!(defaultSpeed - 30*speedUpFactor <= 0))\n\t\t\t\tdefaultSpeed = defaultSpeed - 30*speedUpFactor;\n\t\t\tlevel = speedUpFactor;\n\t\t}\n\t\t//System.out.println(\"default speed: \" + defaultSpeed);\n\t}", "public float getSpeed (){\n return speed;\n }", "protected void execute() {\n\t\t// get MP status from each talon\n\t\tleftTalon.getMotionProfileStatus(leftStatus);\n\t\trightTalon.getMotionProfileStatus(rightStatus);\n\n\t\t// Enable MP if not already enabled\n\t\tif ((leftStatus.btmBufferCnt > kMinPointsInTalon) && (rightStatus.btmBufferCnt > kMinPointsInTalon)) {\n\t\t\tstate = SetValueMotionProfile.Enable;\n\t\t}\n\t\tleftTalon.set(ControlMode.MotionProfile, state.value);\n\t\trightTalon.set(ControlMode.MotionProfile, state.value);\n\t\t// System.out.println(\"DriveByMotion: Execute Setting State: \" + state);\n\t\t\n\t\t// did we get an underrun condition since last time we checked?\n\t\tif (leftStatus.hasUnderrun || rightStatus.hasUnderrun) {\n\t\t\t// better log it so we know about it\n\t\t\tSystem.out.println(\"DriveByMotion: A Talon has underrun!!! Left Talon: \" + leftStatus.hasUnderrun + \" Right Talon: \" + rightStatus.hasUnderrun);\n\t\t\t// clear the error. This flag does not auto clear, so this way we never miss logging it.\n\t\t\tleftTalon.clearMotionProfileHasUnderrun(0);\n\t\t\trightTalon.clearMotionProfileHasUnderrun(0);\n\t\t}\n\t}", "@Override\n\t\tpublic int getSpeed() {\n\t\t\treturn i+20;\n\t\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}", "public void startEngine(){\n currentSpeed = 0.1;\n }", "@Override\n\tpublic\n\tvoid speed() {\n\t\t\n\t}", "public Motor(MotorType type)\n {\n gpio = GpioSingleton.getInstance().get();\n \n // initialise instance variables\n if (type == MotorType.LEFT)\n {\n speedPin = gpio.provisionPwmOutputPin(RaspiPin.GPIO_23, \"SPEED\", 0);\n forwardPin = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_24, \"FORWARD\", PinState.LOW);\n backwardPin = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_25, \"BACKWARD\", PinState.LOW);\n }\n else if (type == MotorType.RIGHT)\n {\n speedPin = gpio.provisionPwmOutputPin(RaspiPin.GPIO_26, \"SPEED\", 0);\n forwardPin = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_27, \"FORWARD\", PinState.LOW);\n backwardPin = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_28, \"BACKWARD\", PinState.LOW);\n }\n // set shutdown state for this input pin\n speedPin.setShutdownOptions(true);\n forwardPin.setShutdownOptions(true);\n backwardPin.setShutdownOptions(true);\n }", "public void commonPeriodic()\n {\n double d1LeftJoystick = driver1.getAxis(driver1.LAxisUD);\n double d1RightJoystick = driver1.getAxis(driver1.RAxisUD);\n\n double d2LeftJoystick = driver2.getAxis(driver2.LAxisUD);\n double d2RightJoystick = driver2.getAxis(driver2.RAxisUD);\n\n // -------------------- DRIVER 1\n\n driveTrain.drive(d1LeftJoystick * speedModifier, d1RightJoystick * speedModifier);\n\n // driver1 controls ramp\n // press start and select together to deploy\n if(driver1.down(driver1.Start) && driver1.down(driver1.Select))\n {\n ramp.deploy();\n hatchArm.fingerGrab();\n }\n else\n {\n ramp.undeploy();\n }\n\n // driver 1 can double speed by holding L2\n //driveTrain.fastSpeed = driver1.down(driver1.L2);\n if(driver1.pressed(driver1.A))\n {\n driveTrain.slowSpeed = !driveTrain.slowSpeed;\n System.out.println(\"Fast speed toggled to: \" + driveTrain.slowSpeed);\n }\n\n //drive straight\n if(driver1.down(driver1.L1))\n {\n driveTrain.set_right_motors(speedModifier);\n }\n if(driver1.down(driver1.R1))\n {\n driveTrain.set_left_motors(speedModifier);\n }\n\n // flip drive orientation\n if(driver1.pressed(driver1.Select))\n {\n driveTrain.flip_orientation();\n \n if(driveTrain.isFacingForward())\n {\n camServForward.setSource(camFront);\n //camServReverse.setSource(camBack);\n // camBack.free();\n // camFront.close();\n // camFront = CameraServer.getInstance().startAutomaticCapture(0);\n // camBack = CameraServer.getInstance().startAutomaticCapture(1);\n }\n else\n {\n camServForward.setSource(camBack);\n //camServReverse.setSource(camFront);\n // camBack.close();\n // camFront.close();\n // camFront = CameraServer.getInstance().startAutomaticCapture(1);\n // camBack = CameraServer.getInstance().startAutomaticCapture(0);\n }\n }\n\n\n // -------------------- DRIVER 2\n\n\n // up is out\n // down is in\n // (when it's negated)\n cargoArm.spinBallMotor(-1 * d2LeftJoystick * 0.9);\n\n // control hatch placement pistons\n if(driver2.pressed(driver2.A))\n {\n hatchArm.pushPistons();\n }\n else if (driver2.released(driver2.A))\n {\n hatchArm.retractPistons();\n }\n\n // open/close hatch grabber arms\n if(driver2.pressed(driver2.B))\n {\n hatchArm.toggleGrabber();\n }\n\n if(driver2.pressed(driver2.Select))\n {\n //cargoArm.toggleArmLock();\n hatchArm.toggleFinger();\n }\n\n // extend/de-extend cargo hand\n if(driver2.pressed(driver2.Start))\n {\n cargoArm.toggleHand();\n }\n\n // button 7: L2\n // button 8: R2\n // L2 will reverse the finger\n // R2 will rotate it forward\n if(driver2.down(driver2.L1))\n {\n hatchArm.rotateFinger(1);\n }\n else\n {\n if(driver2.down(driver2.L2))\n {\n hatchArm.rotateFinger(-1);\n }\n else\n {\n hatchArm.rotateFinger(0);\n }\n }\n\n \n // button 5: L1\n // button 6: R1\n // L1 will move the hatch arm one way\n // R1 will move it the other way\n if(driver2.down(driver2.R1))\n {\n hatchArm.rotateArm(-1 * speedModifier);// * 0.75);\n }\n else\n {\n if(driver2.down(driver2.R2))\n {\n hatchArm.rotateArm(1 * speedModifier);// * 0.75);\n }\n else\n {\n hatchArm.rotateArm(0);\n }\n }\n\n \n // button 1: x\n // button 4: y\n // button 1 will move the ball arm one way\n // button 4 will move it the other way\n if(driver2.down(driver2.X))\n {\n //cargoArm.requestMove(-1 * speedModifier);\n cargoArm.rotateArm(-1);\n //cargoArm.solArmBrake.set(false);\n }\n else\n {\n if(driver2.down(driver2.Y))\n {\n //cargoArm.requestMove(2 * speedModifier);\n cargoArm.rotateArm(1);\n //cargoArm.solArmBrake.set(false);\n }\n else\n {\n //cargoArm.rotateArm(cargoArm.getArmCalculation());\n //cargoArm.solArmBrake.set(true);\n cargoArm.rotateArm(0);\n }\n }\n if(driver2.released(driver2.X) || driver2.released(driver2.Y))\n {\n //cargoArm.setArmTarget(cargoArm.currentPosition());\n //cargoArm.solArmBrake.set(true);\n cargoArm.rotateArm(0);\n }\n\n if(driver2.dpad(driver2.Up))\n {\n cargoArm.setArmUp();\n }\n if(driver2.dpad(driver2.Down))\n {\n cargoArm.setArmDown();\n }\n if(driver2.dpad(driver2.Left))\n {\n cargoArm.setArmMid();\n }\n if(driver2.dpad(driver2.Right))\n {\n cargoArm.setArmLow();\n }\n\n if(driver2.pressed(driver2.LThumb))\n {\n cargoArm.armLockEnabled = !cargoArm.armLockEnabled;\n \n }\n if(driver2.pressed(driver2.RThumb))\n {\n cargoArm.toggleBrake();\n }\n\n\n // allow move-to calculations to occur\n hatchArm.periodic();\n cargoArm.periodic();\n }", "public abstract void setSpeed(int sp);", "@Override\n\t\tprotected void doCurrentState() {\n\t\t\tswitch(currentState) {\n\t\t\t\n\t\t\t// follow operator commands, but respect limit switches\n\t\t\tcase manual:\n\t\t\t\tcd.gearLeftOpen.set(rd.gearManualLeftOpen && !rd.leftOpenSwitch, rd.gearManualLeftClose && !rd.leftCloseSwitch );\n\t\t\t\tcd.gearRightOpen.set(rd.gearManualRightOpen && !rd.rightOpenSwitch, rd.gearManualRightClose && !rd.rightCloseSwitch);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// close each motor until fully closed, if one motor is closed stop that motor\n\t\t\tcase autoClose:\n\t\t\t\tcd.gearLeftOpen.set(false, !rd.leftCloseSwitch );\n\t\t\t\tcd.gearRightOpen.set(false, !rd.rightCloseSwitch);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// open each motor until fully open, if one motor is open stop that motor\t\n\t\t\tcase autoOpen:\n\t\t\t\tcd.gearLeftOpen.set(!rd.leftOpenSwitch, false);\n\t\t\t\tcd.gearRightOpen.set(!rd.rightOpenSwitch, false);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "@Override\n\tprotected void init() {\n\t\t//Set movementSpeed in px/s\n\t\tmovementSpeed = 100;\n\t\t//Set previousTime to start at the \n\t}", "@Override\r\n\t\t\tpublic void speed(Double speed) {\n\t\t\t\tSystem.out.println(\"defining when object initciated\");\r\n\t\t\t}", "protected void execute() {\n \tRobot.gearIntake.setGearRollerSpeed(-.7);\n }", "public void accelerate(){\n speed += 5;\n }", "@Override\n\t\tpublic int getSpeed() {\n\t\t\treturn i+30;\n\t\t}", "@Override\n public void run() {\n TSimInterface tsi = TSimInterface.getInstance();\n\n try {\n tsi.setSpeed(id, speed);\n while(true) {\n SensorEvent e = tsi.getSensor(id);\n passSensor(e);\n }\n } catch (CommandException e) {\n e.printStackTrace(); // or only e.getMessage() for the error\n System.exit(1);\n } catch (InterruptedException e) {\n e.printStackTrace(); // or only e.getMessage() for the error\n System.exit(1);\n }\n }", "public double speed()\r\n {\r\n return speed;\r\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n wrist = hardwareMap.crservo.get(\"wrist\");\n extension = hardwareMap.get(DcMotor.class, \"extension\");\n lift = hardwareMap.get(DcMotor.class, \"lift\");\n\n\n //lift = hardwareMap.get(DcMotor.class, \"lift\");\n bucket = hardwareMap.servo.get(\"bucket\");\n //fBucket = hardwareMap.get(DcMotor.class, \"fBucket\");\n //fBucket.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n collection = hardwareMap.crservo.get(\"collection\");\n //lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n left.setDirection(DcMotor.Direction.FORWARD);\n right.setDirection(DcMotor.Direction.REVERSE);\n //lift.setDirection(DcMotor.Direction.FORWARD);\n // fBucket.setDirection(DcMotor.Direction.FORWARD);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"left\", left.getPower());\n telemetry.addData(\"right\", right.getPower());\n //telemetry.addData(\"lift\", lift.getPower());\n telemetry.addData(\"collection\", collection.getPower());\n //wrist.setPosition(-1);\n //telemetry.addData(\"fBucket\", fBucket.getPower());\n //Robot robot = new Robot(lift, extension, wrist, bucket, collection, drive);\n }" ]
[ "0.72384024", "0.68468654", "0.64993125", "0.646108", "0.642485", "0.64212465", "0.64185804", "0.6413864", "0.6406624", "0.6329626", "0.63234216", "0.6313767", "0.630545", "0.63051015", "0.6288012", "0.6288012", "0.62670314", "0.62651783", "0.6238324", "0.6228554", "0.62099624", "0.6208008", "0.61963344", "0.61932224", "0.61871564", "0.6183414", "0.6160997", "0.6156103", "0.614587", "0.61429787", "0.61353844", "0.6120779", "0.6111573", "0.6099547", "0.6098135", "0.60976666", "0.6096411", "0.6095026", "0.6082667", "0.6077992", "0.6075053", "0.6070878", "0.60610455", "0.6058785", "0.6040867", "0.6032331", "0.6030646", "0.6029369", "0.6020904", "0.60193914", "0.60076994", "0.60054916", "0.60041356", "0.60041356", "0.6003708", "0.6002461", "0.5989508", "0.598798", "0.5984206", "0.5964622", "0.5958852", "0.5956682", "0.59546053", "0.59420854", "0.59395164", "0.59358793", "0.59345907", "0.5930076", "0.5928979", "0.59180737", "0.59098214", "0.5900978", "0.5891592", "0.58912426", "0.5878762", "0.5878762", "0.5878762", "0.5878762", "0.5878762", "0.5878762", "0.587811", "0.58681476", "0.5866988", "0.5863699", "0.5863553", "0.58598536", "0.58550245", "0.5854499", "0.58498293", "0.5846559", "0.5846457", "0.5844363", "0.58412385", "0.58346355", "0.5834004", "0.58338803", "0.5829664", "0.5828752", "0.5828296", "0.5825301" ]
0.6415011
7
Write motor values to ChopperStatus, BluetoothOutputImpl, logfile.
private void updateMotors() { //Pass filtered values to ChopperStatus. mStatus.setMotorFields(mMotorSpeed); String logline = Long.toString(System.currentTimeMillis()) + " " + mMotorSpeed[0] + " " + mMotorSpeed[1] + " " + mMotorSpeed[2] + " " + mMotorSpeed[3] + "\n"; try { if (logfile != null) { logfile.write(logline); logfile.flush(); } } catch (IOException e) { //Log.e(TAG, "Cannot write to logfile"); } //Pass motor values to motor controller! Message msg = Message.obtain(); msg.what = SEND_MOTOR_SPEEDS; msg.obj = mMotorSpeed; mBt.sendMessageToHandler(msg); //Log.i(TAG, "Guidance sending message."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "private void logDeviceSettingTabField() {\n\n\t\tDeviceSettingsController.logVendorID(vendorId);\n\t\tDeviceSettingsController.logProductID(productId);\n\t\tDeviceSettingsController.logManufacture(manufacture);\n\t\tDeviceSettingsController.logProductString(productString);\n\t\tDeviceSettingsController.logSerialNumber(serialNumber);\n\t\tDeviceSettingsController.logFifoClockFrequency(fifoClockFrequency);\n\t\tDeviceSettingsController.logFPGAI2CSlaveAddress(i2cSlaveAddress);\n\t\tDeviceSettingsController.logDeviceSettingFirmware(deviceSttingFirmWare);\n\t\tDeviceSettingsController.logDeviceSettingI2CFrequency(deviceSttingI2CFrequency);\n\t}", "public void servoOn() throws DeviceException {\n \t\ttry {\n \t\t\tcontroller.caput(svonChannel, 1, 2.0);\n \t\t} catch (Throwable e) {\n \t\t\tthrow new DeviceException(\"failed to turn servos on\", e);\n \t\t}\n \t}", "@Override\r\n public void setServoValue(int servo, float value){\r\n checkServoCommandThread();\r\n // the message consists of\r\n // msg header: the command code (1 byte)\r\n // servo to control, 1 byte\r\n // servo PWM PCA capture-compare register value, 2 bytes, this encodes the LOW time of the PWM output\r\n // \t\t\t\tthis is send MSB, then LSB (big endian)\r\n ServoCommand cmd=new ServoCommand();\r\n cmd.bytes=new byte[4];\r\n cmd.bytes[0]=CMD_SET_SERVO;\r\n cmd.bytes[1]=(byte)getServo(servo);\r\n byte[] b=pwmValue(value);\r\n cmd.bytes[2]=b[0];\r\n cmd.bytes[3]=b[1];\r\n submitCommand(cmd);\r\n lastServoValues[getServo(servo)]=value;\r\n }", "protected void writeLog() {\r\n\r\n // get the current date/time\r\n DateFormat df1 = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);\r\n\r\n // write to the history area\r\n if (Preferences.is(Preferences.PREF_LOG) && completed) {\r\n\r\n if (destImage != null) {\r\n\r\n if (srcImage != null) {\r\n destImage.getHistoryArea().setText(srcImage.getHistoryArea().getText());\r\n }\r\n\r\n if (historyString != null) {\r\n destImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n } else if (srcImage != null) {\r\n\r\n if (historyString != null) {\r\n srcImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n }\r\n }\r\n }", "RobotProto.MotorOutputs.MotorOutput simulateMotor(SimMotor motor, Collection<SimMotor> motors, long deltaTime) {\n\n RobotProto.MotorOutputs.MotorOutput.Builder outputBuilder = RobotProto.MotorOutputs.MotorOutput.newBuilder();\n\n RobotProto.MotorConfig.ControlMode controlMode = motor.getConfig().getControlMode();\n boolean inverted = motor.getConfig().getInverted();\n double output = 0;\n if (motor.getConfig().getFollowingId() != 0) {\n for (SimMotor otherMotor : motors) {\n if (otherMotor.getId() == motor.getConfig().getFollowingId()) {\n output = otherMotor.getOutput();\n break;\n }\n }\n } else {\n double target = 0;\n switch (controlMode) {\n\n case PercentOutput:\n output = motor.getConfig().getTargetOutput();\n break;\n case Position:\n case MotionPosition:\n // compute position based on our target\n target = motor.getConfig().getTargetPosition();\n target = inverted ? -target : target;\n output = runPID(motor, target, motor.getSensorPosition());\n break;\n case Velocity:\n // compute position based on our target\n target = motor.getConfig().getTargetVelocity();\n target = inverted ? -target : target;\n output = runPID(motor, target, motor.getVelocity());\n break;\n case Current:\n break;\n case Follower:\n break;\n case MotionProfile:\n break;\n case MotionProfileArc:\n break;\n case Disabled:\n output = 0;\n break;\n }\n }\n\n // clamp the output between -1 and 1\n output = MathUtils.clamp(output);\n\n // run the physics simulation of the motor with the computed output this motor\n motor.setOutput(output);\n motor.step(output * 12.0, 0, deltaTime);\n\n // update the selectedSensorPosition\n motor.setConfig(motor.getConfig().toBuilder().setSelectedSensorPosition(motor.getSensorPosition()).build());\n\n return outputBuilder\n .setId(motor.getId())\n .setHandle(motor.getHandle())\n .setInputVoltage(motor.getVoltage())\n .setOutput(motor.getOutput())\n .setOutputCurrent(motor.getCurrent())\n .setPosition(motor.getPosition())\n .setSensorPosition(motor.getSensorPosition())\n .setVelocity(motor.getVelocity())\n .setLastError(motor.getLastError())\n .setIntegralState(motor.getIntegralState())\n .build();\n }", "public void WriteOutputs(byte values) throws IOException {\n mDevice.writeRegByte( GPIO, values );\n }", "@Override\n\tprotected void end() {\n\t\thookMotor1.set(ControlMode.PercentOutput, 0);\n\t\thookMotor2.set(ControlMode.PercentOutput, 0);\n\t}", "private void applyMotorOutputs() {\n\t\tArrayList<MNeuron> neurons = mnetwork.getNeurons();\n\t\tint thrustNeuronID = 0;\n\t\tint turnNegativeNeuronID = 1;\n\t\tint turnPositiveNeuronID = 2;\n\n\t\tfor (MNeuron n : neurons) {\n\t\t\t/*\n\t\t\t Perform physical actions if effector neurons are firing.\n\t\t\t */\n\t\t\tif (n.getID() == thrustNeuronID) {\n\t\t\t\tif (n.isFiring()) {\n\t\t\t\t\tthrust(2);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (n.getID() == turnNegativeNeuronID) {\n\t\t\t\tif (n.isFiring()) {\n\t\t\t\t\tchangeViewHeading(-20.0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (n.getID() == turnPositiveNeuronID) {\n\t\t\t\tif (n.isFiring()) {\n\t\t\t\t\tchangeViewHeading(20.0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}", "@Override\r\n\tpublic void init() {\n\t\tif (target!=null)\r\n\t\t\ttry{\r\n\t\t\t\twriter.write(target.state.getSpeed()+\"\\t\\t\"+target.state.getRPM()+\"\\t\\t\");\r\n\t\t\t\t//System.out.println(target.state.getRPM());\r\n\t\t\t} catch (Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t}", "public void logSensorData () {\n\t}", "private void writeLog(){\n\t\tStringBuilder str = new StringBuilder();\r\n\t\tstr.append(System.currentTimeMillis() + \", \");\r\n\t\tstr.append(fileInfo.getCreator() + \", \");\r\n\t\tstr.append(fileInfo.getFileName() + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(networkSize + \", \");\r\n\t\tstr.append(fileInfo.getN1() + \", \");\r\n\t\tstr.append(fileInfo.getK1() + \", \");\r\n\t\tstr.append(fileInfo.getN2() + \", \");\r\n\t\tstr.append(fileInfo.getK2() + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT)+ \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.encryStart, logger.encryStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \"\\n\");\r\n\t\t\r\n\t\tString tmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getKeyStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\r\n\t\t\r\n\t\ttmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getFileStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.FILE_CREATION, str.toString());\t\t\r\n\t\t\r\n\t\t// Topology Discovery\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"TopologyDisc, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.topStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT ) + \", \");\r\n\t\tstr.append(\"\\n\");\t\t\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\r\n\t\t\r\n\t\t// Optimization\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"Optimization, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.optStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(\"\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t\t\r\n\t\t\r\n\t\t// File Distribution\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"FileDistribution, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(logger.distStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \", \");\r\n\t\tstr.append(\"\\n\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t}", "@Override\n public void robotPeriodic() {\n\n SmartDashboard.putString(\"DB/String 0\", \": \" + ControllerMap.driverMode);\n SmartDashboard.putString(\"DB/String 3\",\n \"pot value: \" + String.valueOf(Intake.getInstance().potentiometer.getVoltage()));\n SmartDashboard.putString(\"DB/String 7\", \"Zero position: \" + Intake.getInstance().getStartingWristEncoderValue());\n SmartDashboard.putString(\"DB/String 8\",\n \"wrist encoder: \" + String.valueOf(Hardware.intakeWrist.getSensorCollection().getQuadraturePosition()));\n SmartDashboard.putString(\"DB/String 9\",\n \"Corrected wrist: \" + String.valueOf(Intake.getInstance().getCorrectedWristEncoderValue()));\n // SmartDashboard.putString(\"DB/String 4\", \"pot value: \" +\n // String.valueOf(intake.potentiometer.getValue()));\n // SmartDashboard.putString(\"DB/String 9\", \"pot voltage: \" +\n // String.valueOf(intake.potentiometer.getVoltage()));\n }", "public void saveComm() throws Exception {\n JFileChooser chooser = new JFileChooser();\n chooser.setFileFilter(new FileNameExtensionFilter(\"Log-Datei (*.log)\", \"log\"));\n\n File comfile = null;\n File home;\n File folder;\n Date date = Calendar.getInstance().getTime();\n DateFormat df = new SimpleDateFormat(\"yy.MM.dd-HH.mm.ss.SSS\");\n\n try {\n home = new File(System.getProperty(\"user.home\"));\n } catch (Exception e) {\n home = null;\n }\n\n if (home != null && home.exists()) {\n folder = new File(home + File.separator + \"Bike-Files\" + File.separator + \"Service_Files\");\n if (!folder.exists()) {\n if (!folder.mkdir()) {\n throw new Exception(\"Internal Error\");\n }\n }\n comfile = new File(folder + File.separator + \"CommLog_\" + df.format(date) + \".log\");\n }\n\n chooser.setSelectedFile(comfile);\n\n int rv = chooser.showSaveDialog(this);\n if (rv == JFileChooser.APPROVE_OPTION) {\n comfile = chooser.getSelectedFile();\n\n try (BufferedWriter w = new BufferedWriter(new FileWriter(comfile))) {\n CommunicationLogger.getInstance().writeFile(w);\n } catch (Exception ex) {\n LOG.severe(ex);\n }\n }\n }", "@Override\n public void onWriteComplete(final Port port) {\n stepOutput(port);\n }", "private static void saveIntoFile() throws IOException {\n\n\t\tDateFormat format = new SimpleDateFormat(\"yyyy.MM.dd.HH.mm.ss\");\n\t\tString fileName = \"./ipmi.\" + format.format(new Date()) + \".log\";\n\n\t\tBasicConsumptionList file = new BasicConsumptionList();\n\t\tlogger.debug(\"file:\" + fileName);\n\t\tfile.setWriter(new FileWriter(fileName));\n\n\t\tSystem.err.println(ipmi.execute(Command.IPMI_SENSOR_LIST));\n\n\t\twhile (true) {\n\t\t\tDouble watts = ipmi.getWatt();\n\t\t\tfile.addData(System.currentTimeMillis(), watts);\n\t\t\tfile.commit();\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tlogger.trace(\"\", e);\n\t\t\t}\n\t\t}\n\t}", "public void writeLog(){\n\t\ttry\n\t\t{\n\t\t\tFileWriter writer = new FileWriter(\"toptrumps.log\");\n\t\t\twriter.write(log);\n\t\t\twriter.close();\n\t\t\tSystem.out.println(\"log saved to toptrumps.log\");\n\t\t\t\n\t\t\tDataBaseCon.gameInfo(winName, countRounds, roundWins);\n\t\t\tDataBaseCon.numGames();\n\t\t\tDataBaseCon.humanWins();\n\t\t\tDataBaseCon.aIWins();\n\t\t\tDataBaseCon.avgDraws();\n\t\t\tDataBaseCon.maxDraws();\n\t\t\t\n\t\t} catch (IOException e)\n\t\t{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void execute() {\n \tRecordMotorMovement.getInstance().RecordMotors();\n }", "public void outputToSmartDashboard()\n {\n\n final double leftSpeed = getLeftVelocityInchesPerSec();\n final double rightSpeed = getRightVelocityInchesPerSec();\n\n SmartDashboard.putNumber(\"Drive/leftVoltage\", mLeftMaster.getOutputVoltage());\n SmartDashboard.putNumber(\"Drive/rightVoltage\", mRightMaster.getOutputVoltage());\n SmartDashboard.putNumber(\"Drive/leftSpeed\", leftSpeed); // (ips)\n SmartDashboard.putNumber(\"Drive/rightSpeed\", rightSpeed); // (ips)\n if (mLeftMaster.mControlMode == ControlMode.Velocity)\n {\n SmartDashboard.putNumber(\"Drive/leftSpeedErr\",\n leftSpeed - rpmToInchesPerSecond(mLeftMaster.getSetpointRPM()));\n SmartDashboard.putNumber(\"Drive/rightSpeedErr\",\n rightSpeed - rpmToInchesPerSecond(mRightMaster.getSetpointRPM()));\n }\n else if (mLeftMaster.mControlMode == ControlMode.MotionMagic ||\n mLeftMaster.mControlMode == ControlMode.Position)\n {\n SmartDashboard.putNumber(\"Drive/leftTargetPt\", mLeftMaster.getSetpointRotations());\n SmartDashboard.putNumber(\"Drive/rightTargetPt\", mRightMaster.getSetpointRotations());\n }\n SmartDashboard.putNumber(\"Drive/IMU_Heading\", getGyroAngle());\n }", "public void writeToSmartDashboard(){\n\t\tSmartDashboard.putNumber(\"Left Encoder Distance\", RobotMap.talonLeft.getSelectedSensorPosition(0));\n\t\tSmartDashboard.putNumber(\"Left Encoder Speed\", RobotMap.talonLeft.getSelectedSensorVelocity(0));\n\t\tRobotMap.talonLeft.setName(\"DriveTrain\", \"Left Talon\");\n\t\t\n\t\tSmartDashboard.putNumber(\"Left Controller Input\", RobotMap.talonLeft.get());\n\t\tSmartDashboard.putNumber(\"Right Controller Input\", RobotMap.talonRight.get());\n\t\t\n\t\tSmartDashboard.putNumber(\"Right Encoder Distance\", RobotMap.talonRight.getSelectedSensorPosition(0));\n\t\tSmartDashboard.putNumber(\"Right Encoder Speed\", RobotMap.talonRight.getSelectedSensorVelocity(0));\n\t\tSmartDashboard.putNumber(\"Error\", RobotMap.talonLeft.getClosedLoopError(0));\n\t\t\n\t\tSmartDashboard.putNumber(\"Bearing\", bearing);\n\t\tSmartDashboard.putNumber(\"Gyro Error\", RobotMap.ahrs.getAngle()-bearing);\n\t\tSmartDashboard.putNumber(\"Driving Straight Cycle Count\", drivingStraightCycleCount);\n\t\tSmartDashboard.putNumber(\"steering\", deadbanded(Robot.oi.getDriverJoystick().getRawAxis(0), joystickDeadband));\n\t\t\n \tif(RobotMap.talonLeft.getSelectedSensorVelocity(0)>maxOutputLeft){\n \t\tmaxOutputLeft = RobotMap.talonLeft.getSelectedSensorVelocity(0);\n \t}\n \tif(RobotMap.talonRight.getSelectedSensorVelocity(0)>maxOutputRight){\n \t\tmaxOutputRight = RobotMap.talonRight.getSelectedSensorVelocity(0);\n \t}\n\t\tSmartDashboard.putNumber(\"MaxVelocityLeft\", maxOutputLeft);\n\t\tSmartDashboard.putNumber(\"MaxVelocityRight\", maxOutputRight);\n\t\t\n\t\tSmartDashboard.putNumber(\"Gyro Angle\", RobotMap.ahrs.getAngle());\n\t//\tSmartDashboard.putBoolean(\"CurrentLimit\", RobotMap.talonLeft.)\n\t}", "@Override\n public void robotPeriodic() {\n\n enabledCompr = pressBoy.enabled();\n //pressureSwitch = pressBoy.getPressureSwitchValue();\n currentCompr = pressBoy.getCompressorCurrent();\n //SmartDashboard.putBoolean(\"Pneumatics Loop Enable\", closedLoopCont);\n SmartDashboard.putBoolean(\"Compressor Status\", enabledCompr);\n //SmartDashboard.putBoolean(\"Pressure Switch\", pressureSwitch);\n SmartDashboard.putNumber(\"Compressor Current\", currentCompr);\n }", "public void brake(int motor) {\n checkMotor(motor);\n\n synchronized (this) {\n msgBuf[2] = (byte)motor;\n msgBuf[3] = (byte)DIR_BRAKE;\n msgBuf[4] = '0';\n msgBuf[5] = '0';\n msgBuf[6] = '\\r';\n\n robotIO.queueMessage(msgBuf, 0, 7);\n\n // Keep track of the last values sent\n\n if (MOTOR_PORT == motor || MOTOR_ALL == motor) {\n lastPortSpeed = 0;\n lastPortDirection = DIR_BRAKE;\n }\n if (MOTOR_STARBOARD == motor || MOTOR_ALL == motor) {\n lastStarboardSpeed = 0;\n lastStarboardDirection = DIR_BRAKE;\n }\n }\n }", "public void setMotorBehaviors(){\n motors = new ArrayList<>();\n motors.add(rf);\n motors.add(rb);\n motors.add(lf);\n motors.add(lb);\n\n //reset motor encoders\n rf.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rb.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lf.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lb.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n relic_extension.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n //Set motor behaviors\n rf.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rf.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rb.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rb.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lf.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lf.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lb.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lb.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rf.setDirection(DcMotorSimple.Direction.REVERSE);\n rb.setDirection(DcMotorSimple.Direction.REVERSE);\n relic_extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n relic_extension.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n relic_extension.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n lift.setDirection(DcMotorSimple.Direction.REVERSE);\n\n //Set servo behaviors\n leftWheel2.setDirection(DcMotorSimple.Direction.REVERSE);\n rightWheel1.setDirection(DcMotorSimple.Direction.REVERSE);\n\n }", "@Override\n public void run(boolean on, Telemetry telemetry) {\n if (on) {\n dcMotor.setTargetPosition(onLocation);\n dcMotor.setPower(maxSpeed);\n } else {\n dcMotor.setTargetPosition(offLocation);\n dcMotor.setPower(maxSpeed);\n }\n telemetry.addData(\"Target position\", dcMotor.getTargetPosition());\n telemetry.addData(\"Encoder\", dcMotor.getCurrentPosition());\n }", "public void write(java.io.PrintWriter ps) {\n ps.print(\" \" + versionId\n + \" \" + n_bits\n + \" \" + vector.toBinString()\n + \" \" + delay);\n }", "public void write() {\n\t\tint xDist, yDist;\r\n\t\ttry {\r\n\t\t\tif (Pipes.getPipes().get(0).getX() - b.getX() < 0) { // check if pipes are behind bird\r\n\t\t\t\txDist = Pipes.getPipes().get(1).getX() - b.getX();\r\n\t\t\t\tyDist = Pipes.getPipes().get(1).getY() - b.getY() + Pipes.height;\r\n\t\t\t} else {\r\n\t\t\t\txDist = Pipes.getPipes().get(0).getX() - b.getX();\r\n\t\t\t\tyDist = Pipes.getPipes().get(0).getY() - b.getY() + Pipes.height;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\txDist = -6969;\r\n\t\t\tyDist = -6969;\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Pipe out of bounds\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"DATA.txt\");\r\n\t\t\tFileWriter fr = new FileWriter(file, true);\r\n\t\t\tfr.write(xDist + \",\" + yDist + \",\" + b.getYVel() + \",\" + didJump);\r\n\t\t\tfr.write(System.getProperty(\"line.separator\")); // makes a new line\r\n\t\t\tfr.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Wtrie file error\");\r\n\t\t}\r\n\t}", "@Override\n public void robotPeriodic() {\n //This prints Data to the Driver Station\n SmartDashboard.putString(\"DB/String 2\", \"\" + elevator.getSensorCollection().getQuadraturePosition());\n //SmartDashboard.putString(\"DB/String 7\", \"\" + rightEncoder.getDistance());\n }", "void setOpp(PrintWriter out_opp){ this.out_opp = out_opp; }", "void dump()\n\t\t{\n\t\t\tlog.info(\"Ch # \"+ch+\" Mode=\"+Hex.formatByte(mode)+\" Base=\"+Hex.formatWord(base.getValue())+\" Count=\"+Hex.formatWord(count.getValue()));\n\t\t\tlog.info(\"Ch # \"+ch+\" Hold=\"+hold+\" Request=\"+request+\" TC=\"+tc+\" Enabled=\"+enabled+\" Mask=\"+mask);\n\t\t}", "public Motors(String com) throws SerialPortException {\r\n controArduino = new ControlArduino(com);\r\n servo_pos = new int[6];\r\n servo_pos[0] = 1500;\r\n servo_pos[1] = 1500;\r\n servo_pos[2] = 1500;\r\n servo_pos[3] = 1500;\r\n servo_pos[4] = 1500;\r\n servo_pos[5] = 1500;\r\n double thetas[] = new double[6];\r\n updateMotors(thetas);\r\n }", "private void writeDeviceInfo() {\n StringBuffer text = new StringBuffer(getDeviceReport());\n dataWriter.writeTextData(text, \"info.txt\");\n }", "@Override \n\tpublic void periodic() {\n\t\tSmartDashboard.putBoolean(\"Mod 0 Motor Inversion\", mSwerveModules[0].getDriveMotor().getInverted());\n\t\tSmartDashboard.putBoolean(\"Mod 1 Motor Inversion\", mSwerveModules[1].getDriveMotor().getInverted());\n\t\tSmartDashboard.putBoolean(\"Mod 2 Motor Inversion\", mSwerveModules[2].getDriveMotor().getInverted());\n\t\tSmartDashboard.putBoolean(\"Mod 3 Motor Inversion\", mSwerveModules[3].getDriveMotor().getInverted());\n\t\tSmartDashboard.putNumber(\"Mod 0 Angle\", mSwerveModules[0].getCurrentAngle());\n\t\tSmartDashboard.putNumber(\"Mod 1 Angle\", mSwerveModules[1].getCurrentAngle());\n\t\tSmartDashboard.putNumber(\"Mod 2 Angle\", mSwerveModules[2].getCurrentAngle());\n\t\tSmartDashboard.putNumber(\"Mod 3 Angle\", mSwerveModules[3].getCurrentAngle());\n\t\tSmartDashboard.putNumber(\"Encoder Ticks in Inches: \", mSwerveModules[3].getInches());\n\t}", "@Override\n public void onNotifySuccess() {\n Log.i(\"SleepDoc\", \"notify SYNC_CONTROL Success\");\n bleManager.write(bleDevice, ServiceUUID.SYNC.toString(), CharacteristicUUID.SYNC_CONTROL.toString(), new byte[]{Command.SYNC_CONTROL_START}, logWriteCallback);\n }", "@Override\n public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {\n readNextSensor(gatt);\n }", "public void setupLogging() {\n\t\ttry {\n\t\t\t_logger = Logger.getLogger(QoSModel.class);\n\t\t\tSimpleLayout layout = new SimpleLayout();\n\t\t\t_appender = new FileAppender(layout,_logFileName+\".txt\",false);\n\t\t\t_logger.addAppender(_appender);\n\t\t\t_logger.setLevel(Level.ALL);\n\t\t\tSystem.setOut(createLoggingProxy(System.out));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\t\t\t\tpublic void onLocationChanged(Location location)\n\t\t\t\t\t{\n\t\t\t\t\t\tlatitude = location.getLatitude();\n\t\t\t\t\t\tlongitude = location.getLongitude();\n\t\t\t\t\t\tspeed = location.getSpeed();\n\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twriter.write(System.currentTimeMillis() + \",\" + latitude\n\t\t\t\t\t\t\t\t\t\t+ \",\" + longitude + \",\" + speed + \",\" + \"\\n\");\n\t\t\t\t\t\t\t\twriter.flush();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (IOException e)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}", "public void configLog()\n\t{\n\t\tlogConfigurator.setFileName(Environment.getExternalStorageDirectory() + File.separator + dataFileName);\n\t\t// Set the root log level\n\t\t//writerConfigurator.setRootLevel(Level.DEBUG);\n\t\tlogConfigurator.setRootLevel(Level.DEBUG);\n\t\t///writerConfigurator.setMaxFileSize(1024 * 1024 * 500);\n\t\tlogConfigurator.setMaxFileSize(1024 * 1024 * 1024);\n\t\t// Set log level of a specific logger\n\t\t//writerConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setImmediateFlush(true);\n\t\t//writerConfigurator.configure();\n\t\tlogConfigurator.configure();\n\n\t\t//gLogger = Logger.getLogger(this.getClass());\n\t\t//gWriter = \n\t\tgLogger = Logger.getLogger(\"vdian\");\n\t}", "@Override\n public void runOpMode() throws InterruptedException {\n float hsvValues[] = {0F, 0F, 0F};\n\n // values is a reference to the hsvValues array.\n final float values[] = hsvValues;\n\n\n double LPower = 0.2;\n double RPower = 0.2;\n\n // Send telemetry message to signify robot waiting;\n cdim = hardwareMap.deviceInterfaceModule.get(\"dim\");\n\n\n // get a reference to our ColorSensor object.\n //sensorRGB1 = hardwareMap.colorSensor.get(\"beaconColor\");\n\n //Resetting encoders\n LFMotor = hardwareMap.dcMotor.get(\"FR\");\n LBMotor = hardwareMap.dcMotor.get(\"BR\");\n RFMotor = hardwareMap.dcMotor.get(\"FL\");\n RBMotor = hardwareMap.dcMotor.get(\"BL\");\n NOM = hardwareMap.dcMotor.get(\"NOM\");\n door = hardwareMap.servo.get(\"door\");\n Elevator = hardwareMap.dcMotor.get(\"Elevator\");\n // Conveyor = hardwareMap.dcMotor.get(\"Conveyor\");\n Launch = hardwareMap.dcMotor.get(\"Launch\");\n\n\n NOM.setDirection(DcMotor.Direction.REVERSE);\n //Conveyor.setDirection(DcMotor.Direction.REVERSE);\n\n telemetry.addData(\"Status\", \"Resetting Encoders\");\n telemetry.update();\n\n //servo = hardwareMap.servo.get(\"buttonPusher\");\n\n LFMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n RFMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n LBMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n RBMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n idle();\n\n LFMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n RFMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n LBMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n RBMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Send telemetry message to indicate successful Encoder reset\n telemetry.addData(\"Path0\", \"Starting at %7d :%7d\",\n RFMotor.getCurrentPosition(),\n RBMotor.getCurrentPosition(),\n RBMotor.getCurrentPosition(),\n LFMotor.getCurrentPosition());\n telemetry.update();\n //servo.setPosition(.67);\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n // Step through each leg of the path,verse movement is obtained by s\n // Note: Reetting a negative distance (not speed)\n\n //sleep(14000);\n\n sleep(5000);\n encoderDrive(DRIVE_SPEED_FAST, 10.0, -10.0, 10.0, -10.0, 5.0); //drive forward\n door.setPosition(.3 );\n\n LBMotor.setPower(0);\n RFMotor.setPower(0);\n RBMotor.setPower(0);\n sleep(1500);\n\n double start = getRuntime();\n\n\n // servo.setPosition(.28);\n while ((getRuntime() - start) < 2) {\n Launch.setPower(.6);\n }\n Launch.setPower(0);\n start = getRuntime();\n while ((getRuntime() - start) < 2) {\n door.setPosition(.85);\n Elevator.setPower(-1);\n }\n\n start = getRuntime();\n while ((getRuntime() - start) < 2.05) {\n Launch.setPower(.6);\n }\n Elevator.setPower(0);\n Launch.setPower(0);\n //servo.setPosition(.67);\n\n encoderDrive(TURN_SPEED, .65, .65, .65, .65 , 4.0);\n encoderDrive(DRIVE_SPEED_FAST, 3, -3, 3, -3, 5.0); //drive forward\n LFMotor.setPower(0);\n LBMotor.setPower(0);\n RFMotor.setPower(0);\n RBMotor.setPower(0);\n sleep(1500);\n\n\n }", "protected void modelWrite(){\r\n\t\tthis.model.write(System.out);\r\n\t\tSystem.out.println(\"\\n -- model write finished --\\n\");\r\n\t\t\r\n\t}", "public void log(View view) {\n Log.i(TAG, \"LOGGING FOR \" + X + \", \" + Y);\n logButton.setText(R.string.logging_message);\n logButton.setEnabled(false);\n progressBar.setVisibility(View.VISIBLE);\n\n numLogs = 0;\n // Stops scanning after a pre-defined scan period.\n mHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n numLogs++;\n if (numLogs < NUM_LOGS){\n log();\n mHandler.postDelayed(this, SCAN_PERIOD);\n } else {\n mScanning = false;\n scanBLEDevice(false);\n logButton.setText(R.string.start_log_message);\n logButton.setEnabled(true);\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n }, SCAN_PERIOD);\n\n mScanning = true;\n scanBLEDevice(true);\n\n }", "public ClimbSubsystem(){\n\t\t\n\t\tclimbMotorA = new CANTalon(RobotMap.CLIMB_MOTOR_A_ID);\n\t\tclimbMotorB = new CANTalon(RobotMap.CLIMB_MOTOR_B_ID);\n\t\t\n\t\tlogger = new ThreadLogger( new LoggerClient(), \"climb.txt\");\n\t}", "@Override\r\n public void setAllServoValues(float[] values) {\r\n if(values==null || values.length!=getNumServos()) throw new IllegalArgumentException(\"wrong number of servo values, need \"+getNumServos());\r\n checkServoCommandThread();\r\n ServoCommand cmd=new ServoCommand();\r\n cmd.bytes=new byte[1+getNumServos()*2];\r\n cmd.bytes[0]=CMD_SET_ALL_SERVOS;\r\n int index=1;\r\n for(int i=0;i<getNumServos();i++){\r\n byte[] b=pwmValue(values[getServo(i)]); // must correct here for flipped labeling on PCB\r\n cmd.bytes[index++]=b[0];\r\n cmd.bytes[index++]=b[1];\r\n lastServoValues[getServo(i)]=values[i];\r\n }\r\n submitCommand(cmd);\r\n }", "void reportOutput()\n {\n while(state.get().ordinal() < SimulationState.TEARING_DOWN.ordinal())\n {\n FBUtilities.sleepQuietly(csvUpdatePeriodMs);\n doReportOutput(false);\n }\n\n doReportOutput(true);\n }", "@Override\n public void logSmartDashboard() {\n SmartDashboard.putString(\"CargoIntake RollerState\", direction.toString());\n \n // Smart dashboard cargo loaded and photoelectric value\n SmartDashboard.putBoolean(\"CargoIntake IsCargoDetected\", isCargoDetected());\n SmartDashboard.putBoolean(\"CargoIntake IgnorePhotoelectric\",ignorePhotoelectric);\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\"); //display on the drivers phone that its working\n\n FLM = hardwareMap.get(DcMotor.class, \"FLM\"); //Go into the config and get the device named \"FLM\" and assign it to FLM\n FRM = hardwareMap.get(DcMotor.class, \"FRM\"); //device name doesn't have to be the same as the variable name\n BLM = hardwareMap.get(DcMotor.class, \"BLM\"); //DcMotor.class because that is what the object is\n BRM = hardwareMap.get(DcMotor.class, \"BRM\");\n\n BigSuck = hardwareMap.get(DcMotor.class, \"BigSUCK\");\n SmallSuck = hardwareMap.get(DcMotor.class, \"SmallSUCK\");\n SmallSuck.setDirection(DcMotor.Direction.REVERSE);\n \n UpLift = hardwareMap.get(DcMotor.class, \"LIFT\");\n UpLift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n UpLift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //Make it so we don't have to add flip the sign of the power we are setting to half the motors\n //FRM.setDirection(DcMotor.Direction.REVERSE); //Run the right side of the robot backwards\n FLM.setDirection(DcMotor.Direction.REVERSE);\n BRM.setDirection(DcMotor.Direction.REVERSE); //the right motors are facing differently than the left handed ones\n\n FLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n FRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n DragArm = hardwareMap.servo.get(\"drag_arm\");\n DragArm.setDirection(Servo.Direction.REVERSE);\n DragArm.setPosition(DragArmRestPosition);\n\n LiftGrab = hardwareMap.servo.get(\"GRAB\");\n LiftGrab.setPosition(LiftGrabRestPosition);\n\n LiftSwivel = hardwareMap.servo.get(\"SWIVEL\");\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n\n Push = hardwareMap.get(Servo.class, \"PUSH\");\n Push.setDirection(Servo.Direction.FORWARD);\n Push.setPosition(PushRestPosition);\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n }", "public void output() {\n System.out.printf(\"Dien tich: %.2f \\n\", getArea());\n System.out.printf(\"Chu vi: %.2f \\n\", getPeripheral());\n }", "private void calculateMotorOutputs(int angle, int strength) {\n Point cart_point = polarToCart(angle,strength);\n\n final double max_motor_speed = 1024.0;\n final double min_motor_speed = 600.0;\n\n final double max_joy_val = 100;\n\n final double fPivYLimit = 24.0; // 32.0 was originally recommended\n\n // TEMP VARIABLES\n double nMotPremixL; // Motor (left) premixed output (-100..+99)\n double nMotPremixR; // Motor (right) premixed output (-100..+99)\n int nPivSpeed; // Pivot Speed (-100..+99)\n double fPivScale; // Balance scale b/w drive and pivot ( 0..1 )\n\n\n // Calculate Drive Turn output due to Joystick X input\n if (cart_point.y >= 0) {\n // Forward\n nMotPremixL = (cart_point.x>=0)? max_joy_val : (max_joy_val + cart_point.x);\n nMotPremixR = (cart_point.x>=0)? (max_joy_val - cart_point.x) : max_joy_val;\n } else {\n // Reverse\n nMotPremixL = (cart_point.x>=0)? (max_joy_val - cart_point.x) : max_joy_val;\n nMotPremixR = (cart_point.x>=0)? max_joy_val : (max_joy_val + cart_point.x);\n }\n\n // Scale Drive output due to Joystick Y input (throttle)\n nMotPremixL = nMotPremixL * cart_point.y/max_joy_val;\n nMotPremixR = nMotPremixR * cart_point.y/max_joy_val;\n\n // Now calculate pivot amount\n // - Strength of pivot (nPivSpeed) based on Joystick X input\n // - Blending of pivot vs drive (fPivScale) based on Joystick Y input\n nPivSpeed = cart_point.x;\n fPivScale = (Math.abs(cart_point.y)>fPivYLimit)? 0.0 : (1.0 - Math.abs(cart_point.y)/fPivYLimit);\n\n // Calculate final mix of Drive and Pivot, produces normalised values between -1 and 1\n double motor_a_prescale = ( (1.0-fPivScale)*nMotPremixL + fPivScale*( nPivSpeed) ) /100;\n double motor_b_prescale = ( (1.0-fPivScale)*nMotPremixR + fPivScale*(-nPivSpeed) ) /100;\n\n // convert normalised values to usable motor range\n motor_a = (int)( motor_a_prescale * (max_motor_speed - min_motor_speed) + (Math.signum(motor_a_prescale)*min_motor_speed) );\n motor_b = (int)( motor_b_prescale * (max_motor_speed - min_motor_speed) + (Math.signum(motor_b_prescale)*min_motor_speed) );\n\n }", "protected void execute() {\n \n \t\n \t \n \t\n \n System.out.println((Timer.getFPGATimestamp()- starttime ) + \",\" + (RobotMap.motorLeftTwo.getEncPosition()) + \",\"\n + (RobotMap.motorLeftTwo.getEncVelocity()*600)/-4096 + \",\" + RobotMap.motorRightTwo.getEncPosition() + \",\" + (RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n /*if(endpoint > 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft+ angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight - angleorientation.getResult());\n }\n if(endpoint <= 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft- angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight + angleorientation.getResult());\n }*/\n System.out.println(this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition() + \"l\");\n System.out.println(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition() + \"r\");\n \n \n \t if(RobotMap.motorLeftTwo.getEncVelocity()!= velocityLeft)\n velocityLeft = RobotMap.motorLeftTwo.getEncVelocity(); \n velocityRight = RobotMap.motorRightTwo.getEncVelocity();\n SmartDashboard.putNumber(\"LeftWheelError\", (this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition()));\n SmartDashboard.putNumber(\"RightWheelError\",(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition()));\n SmartDashboard.putNumber(\"LeftWheelVelocity\", (RobotMap.motorLeftTwo.getEncVelocity())*600/4096);\n SmartDashboard.putNumber(\"RightWheelVelocity\",(RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n \n count++;\n \tangleorientation.updatePID(RobotMap.navx.getAngle());\n }", "public void runOpMode() {\n leftBackDrive = hardwareMap.get(DcMotor.class, \"left_back_drive\"); //port 0, hub1\n rightBackDrive = hardwareMap.get(DcMotor.class, \"right_back_drive\"); //port 1, hub1\n leftFrontDrive = hardwareMap.get(DcMotor.class, \"left_front_drive\"); //port 2, hub1\n rightFrontDrive = hardwareMap.get(DcMotor.class, \"right_front_drive\"); //port 3, hub1\n craneExtend = hardwareMap.get(DcMotor.class, \"craneExtend\"); //port 0, hub2\n cranePitch = hardwareMap.get(DcMotor.class, \"cranePitch\"); //port 1, hub2\n craneElevate = hardwareMap.get(DcMotor.class, \"craneElevate\"); //port 2, hub2\n fakeMotor = hardwareMap.get(DcMotor.class, \"fakeMotor\"); //port 2, hub3\n craneGrab = hardwareMap.get(Servo.class, \"craneGrab\"); //port 0, servo\n craneGrabAttitude = hardwareMap.get(Servo.class, \"craneGrabAttitude\"); //port 2, servo\n trayGrab = hardwareMap.get(Servo.class, \"trayGrab\"); //port 1, servo\n flipperLeft = hardwareMap.get(Servo.class, \"flipperLeft\"); //port 3. servo\n flipperRight = hardwareMap.get(Servo.class, \"flipperRight\"); //port 4, servo\n \n //Setting the motor directions\n leftBackDrive.setDirection(DcMotor.Direction.FORWARD);\n rightBackDrive.setDirection(DcMotor.Direction.REVERSE);\n leftFrontDrive.setDirection(DcMotor.Direction.FORWARD);\n rightFrontDrive.setDirection(DcMotor.Direction.REVERSE);\n\n //Initializing variables\n \n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update(); //Done initalizing\n\n //Wait for the game to start (driver presses PLAY)\n waitForStart();\n runtime.reset();\n\n //run until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n \n//******************************************************************************\n\n //Drive controls\n if (gamepad1.left_trigger>0 || gamepad1.right_trigger>0) { //Crab\n leftBackDrive.setPower(gamepad1.left_stick_x*0.8);\n rightBackDrive.setPower(-gamepad1.left_stick_x*0.8);\n leftFrontDrive.setPower(-gamepad1.left_stick_x*0.8);\n rightFrontDrive.setPower(gamepad1.left_stick_x*0.8);\n }\n\n else { //Tank\n leftBackDrive.setPower(-gamepad1.left_stick_x);\n rightBackDrive.setPower(-gamepad1.right_stick_x);\n leftFrontDrive.setPower(-gamepad1.left_stick_x);\n rightFrontDrive.setPower(-gamepad1.right_stick_x);\n }\n }\n \n//******************************************************************************\n\n //Crane control\n \n \n//******************************************************************************\n\n //Telemetry display\n telemetry.addData(\"Run Time:\", \"\" + runtime.toString());\n telemetry.addData(\"Motor Power\", \"L (%.2f), R (%.2f)\", gamepad1.left_stick_y, gamepad1.right_stick_y);\n telemetry.update();\n }", "@Override\n protected void execute() {\n SmartDashboard.putNumber(\"Encoder Value: \", encoderMotor.getSelectedSensorPosition());\n }", "public void logDebugData() {\n SmartDashboard.putNumber(\"Ele Pos\", getPosition());\n SmartDashboard.putBoolean(\"Ele Switch\", bottomSwitchValue());\n SmartDashboard.putNumber(\"Ele Current\", getCurrent());\n SmartDashboard.putNumber(\"Ele Out %\", elevatorSpark.getAppliedOutput());\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n wrist = hardwareMap.crservo.get(\"wrist\");\n extension = hardwareMap.get(DcMotor.class, \"extension\");\n lift = hardwareMap.get(DcMotor.class, \"lift\");\n\n\n //lift = hardwareMap.get(DcMotor.class, \"lift\");\n bucket = hardwareMap.servo.get(\"bucket\");\n //fBucket = hardwareMap.get(DcMotor.class, \"fBucket\");\n //fBucket.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n collection = hardwareMap.crservo.get(\"collection\");\n //lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n left.setDirection(DcMotor.Direction.FORWARD);\n right.setDirection(DcMotor.Direction.REVERSE);\n //lift.setDirection(DcMotor.Direction.FORWARD);\n // fBucket.setDirection(DcMotor.Direction.FORWARD);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"left\", left.getPower());\n telemetry.addData(\"right\", right.getPower());\n //telemetry.addData(\"lift\", lift.getPower());\n telemetry.addData(\"collection\", collection.getPower());\n //wrist.setPosition(-1);\n //telemetry.addData(\"fBucket\", fBucket.getPower());\n //Robot robot = new Robot(lift, extension, wrist, bucket, collection, drive);\n }", "@Override\n public void loop() {\n try {\n if ((runtime.seconds()-prevTime) >= 60) {\n prevTime = (long)runtime.seconds();\n writer.write(\"\\n\" + String.format(Locale.US, \"%f\", runtime.seconds()/60) + \",\" +\n String.format(Locale.US,\"%2.2f\", batVolt.getVoltage()) + \",\");\n robot.shooterServoDown(false);\n Thread.sleep(800);\n robot.shooterServoDown(true);\n }else if (batVolt.getVoltage() < 10 || robot.touchSensor.isPressed()) {\n if (writer != null)\n writer.close();\n robot.shooterPower(0);\n requestOpModeStop();\n }\n telemetry.addData(\"Runtime\", runtime.toString());\n telemetry.addData(\"PrevTime\", prevTime);\n } catch (IOException | InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Override\n\t\t\tpublic void pidWrite(double output) {\n\t\t\t\tRobotMap.robotDrive.tankDrive(output, output);\n\t\t\t}", "public void generateLogFile() {\n\t\tFileOperations operator = new FileOperations(path);\n\t\toperator.writeFile(buildLogContent());\n\t}", "@Override\n public void onClick(View view) {\n if (socket != null && Bluetooth.isStillConnected()) {\n try {\n arduino_logging = !arduino_logging;\n OutputStream outStream = socket.getOutputStream();\n Commands.sendCommand(outStream, \"logfile\", \"\");\n\n if(arduino_logging)\n Snackbar.make(view, \"Logging sensor data, press again to stop logging\",\n Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n else Snackbar.make(view, \"Stopped logging sensor data, press again to start logging\" +\n \" to a new file\",\n Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n } catch (IOException e) {\n Log.d(\"IOException\", \"Exception sending logfile\");\n }\n }\n else{\n Snackbar.make(view, \"Not connected\",\n Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }\n }", "protected void execute() {\n \n \n \torientation.updatePID(RobotMap.navx.getAngle());\n \tRobotMap.motorLeftOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() - speed));\n \tRobotMap.motorLeftTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() - speed));\n \t\n \tRobotMap.motorRightOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() + speed));\n \tRobotMap.motorRightTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0.5*(orientation.getResult() + speed));\n \tSystem.out.println(RobotMap.navx.getAngle()-desiredAngle);\n }", "protected void end() {\n \n \tRobotMap.motorLeftOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \tRobotMap.motorLeftTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \t\n \tRobotMap.motorRightOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \tRobotMap.motorRightTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \t\n }", "@Override\n public void runOpMode() throws InterruptedException{\n\n LeftWheel = hardwareMap.dcMotor.get(\"LeftWheel\");\n RightWheel = hardwareMap.dcMotor.get(\"RightWheel\");\n LLAMA = hardwareMap.dcMotor.get(\"LLAMA\");\n RightWheel.setDirection(DcMotor.Direction.REVERSE);\n beaconFlagSensor = hardwareMap.i2cDevice.get(\"color sensor\");\n LeftWheel.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n RightWheel.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n buttonPusher = hardwareMap.servo.get(\"Button Pusher\");\n buttonPusher.setDirection(Servo.Direction.REVERSE);\n\n LeftWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n RightWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n LLAMA.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n beaconFlagReader= new I2cDeviceSynchImpl(beaconFlagSensor, I2cAddr.create8bit(0x3c), false);\n beaconFlagReader.engage();\n\n double PUSHER_MIN = 0;\n double PUSHER_MAX = 1;\n buttonPusher.scaleRange(PUSHER_MIN,PUSHER_MAX);\n\n if(beaconFlagLEDState){\n beaconFlagReader.write8(3, 0); //Set the mode of the color sensor using LEDState\n }\n else{\n beaconFlagReader.write8(3, 1); //Set the mode of the color sensor using LEDState\n }\n\n\n waitForStart();\n //Go forward to position to shoot\n long iniForward = 0;\n //Shoot LLAMA\n long shootLLAMA=0 ;\n //Turn towards Wall\n long turnToWall= 0;\n //Approach Wall\n long wallApproach= 0;\n //Correct to prepare for button\n long correctForButton= 0;\n long correctForButton2=0 ;\n //Use sensors to press button\n /** This is sensor*/\n //Go forward\n long toSecondButton= 0;\n //Use Sensors to press button\n /** This is sensor*/\n //turn to center\n\n //charge\n long chargeTime= 0;\n\n //Go forward to position to shoot\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(iniForward);\n\n STOP();\n\n //Shoot LLAMA\n LLAMA.setPower(1);\n\n sleep(shootLLAMA);\nSTOP();\n //Turn towards Wall\n LeftWheel.setPower(-1);\n RightWheel.setPower(1);\n\n sleep(turnToWall);\n\n STOP();\n //Approach Wall\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(wallApproach);\n\n STOP();\n //Correct to prepare for button\n\n LeftWheel.setPower(1);\n RightWheel.setPower(-1);\n\n sleep(correctForButton);\n\n STOP();\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(correctForButton2);\n\n STOP();\n topCache = beaconFlagReader.read(0x04, 1);\n //Use sensors to press button\n if ((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&(topCache[0] & 0xFF) <16) {\n while (((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&\n (topCache[0] & 0xFF) <16) && opModeIsActive()) {\n\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n sleep(100);\n LeftWheel.setPower(0);\n RightWheel.setPower(0);\n topCache = beaconFlagReader.read(0x04, 1);\n\n if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0){\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n break;\n }\n }\n\n }\n\n else if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0) {\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n }\n\n //Go forward\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(toSecondButton);\n\n STOP();\n //Use Sensors to press button\n topCache = beaconFlagReader.read(0x04, 1);\n //Use sensors to press button\n if ((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&(topCache[0] & 0xFF) <16) {\n while (((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&\n (topCache[0] & 0xFF) <16) && opModeIsActive()) {\n\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n sleep(100);\n LeftWheel.setPower(0);\n RightWheel.setPower(0);\n topCache = beaconFlagReader.read(0x04, 1);\n\n if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0){\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n break;\n }\n }\n\n }\n\n else if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0) {\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n }\n\n //turn to center\n\n\n //charge\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_main);\n btnOn = findViewById(R.id.bluetoothStart); // кнопка включения\n btnOff = findViewById(R.id.bluetoothStop); // кнопка выключения\n statusText = findViewById(R.id.statusBluetooth); // для вывода текста, полученного\n btState = findViewById(R.id.bluetoothIm);\n workState = findViewById(R.id.workStatIm);\n\n h = new Handler() {\n public void handleMessage(android.os.Message msg) {\n switch (msg.what) {\n case RECIEVE_MESSAGE:\n statusText.setText(\"msg\");// если приняли сообщение в Handler\n byte[] readBuf = (byte[]) msg.obj;\n String strIncom = new String(readBuf, 0, msg.arg1);\n sb.append(strIncom); // формируем строку\n int endOfLineIndex = sb.indexOf(\"\\r\\n\"); // определяем символы конца строки\n if (endOfLineIndex > 0) { // если встречаем конец строки,\n String sbprint = sb.substring(0, endOfLineIndex); // то извлекаем строку\n sb.delete(0, sb.length()); // и очищаем sb\n statusText.setText(\"Ответ от датчика: \" + sbprint); // обновляем TextView\n String[] step_data = sbprint.split(\" \");\n writeFile(step_data[0]);\n writeFile(\";\");\n writeFile(step_data[1]);\n writeFile(\";\");\n writeFile(step_data[2]);\n writeFile(\";\\n\");\n btnOff.setEnabled(true);\n btnOn.setEnabled(true);\n }\n //Log.d(TAG, \"...Строка:\"+ sb.toString() + \"Байт:\" + msg.arg1 + \"...\");\n break;\n }\n };\n };\n\n btAdapter = BluetoothAdapter.getDefaultAdapter(); // получаем локальный Bluetooth адаптер\n\n if (btAdapter.isEnabled()) {\n SharedPreferences prefs_btdev = getSharedPreferences(\"btdev\", 0);\n String btdevaddr=prefs_btdev.getString(\"btdevaddr\",\"?\");\n\n if (btdevaddr != \"?\") {\n BluetoothDevice device = btAdapter.getRemoteDevice(btdevaddr);\n UUID SERIAL_UUID = UUID.fromString(\"0000f00d-1212-afde-1523-785fef13d123\"); // bluetooth serial port service\n //UUID SERIAL_UUID = device.getUuids()[0].getUuid(); //if you don't know the UUID of the bluetooth device service, you can get it like this from android cache\n try {\n btSocket = device.createRfcommSocketToServiceRecord(SERIAL_UUID);\n } catch (Exception e) {\n Log.e(\"\",\"Error creating socket\");\n }\n\n try {\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (IOException e) {\n Log.e(\"\",e.getMessage());\n try {\n Log.e(\"\",\"trying fallback...\");\n btSocket =(BluetoothSocket) device.getClass().getMethod(\"createRfcommSocket\", new Class[] {int.class}).invoke(device,1);\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (Exception e2) {\n Log.e(\"\", \"Couldn't establish Bluetooth connection!\");\n }\n }\n } else {\n Log.e(\"\",\"BT device not selected\");\n }\n }\n\n checkBTState();\n\n btnOn.setOnClickListener(new OnClickListener() { // определяем обработчик при нажатии на кнопку\n public void onClick(View v) {\n //btnOn.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_on);\n mConnectedThread.run();\n // TODO start writing in file\n }\n });\n\n btnOff.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n //btnOff.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_off);\n mConnectedThread.cancel();\n // TODO stop writing in file\n }\n });\n }", "protected void outputChange( int value ) {\n final int comp = 1 - value;\n System.out.println(\n \"time \" + Simulation.time + \" \" + comp + \"->\" + value + \" \" + this\n );\n for (Wire w: outgoing) w.inputChange( value );\n }", "public void writeFile()\n\t{\n\t\t//Printwriter object\n\t\tPrintWriter writer = FileUtils.openToWrite(\"TobaccoUse.txt\");\n\t\twriter.print(\"Year, State, Abbreviation, Percentage of Tobacco Use\\n\");\n\t\tfor(int i = 0; i < tobacco.size(); i++)\n\t\t{\n\t\t\tStateTobacco state = tobacco.get(i);\n\t\t\tString name = state.getState();\n\t\t\tString abbr = state.getAbbreviation();\n\t\t\tdouble percent = state.getPercentUse();\n\t\t\tint year = state.getYear();\n\t\t\twriter.print(\"\"+ year + \", \" + name + \", \" + abbr + \", \" + percent + \"\\n\");\n\t\t} \n\t\twriter.close(); //closes printwriter object\n\t}", "@Override\n public void initialize() \n {\n try {\n mLogFile = new FileWriter(\"/home/lvuser/drivePath.csv\", true);\n mLogFile.write(\"\\n\");\n mLogFile.write(\"\\n\");\n mLogFile.write(\"Event:\"+DriverStation.getInstance().getEventName()+\"\\n\");\n mLogFile.write(\"Match Number:\"+DriverStation.getInstance().getMatchNumber()+\"\\n\");\n mLogFile.write(\"Replay Number:\"+DriverStation.getInstance().getReplayNumber()+\"\\n\");\n mLogFile.write(\"Game Data:\"+DriverStation.getInstance().getGameSpecificMessage()+\"\\n\"); \n mLogFile.write(\"\\n\");\n }\n catch(IOException e) \n {\n e.printStackTrace();\n System.out.println(\"Unable to create FileWriter\");\n }\n mCount = 0;\n }", "@Override\n public void runOpMode() {\n servo0 = hardwareMap.servo.get(\"servo0\");\n servo1 = hardwareMap.servo.get(\"servo1\");\n digital0 = hardwareMap.digitalChannel.get(\"digital0\");\n motor0 = hardwareMap.dcMotor.get(\"motor0\");\n motor1 = hardwareMap.dcMotor.get(\"motor1\");\n motor0B = hardwareMap.dcMotor.get(\"motor0B\");\n motor2 = hardwareMap.dcMotor.get(\"motor2\");\n blinkin = hardwareMap.get(RevBlinkinLedDriver.class, \"blinkin\");\n motor3 = hardwareMap.dcMotor.get(\"motor3\");\n park_assist = hardwareMap.dcMotor.get(\"motor3B\");\n\n if (digital0.getState()) {\n int_done = true;\n } else {\n int_done = false;\n }\n motor_stuff();\n waitForStart();\n if (opModeIsActive()) {\n while (opModeIsActive()) {\n lancher_position();\n slow_mode();\n drive_robot();\n foundation_grabber(1);\n launcher_drive();\n data_out();\n Pickingupblockled();\n lettingoutblockled();\n Forwardled();\n backwardled();\n Turnleftled();\n Turnrightled();\n Stationaryled();\n }\n }\n }", "private void setAndWriteFiles()\n\t{\n\t\tSensorConfiguration config = new SensorConfiguration();\n\t\tString versionMajor = ConfigurationInterface_v1_0.VERSION.substring(0,\n\t\t\t\tConfigurationInterface_v1_0.VERSION.indexOf('.'));\n\t\tString versionMinor = ConfigurationInterface_v1_0.VERSION\n\t\t\t\t.substring(ConfigurationInterface_v1_0.VERSION.indexOf('.') + 1);\n\t\tconfig.setConfigurationInterfaceVersion(versionMajor, versionMinor);\n\n\t\tStartModes startModes = new StartModes();\n\t\t// set startMode for sensorConfiguration\n\t\tfor (StartMode element : startModes.getStartModeList())\n\t\t{\n\t\t\tif (element.getName().equals(\"DEFINED_TIME\"))\n\t\t\t{\n\t\t\t\tconfig.setStartMode(element);\n\t\t\t}\n\t\t}\n\n\t\tConfigurationSets configSets = new ConfigurationSets();\n\t\t// set configurationSet for sensorConfiguration\n\t\tfor (ConfigurationSet element : configSets.getConfigSetList())\n\t\t{\n\t\t\tif (element.getName().equals(\"mesana\"))\n\t\t\t{\n\n\t\t\t\tconfig.setConfigurationSet(element);\n\t\t\t}\n\t\t}\n\n\t\tif (config.getStartMode().getName().equals(\"DEFINED_TIME\"))\n\t\t{\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 10);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 5);\n\t\t\tcalendar.set(Calendar.MINUTE, 11);\n\t\t\tDate date = calendar.getTime();\n\t\t\tconfig.setRecordingStartTime(date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconfig.setRecordingStartTime(null);\n\t\t}\n\t\t\n\t\tconfig.setRecordingDuration(12000);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).setSensorConfiguration(config);\n\t\t\t\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeConfigFile();\n\t\t\t\n\t\t\t// write Encrypted data to sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeEncryptedParameters(\"123456789abcd12\");\n\t\t\t\n\t\t\tint index = customerList.getSelectionIndex();\n\t\t\tif (index >= 0 && index <= mCollect.getList().size())\n\t\t\t{\n\t\t\t\tString linkId = mCollect.getList().get(index).getLinkId();\n\t\t\t\tconfig.addParameter(\"LinkId\", linkId);\n\t\t\t}\n\t\t\t// write custom data to additional file in sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeCustomFile();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t}", "@Override\n public void log() {\n switch (this.level) {\n case trace: if (!this.logger.isTraceEnabled()) return;\n break;\n case debug: if (!this.logger.isDebugEnabled()) return;\n break;\n case info: if (!this.logger.isInfoEnabled()) return;\n break;\n case warn: if (!this.logger.isWarnEnabled()) return;\n break;\n case error: if (!this.logger.isErrorEnabled()) return;\n break;\n }\n\n if (this.logger.getClass().equals(ch.qos.logback.classic.Logger.class)) {\n if (!((ch.qos.logback.classic.Logger)this.logger).isAdditive()) {\n return;\n }\n }\n\n this.mdcWriters.forEach(MDCWriter::write);\n\n switch (this.level) {\n case trace:\n this.logger.trace(this.message, this.args.toJavaArray());\n break;\n case debug:\n this.logger.debug(this.message, this.args.toJavaArray());\n break;\n case info:\n this.logger.info(this.message, this.args.toJavaArray());\n break;\n case warn:\n this.logger.warn(this.message, this.args.toJavaArray());\n break;\n case error:\n this.logger.error(this.message, this.args.toJavaArray());\n break;\n }\n }", "public void writeTourResultsAllCarrier() {\n\t\tString fileName = this.outputFolder + \"total_tour_infos_per_vehicleType.csv\";\n\t\tFile file = new File(fileName);\n\n\t\ttry {\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(file));\n\t\t\tbw.write(fileName);\n\t\t\tbw.newLine();\n\t\t\tbw.write(\"____________________________________________________________________________\");\n\t\t\tbw.newLine();\n\n\t\t\tbw.write(\"personId; vehType Id;distance [m] ; distance [km] ;TravelTime [s]; TravelTime [h];\" +\n\t\t\t\t\t\"FuelConsumption[l]; Emission [t Co2]; FuelConsumptionRate[l/100m]; \" +\n\t\t\t\t\t\"EmissionRate [g/m]; \");\n\t\t\tbw.newLine();\n\n\n\n\t\t\t//\t\t\tKT:\n\t\t\tMap<Id<Person>, Double> personId2tourDistance = this.handler.getPersonId2TourDistances();\n\t\t\tMap<Id<Person>, Double> personId2tourTravelTimes = this.handler.getPersonId2TravelTimes();\n\n\t\t\tMap<Id<VehicleType>, VehicleTypeSpezificCapabilities> vehTypId2Capabilities = new TreeMap<Id<VehicleType>, VehicleTypeSpezificCapabilities>();\n\n\t\t\tCarrierVehicleTypes vehicleTypes = this.handler.getVehicleTypes();\n\n\t\t\t//preparation:\n\t\t\tfor (Id<VehicleType> vehicleTypeId : vehicleTypes.getVehicleTypes().keySet()){\n\t\t\t\tVehicleTypeSpezificCapabilities capabilities = this.handler.getVehTypId2Capabilities().get(vehicleTypeId);\n\t\t\t\tif (capabilities != null){\n\t\t\t\t\tvehTypId2Capabilities.put(vehicleTypeId, capabilities);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//write results:\n\t\t\tfor (Id<Person> personId :personId2tourDistance.keySet()) {\n\n\t\t\t\tDouble tourDistanceMeter = personId2tourDistance.get(personId);\n\t\t\t\tDouble tourTravelTimeSec = personId2tourTravelTimes.get(personId);\n\n\t\t\t\tId<VehicleType> vehTypeId = null;\n\n\t\t\t\tfor (Id<VehicleType> vehTypeIdsAvail : vehicleTypes.getVehicleTypes().keySet()) {\n\t\t\t\t\tif(personId.toString().contains(\"_\"+vehTypeIdsAvail.toString()+\"_\")){\n\t\t\t\t\t\tif (vehTypeIdsAvail.toString().endsWith(\"frozen\") == personId.toString().contains(\"frozen\")) {//only frozen\n\t\t\t\t\t\t\tvehTypeId = vehTypeIdsAvail;\n\t\t\t\t\t\t} else { //not \"frozen\"\n\t\t\t\t\t\t\tvehTypeId = vehTypeIdsAvail;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (vehTypeId == null) {\n\t\t\t\t\tlog.error(\"Vehicle type for person not defined: \" + personId);\n\t\t\t\t}\n\n\t\t\t\tdouble fuelConsuptionRate = (vehTypId2Capabilities.get(vehTypeId)).getFuelConsumtion()*1000; // Usually in l/100km\n\t\t\t\tdouble emissionsRatePerMeter = vehTypId2Capabilities.get(vehTypeId).getEmissionsPerMeter(); \n\n\t\t\t\tbw.write(personId + \";\" +\n\t\t\t\t\t\tvehTypeId + \";\" +\n\t\t\t\t\t\ttourDistanceMeter + \";\" + \n\t\t\t\t\t\ttourDistanceMeter/1000 + \";\" + //km\n\t\t\t\t\t\ttourTravelTimeSec + \";\" + \n\t\t\t\t\t\ttourTravelTimeSec/3600 + \";\" + \t//h\n\t\t\t\t\t\ttourDistanceMeter*fuelConsuptionRate/100/1000 + \";\" + // rate is in [liter/100km]\n\t\t\t\t\t\ttourDistanceMeter*emissionsRatePerMeter /1000000 +\";\" + \t// CO2-Ausstoss in t (= 1Mio g)\n\t\t\t\t\t\tfuelConsuptionRate+ \";\" + \n\t\t\t\t\t\temissionsRatePerMeter \n\t\t\t\t\t\t);\n\t\t\t\tbw.newLine();\n\n\t\t\t}\t\n\t\t\t\n\t\t\tlog.info(\"Output written to \" + fileName);\n\t\t\tbw.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public abstract WriteResult writeSystemLog(Log log);", "private void configVelocityControl() {\n //config remote sensors\n //sets the sensor to be a quad encoder, sets our feedback device to be that sensor\n m_masterMotor.configSelectedFeedbackSensor(TalonSRXFeedbackDevice.CTRE_MagEncoder_Relative, RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //zero the encoders on every init\n zeroEncoder();\n\n //sets whether our motor is inverted\n //this is currently false but can be switched based on testing\n m_masterMotor.setInverted(RobotMap.LAUNCHER_MASTER_INVERTED);\n m_masterMotor.setSensorPhase(RobotMap.LAUNCHER_MASTER_INVERTED);\n\n //this sets how often we pull data from our sensor\n m_masterMotor.setStatusFramePeriod(StatusFrame.Status_2_Feedback0, RobotMap.LAUNCHER_FEEDBACK_PERIOD_MS, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //this configs the deadband for the PID output. Any output with an absolute value less than this will be treated as zero\n m_masterMotor.configNeutralDeadband(0, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //this sets the peak output for our motor controller.\n m_masterMotor.configPeakOutputForward(RobotMap.LAUNCHER_PID_PEAK_OUTPUT, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n //this does the same thing but for the reverse direction\n m_masterMotor.configPeakOutputReverse(0, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n \n //sets the period of the velocity sample\n //effectively this defines the amount of time used to calculate the velocity\n m_masterMotor.configVelocityMeasurementPeriod(RobotMap.VELOCITY_MEASUREMENT_PERIOD, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //Sets the number of samples used in the rolling average for calculating velocity\n m_masterMotor.configVelocityMeasurementWindow(RobotMap.LAUNCHER_VELOCITY_MEASUREMENT_WINDOW, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n \n //set p, i, d, f values\n //the zero is the PID slot, in this case it is zero for the primary PID\n //the launcher has no auxillary or turning PID control\n m_masterMotor.config_kP(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_P);\n m_masterMotor.config_kI(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_I);\n m_masterMotor.config_kD(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_D);\n m_masterMotor.config_kF(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_F);\n\n //this sets the acceptable amount of Integral error, where if the absolute accumulated error exceeds this ammount, it resets to zero\n //this is designed to prevent the PID from going crazy if we move too far from our target\n m_masterMotor.config_IntegralZone(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_I_ZONE, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //sets the max output of the motor specifically within closed loop control\n m_masterMotor.configClosedLoopPeakOutput(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_PID_PEAK_OUTPUT, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //this configures an allowable error in closed loop control\n //any error less than this is treated as zero.\n m_masterMotor.configAllowableClosedloopError(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_ACCEPTABLE_ERROR, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //configures the period for closed loop calculations in MS \n //should be increased if the can bus is haveing issues\n m_masterMotor.configClosedLoopPeriod(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_CLOSED_LOOP_PERIOD_MS, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //configures ramp speed\n m_masterMotor.configOpenloopRamp(RobotMap.LAUNCHER_OPEN_LOOP_RAMP_TIME_S);\n m_masterMotor.configClosedloopRamp(0);\n\n //sets our closed loop control to use our primary PID slot\n m_masterMotor.selectProfileSlot(RobotMap.PID_PRIMARY_SLOT, 0);\n }", "private void sendStatus() throws IOException {\n\t\tWriteStatus status = new WriteStatus.Builder().build();\n\t\tstatus.writeTo(out);\n\t\tout.flush();\n\t}", "public void drive(double power_cap, double target_distance, double target_acceleration,\n double target_velocity) {\n TL.resetMotor();\n TR.resetMotor();\n BL.resetMotor();\n BR.resetMotor();\n\n // Required Stop Condition\n int success_count = TL.getSuccess_count();\n\n // \"PID\" Loop\n while((opModeIsActive() && !isStopRequested()) && (success_count < 90)){\n success_count = TL.getSuccess_count();\n // IMU PID STUFF\n imu.imu_iter(0.00000001);\n double imu_correction = imu.getCorrection();\n telemetry.addData(\"IMU Correction -> \", imu_correction);\n telemetry.addData(\"Global Angle ->\", imu.getGlobalAngle());\n if (!MotorPlus.isWithin(0.0195, imu_correction, 0.0)){\n // If correction is needed, we correct the angle\n TL.addExternalResponse(-imu_correction);\n TR.addExternalResponse(imu_correction);\n BL.addExternalResponse(-imu_correction);\n BR.addExternalResponse(imu_correction);\n } else {\n TL.addExternalResponse(0.0);\n TR.addExternalResponse(0.0);\n BL.addExternalResponse(0.0);\n BR.addExternalResponse(0.0);\n }\n\n // Supplying the \"targets\" to the Motors\n TL.actuate(power_cap, target_distance, target_acceleration, target_velocity);\n TR.actuate(power_cap, target_distance, target_acceleration, target_velocity);\n BL.actuate(power_cap, target_distance, target_acceleration, target_velocity);\n BR.actuate(power_cap, target_distance, target_acceleration, target_velocity);\n\n // Telemetry Stuff\n telemetry.addData(\"TL, TR, BL, and BR Vels -> \", TL.getCurrent_velocity());\n telemetry.addData(\"Success Count TL -> \", TL.getSuccess_count());\n telemetry.update();\n }\n }", "@Override\n public void robotPeriodic() {\n double high = m_filter.calculate(m_photoHigh.getValue());// * kValueToInches;\n double low = m_filter.calculate(m_photoLow.getValue()); //* kValueToInches;\n if (low<=6){\n BallPresent = true;\n //stop motor if ultrasonic sensor median falls below 6 inches indicating a ball is blocking the sensor\n m_RightMotor.set(ControlMode.PercentOutput, 0);\n } else {\n BallPresent = false;\n //stop motor if ultrasonic sensor median falls below 6 inches indicating a ball is blocking the sensor\n m_RightMotor.set(ControlMode.PercentOutput, 0.5);\n }\n /*Shuffleboard.getTab(\"Shooter\").add(\"Ball Present\", BallPresent)\n .withWidget(BuiltInWidgets.kBooleanBox)\n .withPosition(0, 0)\n .withSize(1, 1)\n .withProperties(Map.of(\"colorWhenTrue\",\"green\",\"colorWhenFalse\",\"black\"));*/\n SmartDashboard.putNumber(\"High\", high);\n SmartDashboard.putNumber(\"Low\", low); \n /*Shuffleboard.getTab(\"Shooter\").add(\"Ultrasonic 1\", currentDistance)\n .withWidget(BuiltInWidgets.kGraph)\n .withPosition(0, 2)\n .withSize(4, 4);*/\n // convert distance error to a motor speed\n //double currentSpeed = (kHoldDistance - currentDistance) * kP;\n\n // drive robot\n //m_robotDrive.arcadeDrive(currentSpeed, 0);\n }", "private void commandMotor(int channel, int maskValue){\n\t\tbyte workingByte = (byte)((CMDBIT_GO | maskValue) & 0xff);\n\n\t\tif (motorParams[MOTPARAM_REGULATE][channel] == MOTPARAM_OP_TRUE) workingByte |= CMDBIT_SPEED_MODE;\n\t\tif (motorParams[MOTPARAM_RAMPING][channel] == MOTPARAM_OP_TRUE) workingByte |= CMDBIT_RAMP;\n\t\t// send the message.\n\t\tsendData(REGISTER_MAP[REG_IDX_COMMAND][channel], workingByte);\n\t}", "public static void main(String[] args) throws Exception {\n\t\tBTConnection btc = Bluetooth.waitForConnection();\n\t\tDataInputStream dis = btc.openDataInputStream();\n\t\tDataOutputStream dos = btc.openDataOutputStream();\n\t\tUltrasonicSensor sonar = new UltrasonicSensor(SensorPort.S4);\n\t\tMotor.C.setSpeed(50);\n\t\tLCD.drawString(\"READY\", 0, 10);\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tbyte cmd = dis.readByte();\n\t\t\t\t\n\t\t\t\tLCD.drawInt(cmd,1,0,0);\n\t\t\t\tfloat param = dis.readFloat();\n\t\t\t\tLCD.drawInt((int) (param + 0.5f),4,0,1);\n\t\t\t\t\n\t\t\t\tswitch (cmd) {\n\t\t\t\tcase ROTATE: \n\t\t\t\t\tMotor.C.rotate((int) (param + 0.5f));\n\t\t\t\t\tdos.writeFloat(0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ROTATETO: \n\t\t\t\t\tMotor.C.rotateTo((int) (param + 0.5f));\n\t\t\t\t\tdos.writeFloat(0);\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase RANGE:\n\t\t\t\t\tfloat mean,sum,dist;\n\t\t\t\t\tint j,l;\n\t\t\t\t\t\n\t\t\t\t\twhile (Motor.C.isMoving());\n\t\t\t\t \n\t\t\t\t mean = 0;\n\t\t\t\t \n\t\t\t\t l = j = 25; // try 25 times\n\t\t\t\t Thread.sleep(100);\n\t\t\t\t sum = sonar.getDistance();\n\n\t\t\t\t for (int k = 1; k < l; k++){\n\t\t\t\t \t\tdist = sonar.getDistance();\n\t\t\t\t \t\tif(dist == 255) j--;\n\t\t\t\t \t\telse \t\t\tsum += dist;\n\t\t\t\t }\n\n\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\tmean = (1.0f*sum)/(1.0f*j);\n\t\t\t\t\tdos.writeFloat(mean);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase STOP:\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\tdefault:\n\t\t\t\t\tdos.writeFloat(-1);\n\t\t\t\t}\n\t\t\t\tdos.flush();\n\t\t\t\t\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tSystem.err.println(\"IO Exception\");\n\t\t\t\tThread.sleep(2000);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "public void createLogFile() {\n\t\tBufferedWriter out = null;\n\t\ttry {\n\t\t\tFile root = Environment.getExternalStorageDirectory();\n\t\t\tLog.e(\"SD CARD WRITE ERROR : \", \"SD CARD mounted and writable? \"\n\t\t\t\t\t+ root.canWrite());\n\t\t\tif (root.canWrite()) {\n\t\t\t\tFile gpxfile = new File(root, \"ReadConfigLog.txt\");\n\t\t\t\tFileWriter gpxwriter = new FileWriter(gpxfile);\n\t\t\t\tout = new BufferedWriter(gpxwriter);\n\t\t\t\tout.write(\"Hello world\");\n\t\t\t\t// out.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tLog.e(\"SD CARD READ ERROR : \", \"Problem reading SD CARD\");\n\t\t\tLog.e(\"SD CARD LOG ERROR : \", \"Please take logs using Logcat\");\n\t\t\tLog.e(\"<<<<<<<<<<WifiPreference>>>>>>>>>>>>\",\n\t\t\t\t\t\"Could not write file \" + e.getMessage());\n\t\t}\n\t}", "public void tankDrive(double[] motorValues)\n {\n tankDrive(motorValues[0], motorValues[1]);\n }", "public void runMotor(Motor motor, double power) {\n\n\n switch (motor) {\n\n case LEFT_LFB:\n motorLFB.set(ControlMode.PercentOutput, power);\n break;\n case LEFT_LFT:\n motorLFT.set(ControlMode.PercentOutput, power);\n break;\n case LEFT_LBT:\n motorLBT.set(ControlMode.PercentOutput, power);\n break;\n case LEFT_LBB:\n motorLBB.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RFB:\n motorRFB.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RFT:\n motorRFT.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RBT:\n motorRBT.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RBB:\n motorRBB.set(ControlMode.PercentOutput, power);\n break;\n }\n }", "protected void logVerbose(StringWriter writer) {\n Collections.reverse(perfromedInvocations);\n for (AtomicOperationInvocation invocation : perfromedInvocations) {\n writeInvocation(invocation, writer);\n }\n }", "@Override\n\tpublic void testPeriodic() {\n\t\tif (testJoystick.getRawButton(3)) {\n\t\t\tsparkMotor1.set(1.0);\n\t\t\tsparkMotor0.set(1.0);\n\t\t\ttestTalon.set(1.0);\n\t\t\t\n\t\t\ttalonMotor10.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor11.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor12.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor13.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor14.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor15.set(ControlMode.PercentOutput, 1.0);\n\t\t}\n\t\telse if (testJoystick.getRawButton(2)) {\n\t\t\tsparkMotor0.set(-1.0);\n\t\t\tsparkMotor1.set(-1.0);\n\t\t\ttestTalon.set(-1.0);\n\t\t\t\n\t\t\ttalonMotor10.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor11.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor12.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor13.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor14.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor15.set(ControlMode.PercentOutput, -1.0);\n\t\t}\n\t\telse {\n//\t\t\tsparkMotor0.set(0);\n\t\t\tsparkMotor1.set(0);\n\t\t\ttestTalon.set(0);\n\t\t\t\n\t\t\ttalonMotor10.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor11.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor12.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor13.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor14.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor15.set(ControlMode.PercentOutput, 0);\n\t\t\t\n\t\t\ttestSel.set(Value.kForward);\n\t\t}\n\t\t\n\t\tif (testJoystick.getRawButton(7)) {\n\t\t\ttestSel.set(Value.kForward);\n\t\t\tSystem.out.println(compressor.getCompressorCurrent());\n\t\t}\n\t}", "public void setPercentOutput(double value) {\n motor.set(ControlMode.PercentOutput, value);\n }", "static void writeOperations(){\n \ttry{\n \t\t\n\t\t\t// Create file \n\t\t\tFileWriter fstream = new FileWriter(FILE_FILEOP);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t \tfor (int i=0; i < operations.size(); i++){\n\t \t\tout.write(operations.get(i).getDetails() );\n\t \t}\n\t\t\t\n\t\t\t//Close the output stream\n\t\t\tout.close();\n\t\t}\n \tcatch (Exception e){//Catch exception if any\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t\tSystem.out.print(\"Operations file written.\\n\");\n\n \t\n }", "@Override\n public void periodic() {\n\t\t// myDrive.\n\n\t\t// System.out.println(Robot.m_oi.getSpeed());\n\t\t// SmartDashboard.putNumber(\"Dial Output: \", Robot.m_oi.getSpeed());\n\n\t\t// //Wheel Speed Limits\n\n\t\t// SmartDashboard.putNumber(\"Front Left Percent\", myDrive.getFLSpeed());\n\t\t// SmartDashboard.putNumber(\"Front Right Percent\", myDrive.getFRSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Left Percent\", myDrive.getRLSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Right Percent\", myDrive.getRRSpeed());\n\n\t\t//Test Code for Selecting Calibration Motor \n\t\t//***COMMENT OUT BEFORE REAL GAME USE***\n\t\t// if (Robot.m_oi.getArmDown()) {\n\t\t// \t// System.out.println(\"Front Left Wheel Selected\");\n\t\t// \tWheel = 1;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getArmUp()) {\n\t\t// \t// System.out.println(\"Back Left Wheel Selected\");\n\t\t// \tWheel = 2;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallIn()) {\n\t\t// \t// System.out.println(\"Front Right Wheel Selected\");\n\t\t// \tWheel = 3;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallOut()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 4;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBlueButton()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 0;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t// } \n\n\t\t// if (Wheel == 1) {\n\n\t\t// \tmyDrive.setFLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 2) {\n\n\t\t// \tmyDrive.setRLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 3) {\n\n\t\t// \tmyDrive.setFRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 4) {\n\n\t\t// \tmyDrive.setRRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// }\n\n\t\t// if (Robot.m_oi.getSafety()) {\n\n\t\t// \tspeedLimit = 1.0;\n\t\t// \tstrafeLimit = 1.0;\n\n\t\t// } else {\n\n\t\t// \tspeedLimit = 0.5; \n\t\t// \tstrafeLimit = 0.8;\n\t\t\t\t\n\t\t// }\n\n\n\n\t\t//System.out.print (\"strafeLimit: \" + strafeLimit);\n\t\t//System.out.println(Robot.m_oi.getX() * strafeLimit);\n\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY() * speedLimit), // set Y speed\n\t\t// \t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t// \t(Robot.m_oi.getRotate() * rotateLimit), // set rotation rate\n\t\t// \t0); // gyro angle \n\t\t\n\t\t//TODO: Rotate robot with vision tracking, set up curve to slow down as target approaches center.\n\t\t// if (Robot.m_oi.getStartButton()) {\n\t\t// \tmyDrive.driveCartesian(\n\t\t// \t\t (0.4), // set Rotation\n\t\t// \t\t (0.0), // set Strafe\n\t\t// \t\t (0.0), // set Forward/Back\n\t\t// \t\t 0);\n\t\t// } else {\n\t\tmyDrive.driveCartesian(\n\t\t\t(Robot.m_oi.getY() * rotateLimit), // set Y speed\n\t\t\t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t\t(Robot.m_oi.getRotate() * speedLimit), // set rotation rate\n\t\t\t0);\n\t\t// }\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY()), // set Y speed\n\t\t// \t(Robot.m_oi.getX()), // set X speed\n\t\t// \t(Robot.m_oi.getRotate()), // set rotation rate\n\t\t// \t0); \n\n }", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "@Override\n public void init() {\n\n try {\n\n // Get wheel motors\n wheelMotor1 = hardwareMap.dcMotor.get(\"Wheel 1\");\n wheelMotor2 = hardwareMap.dcMotor.get(\"Wheel 2\");\n\n // Initialize wheel motors\n wheelMotor1.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n wheelMotor2.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n wheelMotor1.setDirection(DcMotor.Direction.FORWARD);\n wheelMotor2.setDirection(DcMotor.Direction.REVERSE);\n robotDirection = DriveMoveDirection.Forward;\n motion = new Motion(wheelMotor1, wheelMotor2);\n\n // Get hook motor\n motorHook = hardwareMap.dcMotor.get(\"Hook\");\n motorHook.setDirection(DcMotor.Direction.REVERSE);\n\n // Get servos\n servoTapeMeasureUpDown = hardwareMap.servo.get(\"Hook Control\");\n servoClimberDumperArm = hardwareMap.servo.get(\"Climber Dumper Arm\");\n servoDebrisPusher = hardwareMap.servo.get(\"Debris Pusher\");\n servoZipLineLeft = hardwareMap.servo.get(\"Zip Line Left\");\n servoZipLineRight = hardwareMap.servo.get(\"Zip Line Right\");\n servoAllClearRight = hardwareMap.servo.get (\"All Clear Right\");\n servoAllClearLeft = hardwareMap.servo.get (\"All Clear Left\");\n\n setServoPositions();\n }\n catch (Exception ex)\n {\n telemetry.addData(\"error\", ex.getMessage());\n }\n }", "public static void log(int cid, String vName, int value) {\n if (write) {\n String[] entry = {cid + \"\", vName, value + \"\"};\n try {\n csvWriter.writeNext(entry);\n csvWriter.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n // log in list\n checkpointsLst.add(new Checkpoint(cid, vName, value));\n }", "protected void writeControlRegister(long cpuTime, int value) {\n setMotorStarted((value & MSW) != 0);\n // Determine floppy drive to operate\n int driveMask = value & (DS0 | DS1 | DS2 | DS3);\n FloppyDriveIdentifier driveIdentifier = null;\n switch (Integer.lowestOneBit(driveMask)) {\n case DS0:\n driveIdentifier = FloppyDriveIdentifier.A;\n break;\n case DS1:\n driveIdentifier = FloppyDriveIdentifier.B;\n break;\n case DS2:\n driveIdentifier = FloppyDriveIdentifier.C;\n break;\n case DS3:\n driveIdentifier = FloppyDriveIdentifier.D;\n break;\n default:\n // Drive unselected\n break;\n }\n // Select floppy drive\n selectFloppyDrive(driveIdentifier);\n // Do operations on selected drive, if any\n if (driveIdentifier != null) {\n FloppyDrive drive = getFloppyDrive(driveIdentifier);\n // Check is track number or side changed\n FloppyDriveSide trackSide = (value & HS) != 0 ? FloppyDriveSide.UP : FloppyDriveSide.DOWN;\n int trackNumber = (value & ST) != 0 ? drive.getNextTrackNumber((value & DIR) != 0)\n : drive.getCurrentTrackNumber();\n if (trackSide != drive.getCurrentTrackSide()\n || trackNumber != drive.getCurrentTrackNumber()) {\n // Track changed, cancel synchronous read mode\n cancelSynchronousRead();\n // Set floppy drive track number and side\n drive.setCurrentTrack(trackNumber, trackSide);\n }\n // Process GOR flag\n if ((value & GOR) != 0) {\n startSynchronousRead();\n }\n // TODO Process WM flag\n }\n }", "@Override\n public void writeOut(Circuit circuit, boolean state, int index) {\n outputPins[index].setState(state);\n for (ChipListener l : listeners) l.outputChanged(Chip.this, index, state);\n }", "public void writeState(float timer, float xPos, float yPos, Float killCount, Float pHealth, Float level, Float gravity) throws IOException {\n boolean append = false;\n FileWriter writer = null;\n try {\n writer = new FileWriter(fileName, append);\n writer.write(timer + \",\" + xPos + \",\"+ yPos + \",\" + killCount + \",\" + pHealth + \",\" + level + \",\" + gravity + \"\\n\");\n } finally {\n if (writer != null) {\n writer.close();\n }\n }\n }", "public boolean setup() {\n\t\tmakeStream(EVENT, EVENT_BUFFER_SIZE);\n\t\t\n\t\tmakeStream(BAROMETER, BAROMETER_BUFFER_SIZE);\n\t\trocket.barometer.setListener(new MS5611.MS5611Listener() {\n\t\t\t@Override\n\t\t\tpublic void onData(int P /* mbar */, int TEMP /* C */) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(BAROMETER);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + BAROMETER + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeInt(P);\n\t\t\t\t\t\t\tstream.writeInt(TEMP);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + BAROMETER + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(String message) {}\n\t\t});\n\t\t\n//\t\tmakeStream(GYRO, GYRO_BUFFER_SIZE);\n//\t\trocket.gyro.setListener(new ITG3205.ITG3205Listener() {\n//\t\t\t@Override\n//\t\t\tpublic void onDeviceId(byte deviceId) {}\n//\t\t\t\n//\t\t\t@Override\n//\t\t\tpublic void onData(int x, int y, int z, int temperature) {\n//\t\t\t\tif (enabled) {\n//\t\t\t\t\tDataOutputStream stream = out.get(GYRO);\n//\t\t\t\t\t\n//\t\t\t\t\tif (stream == null) {\n//\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + GYRO + \".\");\n//\t\t\t\t\t} else {\n//\t\t\t\t\t\ttry {\n//\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n//\t\t\t\t\t\t\tstream.writeInt(x);\n//\t\t\t\t\t\t\tstream.writeInt(y);\n//\t\t\t\t\t\t\tstream.writeInt(z);\n//\t\t\t\t\t\t\tstream.writeInt(temperature);\n//\t\t\t\t\t\t} catch (IOException e) {\n//\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + GYRO + \" values to output stream.\");\n//\t\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t\t\treturn;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\t\n//\t\t\t@Override\n//\t\t\tpublic void onError(String message) {}\n//\t\t});\n\t\t\n\t\tmakeStream(LOX_PRESSURE, PRESSURE_BUFFER_SIZE);\n\t\trocket.loxPressure.setListener(new P51500AA1365V.P51500AA1365VListener() {\n\t\t\t@Override\n\t\t\tpublic void onVoltage(float voltage) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(LOX_PRESSURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + LOX_PRESSURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(voltage);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + LOX_PRESSURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tmakeStream(ETHANOL_PRESSURE, PRESSURE_BUFFER_SIZE);\n\t\trocket.ethanolPressure.setListener(new P51500AA1365V.P51500AA1365VListener() {\n\t\t\t@Override\n\t\t\tpublic void onVoltage(float voltage) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(ETHANOL_PRESSURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + ETHANOL_PRESSURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(voltage);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + ETHANOL_PRESSURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tmakeStream(ENGINE_PRESSURE, PRESSURE_BUFFER_SIZE);\n\t\trocket.enginePressure.setListener(new P51500AA1365V.P51500AA1365VListener() {\n\t\t\t@Override\n\t\t\tpublic void onVoltage(float voltage) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(ENGINE_PRESSURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + ENGINE_PRESSURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(voltage);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + ENGINE_PRESSURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tmakeStream(ACCELEROMETER, ACCELEROMETER_BUFFER_SIZE);\n\t\trocket.accelerometer.setListener(new ADXL345.ADXL345Listener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onDeviceId(byte deviceId) {}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onMultiplier(float multiplier) {\n\t\t\t\tbyte[] data = new byte[4];\n\t\t\t\tByteBuffer.wrap(data).putFloat(multiplier);\n\t\t\t\tevent(Event.ACCELEROMETER_MULTIPLIER, data);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onData(int x, int y, int z) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(ACCELEROMETER);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + ACCELEROMETER + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeInt(x);\n\t\t\t\t\t\t\tstream.writeInt(y);\n\t\t\t\t\t\t\tstream.writeInt(z);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + ACCELEROMETER + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onError(String message) {}\n\t\t\t\n\t\t});\n\t\t\n\t\tmakeStream(INTERNAL_ACCELEROMETER, ACCELEROMETER_BUFFER_SIZE);\n\t\trocket.internalAccelerometer.setListener(new PhoneAccelerometer.PhoneAccelerometerListener() {\n\t\t\t@Override\n\t\t\tpublic void onPhoneAccelerometer(float x, float y, float z) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(INTERNAL_ACCELEROMETER);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + INTERNAL_ACCELEROMETER + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(x);\n\t\t\t\t\t\t\tstream.writeFloat(y);\n\t\t\t\t\t\t\tstream.writeFloat(z);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + INTERNAL_ACCELEROMETER + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tmakeStream(LOX_TEMPERATURE, TEMPERATURE_BUFFER_SIZE);\n\t\trocket.loxTemperature.setListener(new MAX31855.MAX31855Listener() {\n\t\t\t@Override\n\t\t\tpublic void onFault(byte fault) {}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onData(float internal, float thermocouple) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(LOX_TEMPERATURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + LOX_TEMPERATURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(internal);\n\t\t\t\t\t\t\tstream.writeFloat(thermocouple);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + LOX_TEMPERATURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tmakeStream(IGNITOR_TEMPERATURE, TEMPERATURE_BUFFER_SIZE);\n\t\trocket.ignitorTemperature.setListener(new MAX31855.MAX31855Listener() {\n\t\t\t@Override\n\t\t\tpublic void onFault(byte fault) {}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onData(float internal, float thermocouple) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(IGNITOR_TEMPERATURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + IGNITOR_TEMPERATURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(internal);\n\t\t\t\t\t\t\tstream.writeFloat(thermocouple);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + IGNITOR_TEMPERATURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn true;\n\t}", "public void writeReport()\n {\n // System.out.println(getClass().getName()+\":: writeReport \");\n\n switch (protocol)\n {\n case ProtocolPush:\n synchronized (circularBuffer)\n {\n if (reset /* && pendingWriteReport */)\n return;\n circularBuffer.writeReport();\n }\n getInputConnector().getModule()\n .connectorPushed(getInputConnector());\n return;\n case ProtocolSafe:\n synchronized (circularBuffer)\n {\n if (reset)\n return;\n circularBuffer.writeReport();\n circularBuffer.notifyAll();\n return;\n }\n default:\n throw new RuntimeException();\n }\n\n }", "protected void execute() {\n\t\t// Get output from PID and dvide by 4\n\t\tdouble output = Robot.minipidSubsystem.getOutput(Robot.gyroSubsystem.GyroPosition(), 90) * 0.25;\n\n\t\t// limit output to 25% in either direction\n\t\tif (output > 25)\n\t\t\toutput = 25;\n\t\telse if (output < -25)\n\t\t\toutput = -25;\n\n\t\t// convert output to a value the drive subsystem can use (-1 to 1)\n\t\toutput /= 100;\n\n\t\t// drive the robot, only providing the turn speed\n\t\tRobot.driveSubsystem.robotDrive.arcadeDrive(0, output);\n\t\t// Robot.driveSubsystem.tankDrive(-output, output);\n\t}", "public void writeObject(Obj input){\n\t\tlong newFanSpeedSetpointValue = 0;\n\t\tif(input instanceof FanSpeedActuator){\n\t\t\tFanSpeedActuator in = (FanSpeedActuator) input;\n\t\t\tlog.finer(\"Writing on FanSpeedActuator: \" + in.fanSpeedSetpointValue().get() + \",\" + in.enabled().get());\n\t\t\t\n\t\t\tnewFanSpeedSetpointValue = in.fanSpeedSetpointValue().get();\t\n\t\t\tenabledValue.set(in.enabled().get());\n\t\t\t\n\t\t}\n\t\telse if(input instanceof Int){\n\t\t\tnewFanSpeedSetpointValue = ((Int) input).get();\n\t\t}\n\t\telse if(input instanceof Bool){\n\t\t\tthis.enabledValue.set(((Bool) input).get());\n\t\t}\n\t\tthis.fanSpeedSetpointValue.set(newFanSpeedSetpointValue);\n\t}", "@Override\n public void update(ActorRef actor, Status status) {\n try (Writer w = Files.newBufferedWriter(progressPath, Charset.defaultCharset(), StandardOpenOption.APPEND);\n ProgressWriter log = new ProgressWriter(w)) {\n log.write(actor, status);\n } catch (IOException e) {\n DebugUIFactory.log.error(\"IOError on appending to progress file\", e);\n }\n }", "private void log() {\n\t\t\n//\t\tif (trx_loggin_on){\n\t\t\n\t\tif ( transLogModelThreadLocal.get().isTransLoggingOn() ) {\n\t\t\t\n\t\t\tTransLogModel translog = transLogModelThreadLocal.get();\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\ttransactionLogger.info(\"\"); // don't really need a msg here\n\t\t\t\n\t\t\t// TODO MDC maybe conflic with existing MDC using in the project\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\t\n\t\t\ttranslog.getAttributesOnce().clear();\n\t\t}\n\t\t\n\t}", "public void setMotor(double speed) {\n //set the master motor directly\n m_masterMotor.set(ControlMode.PercentOutput, speed);\n\n //set all other motors to follow\n m_closeSlaveMotor.follow(m_masterMotor, FollowerType.PercentOutput);\n m_farSlaveMotor1.follow(m_masterMotor, FollowerType.PercentOutput);\n m_farSlaveMotor2.follow(m_masterMotor, FollowerType.PercentOutput);\n }", "private void configurateSensor()\n\t{\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"CONFIGURING\", \"state1\");\n\t\tcheckFirmwareVersion();\n\t\t// Write configuration file to sensor\n\t\tsetAndWriteFiles();\n\n\t\t// push comment to RestApi\n\t\ttry\n\t\t{\n\t\t\trestApiUpdate(ConnectionManager.getInstance().currentSensor(0).getSerialNumber(), \"comment\");\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"SENSOR_OUTBOX\", \"state2\");\n\n\t\t// print address\n\t\tint index2 = customerList.getSelectionIndex();\n\t\tfor (Measurement element : mCollect.getList())\n\t\t{\n\t\t\tif (mCollect.getList().get(index2).getLinkId() == element.getLinkId())\n\t\t\t{\n\t\t\t\taData = new AddressData(element.getId());\n\t\t\t\tprintLabel(aData.getCustomerData(), element.getLinkId());\n\t\t\t}\n\n\t\t}\n\n\t\t// set configuration success message\n\t\tstatusBar.setText(\"Sensor is configurated.Please connect another sensor.\");\n\n\t\t// writing date to sensor for synchronization\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).synchronize();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// resetData();\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).disconnect();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t}" ]
[ "0.55900556", "0.55900556", "0.55900556", "0.5445421", "0.5429914", "0.5356051", "0.534288", "0.53358155", "0.5315949", "0.52918607", "0.5286287", "0.526651", "0.5263031", "0.51916414", "0.517464", "0.51583576", "0.5139336", "0.51393217", "0.51316136", "0.51201934", "0.5108757", "0.50967675", "0.50964385", "0.50798696", "0.5058484", "0.50557953", "0.50513375", "0.5050709", "0.5043978", "0.50377345", "0.500837", "0.4990816", "0.4985286", "0.4980919", "0.49786004", "0.49621433", "0.49500316", "0.49451128", "0.49351212", "0.49115306", "0.4907005", "0.48989773", "0.48984227", "0.48964822", "0.48961037", "0.48955935", "0.488554", "0.4881651", "0.4871956", "0.48682594", "0.4865289", "0.4862513", "0.48563027", "0.48494864", "0.48480457", "0.48466045", "0.48462534", "0.48451278", "0.48441112", "0.48358417", "0.482526", "0.48188838", "0.48124152", "0.48108444", "0.48094532", "0.48054498", "0.480048", "0.47942817", "0.47858003", "0.4783677", "0.47804052", "0.47792307", "0.4776751", "0.47735095", "0.47703245", "0.47654504", "0.47642812", "0.47626626", "0.47578305", "0.47537535", "0.47474116", "0.47447428", "0.4741911", "0.47382873", "0.47293657", "0.47278127", "0.47278127", "0.47270498", "0.47223583", "0.47204372", "0.47167858", "0.47122693", "0.47096437", "0.4704642", "0.47014874", "0.4700904", "0.4699933", "0.46977937", "0.46967322", "0.46954304" ]
0.7013137
0
This method initializes this
private void initialize() { this.setJMenuBar(getMainMenuBar()); this.setContentPane(getPaneContent()); this.setSize(800, 600); this.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); this.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent e) { getMainMenuBar().getMenuFileControl().exit(); } }); this.setVisible(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public void init()\n\t\t{\n\t\t}", "public void initialize()\n {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void init() {\n \n }", "@Override\n\t\tpublic void init() {\n\t\t}", "protected void initialize() {\n \t\n }", "@Override\r\n\tpublic void init() {}", "@Override\n public void initialize() {\n \n }", "public void init() {\n\t\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}", "public void initialize(){\n\t\t//TODO: put initialization code here\n\t\tsuper.initialize();\n\t\t\n\t}", "public void init() {\r\n\t\t// to override\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void init() {}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "protected void initialize() {}", "protected void initialize() {}", "@Override\r\n public void initialize()\r\n {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "@Override\n public void init() {\n\n super.init();\n\n }", "public void init() {\r\n\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "protected void initialize() {\r\n }", "protected void initialize() {\r\n }", "public void initialize() {\n // empty for now\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void init() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void 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 init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "protected void init() {\n // to override and use this method\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void initialize() {\r\n }", "private void init() {\n\n\t}", "public void init(){\n \n }", "protected void initialize() {\n\n\t}", "protected void initialize()\r\n {\n }", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n\n }", "@Override\n public void initialize() {\n\n }", "@Override\n\tpublic void initialize() {\n\t\t\n\t}", "public void init() {\n\t\t\n\t}", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n\t\t\n\t}", "protected void initialize() {\n\t\t\n\t}", "protected void init() {\n }", "@Override\r\n\tpublic void init() {\n\t\tsuper.init();\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "private void initialize() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }" ]
[ "0.83539504", "0.8307917", "0.8282791", "0.825615", "0.8200049", "0.8198305", "0.8149035", "0.8121817", "0.8104103", "0.81024307", "0.81024307", "0.81024307", "0.80645996", "0.8053697", "0.8036853", "0.80288565", "0.801887", "0.7991998", "0.7991998", "0.79863125", "0.79849255", "0.7982825", "0.7977926", "0.797778", "0.7975714", "0.7970544", "0.7970544", "0.79680526", "0.79659796", "0.79659796", "0.79659796", "0.7965143", "0.7958811", "0.795454", "0.795454", "0.79539245", "0.79539245", "0.79539245", "0.79539245", "0.79539245", "0.79539245", "0.7943634", "0.7938932", "0.7938932", "0.7938932", "0.79177743", "0.7902158", "0.7902158", "0.7902158", "0.7902158", "0.7902158", "0.7901743", "0.7900613", "0.79001516", "0.789888", "0.78985375", "0.7898089", "0.7898089", "0.7898089", "0.7892801", "0.7892801", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7878777", "0.7878777", "0.78773355", "0.7871734", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.7858029", "0.7858029", "0.7845209", "0.78346074", "0.78341997", "0.7832499", "0.7824276", "0.7824276" ]
0.0
-1
This method initializes paneContent
private javax.swing.JPanel getPaneContent() { if (paneContent == null) { paneContent = new javax.swing.JPanel(); paneContent.setLayout(new BoxLayout(getPaneContent(), BoxLayout.Y_AXIS)); paneContent.setEnabled(true); paneContent.setPreferredSize(new java.awt.Dimension(800,600)); paneContent.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); paneContent.add(getPaneDisplay(), null); paneContent.add(getTxtStatus(), null); } return paneContent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MainContentPane() {\r\n\t\tsuper();\r\n\r\n\t\t// Add design-time configured components.\r\n\t\tinitComponents();\r\n\t}", "public void init()\n {\n buildUI(getContentPane());\n }", "private void initPane() {\n\t\tContainer localContainer = getContentPane();\n\t\tlocalContainer.setLayout(new BorderLayout());\n\t\t\n\t\tsplitpane_left_top.setBorder(BorderFactory.createTitledBorder(\"Training Data\"));\n\t\tsplitpane_left_bottom.setBorder(BorderFactory.createTitledBorder(\"Tree View\"));\n\t\tsplitpane_left.setDividerLocation(400);\n\t\tsplitpane_left.setLastDividerLocation(0);\n\t\tsplitpane_left.setOneTouchExpandable(true);\n\t\tsplitpane_right.setBorder(BorderFactory.createTitledBorder(\"Classifer Output\"));\n\t\tsplitpane_main.setDividerLocation(500);\n\t\tsplitpane_main.setLastDividerLocation(0);\n\t\tsplitpane_main.setOneTouchExpandable(true);\n\t\tlocalContainer.add(splitpane_main, \"Center\");\n\t\tlocalContainer.add(statusPanel,BorderLayout.SOUTH);\n\t}", "public void createContentPane() {\n\t\tLOG.log(\"Creating the content panel.\");\n\t\tCONTENT_PANE = new JPanel();\n\t\tCONTENT_PANE.setBorder(null);\n\t\tCONTENT_PANE.setLayout(new BorderLayout());\n\t}", "public void initialize() {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(548, 372));\n this.add(getTitlePane(), new com.ulcjava.base.application.GridBagConstraints(0, 0, 3, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getXpertIvyPane(), new com.ulcjava.base.application.GridBagConstraints(0, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getLicensePane(), new com.ulcjava.base.application.GridBagConstraints(0, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getDatabasePane(), new com.ulcjava.base.application.GridBagConstraints(0, 3, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getJavaPane(), new com.ulcjava.base.application.GridBagConstraints(0, 4, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n }", "private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}", "private void buildContentPane() {\n\t\t// The JPanel that will become the content pane\n\t\tJPanel cp = new JPanel();\n\t\tcp.setLayout(new BoxLayout(cp, BoxLayout.PAGE_AXIS));\n\n\t\tlanguagePanel = initLanguagePanel();\n\t\tcp.add(languagePanel);\n\n\t\tinputPanel = initInputPanel();\n\t\tcp.add(inputPanel);\n\n\t\tJPanel btnPanel = initBtnPanel();\n\t\tcp.add(btnPanel);\n\n\t\toutputPanel = initOutputPanel();\n\t\tcp.add(outputPanel);\n\n\t\tJPanel picturePanel = initPicturePanel();\n\t\tif(picturePanel == null) {\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_SMALL_HEIGHT);\n\t\t}\n\t\telse {\n\t\t\tcp.add(picturePanel);\n\t\t}\n\n\t\tLanguage selectedLang = languagePanel.getSelectedLanguage();\n\t\tsetLanguage(selectedLang);\n\n\t\tframe.setContentPane(cp);\n\t}", "private void initialize() {\n this.setSize(300, 200);\n this.setContentPane(getJContentPane());\n this.pack();\n }", "private void initialiseUI()\n { \n // The actual data go in this component.\n String defaultRootElement = \"icr:regionSetData\";\n JPanel contentPanel = initialiseContentPanel(defaultRootElement);\n pane = new JScrollPane(contentPanel);\n \n panelLayout = new GroupLayout(this);\n\t\tthis.setLayout(panelLayout);\n\t\tthis.setBackground(DAOConstants.BG_COLOUR);\n\n\t\tpanelLayout.setAutoCreateContainerGaps(true);\n\n panelLayout.setHorizontalGroup(\n\t\t\tpanelLayout.createParallelGroup()\n\t\t\t.addComponent(pane, 10, 520, 540)\n );\n\n panelLayout.setVerticalGroup(\n\t\t\tpanelLayout.createSequentialGroup()\n .addComponent(pane, 10, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)\n );\n }", "private void initialize() {\r\n\t\tthis.setSize(392, 496);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"Informações\");\r\n\t}", "private JComponent buildContentPane() {\r\n contentPane = new ContentPanel(new BorderLayout());\r\n contentPane.add(buildToolBar(), BorderLayout.NORTH);\r\n contentPane.add(buildMainPanel(), BorderLayout.CENTER);\r\n return contentPane;\r\n }", "private void fillContentPane() {\n\t\tadd(Box.createRigidArea(new Dimension(0,10))); //empty spacing\n\n\t\tsetWelcomeText(\"testFirst\", \"testLast\");//TODO remove? the cardChanger sets this when go to this page\n\t\twelcomeText.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tadd(welcomeText);\n\n\t\tadd(Box.createRigidArea(new Dimension(0,10))); //empty spacing\n\n\t\tadd(GuiUtilities.centeredJLabel(\"Courses:\"));\n\t\tsetupCourseList();\n\n\t}", "private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}", "private void fillContentPane(){\n contentPane.add(inicio, \"inicio\");\n contentPane.add(registro, \"registro\");\n contentPane.add(login, \"login\");\n\n /* PANELES DEL USUARIO */\n contentPane.add(inicioUser, \"inicioUser\");\n contentPane.add(notif, \"notif\");\n contentPane.add(perfil, \"perfil\");\n contentPane.add(nuevoColectivo, \"nuevoColectivo\");\n contentPane.add(nuevoProyecto, \"nuevoProyecto\");\n contentPane.add(informes, \"informes\");\n\n /* DISPLAYS */\n contentPane.add(displayProject, \"displayProject\");\n contentPane.add(displayCollective, \"displayCollective\");\n\n /* PANELES DEL ADMINISTRADOR */\n contentPane.add(inicioAdmin, \"inicioAdmin\");\n contentPane.add(adminUsuarios, \"adminUsuarios\");\n contentPane.add(adminConfig, \"adminConfig\");\n }", "public void addContent() {\n ScrollPane mySP = new ScrollPane();\n myContent = new SaveForm(myManager);\n mySP.setContent(myContent);\n mySP.setPrefSize(size, size);\n myRoot.getChildren().add(mySP);\n }", "private void initComponents() {\n\n jScrollPane = new javax.swing.JScrollPane();\n jPanelContent = new javax.swing.JPanel();\n\n setPreferredSize(new java.awt.Dimension(300, 600));\n\n jScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n\n jPanelContent.setLayout(new java.awt.GridLayout(1, 0));\n jScrollPane.setViewportView(jPanelContent);\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 .addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 523, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE)\n );\n }", "public Container createContentPane()\r\n\t{\r\n\t\t//add items to lvl choice\r\n\t\tfor(int g=1; g<21; g++)\r\n\t\t{\r\n\t\t\tcharLvlChoice.addItem(String.valueOf(g));\r\n\t\t}\r\n\r\n\t\t//add stuff to panels\r\n\t\tinputsPanel.setLayout(new GridLayout(2,2,3,3));\r\n\t\tdisplayPanel.setLayout(new GridLayout(1,1,8,8));\r\n\t\tinputsPanel.add(runButton);\r\n\t\tinputsPanel.add(clearButton);\r\n\t\t\ttimesPanel.add(timesLabel);\r\n\t\t\ttimesPanel.add(runTimesField);\r\n\t\tinputsPanel.add(timesPanel);\r\n\t\t\tlevelPanel.add(levelLabel);\r\n\t\t\tlevelPanel.add(charLvlChoice);\r\n\t\tinputsPanel.add(levelPanel);\r\n\t\t\trunTimesField.setText(\"1\");\r\n\t\tdisplay.setEditable(false);\r\n\r\n\t\trunButton.addActionListener(this);\r\n\t\tclearButton.addActionListener(this);\r\n\r\n\t\tdisplay.setBackground(Color.black);\r\n\t\tdisplay.setForeground(Color.white);\r\n\r\n\t\tsetTabsAndStyles(display);\r\n\t\tdisplay = addTextToTextPane();\r\n\t\t\tJScrollPane scrollPane = new JScrollPane(display);\r\n\t\t\t\tscrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\t\t\tscrollPane.setPreferredSize(new Dimension(500, 200));\r\n\t\tdisplayPanel.add(scrollPane);\r\n\r\n\t\t//create Container and set attributes\r\n\t\tContainer c = getContentPane();\r\n\t\t\tc.setLayout(new BorderLayout());\r\n\t\t\tc.add(inputsPanel, BorderLayout.NORTH);\r\n\t\t\tc.add(displayPanel, BorderLayout.CENTER);\r\n\r\n\t\treturn c;\r\n\t}", "public AnchorPane getContent(){\r\n\t\treturn root;\r\n\t}", "private void setContentPanelComponents(){\n\t\tcontentPanel = new JPanel();\n\t\tcontentPanel.setLayout(new BorderLayout());\n\t\tcontentPanel.setBackground(Constant.DIALOG_BOX_COLOR_BG);\n\t\tgetContentPane().add(contentPanel, BorderLayout.NORTH);\n\t\t\n\t\t//--------------------------\n\t\tJPanel payrollDatePanel= new JPanel();\n\t\tpayrollDatePanel.setLayout(new GridLayout(0,2,5,5));\n\t\tpayrollDatePanel.setPreferredSize(new Dimension(0,20));\n\t\tpayrollDatePanel.setOpaque(false);\n\t\t\n\t\tlblPayrollDate = new JLabel(\"Payroll Date: \");\n\t\tlblPayrollDate.setForeground(Color.WHITE);\n\t\tlblPayrollDate.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tpayrollDatePanel.add(lblPayrollDate);\n\t\t\n\t\t\n\t\tpayrollDateComboBox = new JComboBox<String>();\n\t\tpayrollDatePanel.add(payrollDateComboBox);\n\t\n\t\t\n\t\tcontentPanel.add(payrollDatePanel,BorderLayout.NORTH);\n\t\t//--------------------------\n\t\t\n\t\n\t\tJPanel textAreaPanel= new JPanel();\n\t\ttextAreaPanel.setPreferredSize(new Dimension(0, 95));\n\t\ttextAreaPanel.setLayout(null);\n\t\ttextAreaPanel.setOpaque(false);\n\t\t\n\t\t\n\t\tcontentPanel.add(textAreaPanel,BorderLayout.CENTER);\n\t\t\n\t\tJLabel lblComments = new JLabel(\"Comments:\");\n\t\tlblComments.setForeground(Color.WHITE);\n\t\tlblComments.setBounds(10, 11, 75, 14);\n\t\ttextAreaPanel.add(lblComments);\n\t\t\n\t\tcommentTextArea = new JTextArea();\n\t\tcommentTextArea.setBounds(87, 14, 100, 75);\n\t\ttextAreaPanel.add(commentTextArea);\n\t}", "private void initialize() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setSize(300, 200);\n\t\tthis.add(getJScrollPane(), java.awt.BorderLayout.CENTER);\n\t}", "private void initialize() {\r\n this.setSize(new Dimension(666, 723));\r\n this.setContentPane(getJPanel());\r\n\t\t\t\r\n\t}", "@Override\n\tprotected void initContentView() {\n\t\t\n\t}", "private void createLayout () {\n \t\n \tBorderPane border = new BorderPane();\n \t\n \t\n \t tabPane = new TabPane();\n ArrayList <ScrollPane> tabs = new ArrayList <ScrollPane>();\n \t\n //create column 1 - need to refactor this and make more generic\n TilePane col1 = new TilePane();\n \tcol1.setPrefColumns(2);\n \tcol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol1.setAlignment(Pos.TOP_LEFT);\n \tcol1.getChildren().addAll(createElements ());\n \tScrollPane scrollCol1 = new ScrollPane(col1);\n \ttabs.add(scrollCol1);\n \t\n \tTilePane col2 = new TilePane();\n \tcol2.setPrefColumns(2);\n \tcol2.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol2.setAlignment(Pos.TOP_LEFT);\n \tcol2.getChildren().addAll(createElements ());\n \tScrollPane scrollCol2 = new ScrollPane(col2);\n \ttabs.add(scrollCol2);\n \t\n \t\n \t\n for (int i = 0; i < tabs.size(); i++) {\n Tab tab = new Tab();\n String tabLabel = \"Col-\" + i;\n tab.setText(tabLabel);\n keywordsList.put(tabLabel, new ArrayList <String>());\n \n tab.setContent(tabs.get(i));\n tabPane.getTabs().add(tab);\n }\n \t\n \t\n \t\n \t\n \t\n \t\n //System.out.println(controller.getScene());\n border.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n border.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n ToolBar toolbar = createtoolBar();\n toolbar.setPrefHeight(50);\n \n border.setTop(toolbar);\n\t\t\n\n\t scrollCol1.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n\t scrollCol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n border.setCenter(tabPane);\n\t Group root = (Group)this.getRoot();\n root.getChildren().add(border);\n\t}", "private JPanel getContent()\r\n\t{\r\n\r\n\t\tJPanel pane = new JPanel();\r\n\t\tpane.setLayout(new GridBagLayout());\r\n\t\t\t\t\r\n\t\tGridBagConstraints c = new GridBagConstraints();\r\n\t\t\r\n\t\tc.insets = new Insets(10, 5, 0, 5);\r\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tc.weightx =1.0;\r\n\t\tc.gridy = 0;\r\n\t\tc.gridx = 0;\r\n\t\tpane.add(new CustLabel(\"Risikostrategie für die Bestellung\"),c);\r\n\t\t\r\n\t\tc.gridy = 1;\r\n\t\tc.gridx = 0;\r\n\t\tpane.add(new OrderRiskPane(),c);\r\n\t\t\r\n\t\tc.insets.top=30;\t\r\n\t\tc.gridy = 2;\r\n\t\tc.gridx = 0;\r\n\t\tpane.add(new CustLabel(\"Überstunden\"),c);\r\n\t\t\r\n\t\tc.insets.top=10;\t\r\n\t\tc.gridy = 3;\r\n\t\tc.gridx = 0;\r\n\t\tpane.add(new OvertimePane(),c);\r\n\t\t\r\n\t\treturn pane;\r\n\t}", "private void initialize() {\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(810, 600);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\t\tthis.setModal(true);\n\t\tthis.setResizable(false);\n\t\tthis.setName(\"FramePrincipalLR\");\n\t\tthis.setTitle(\"CR - Lista de Regalos\");\n\t\tthis.setLocale(new java.util.Locale(\"es\", \"VE\", \"\"));\n\t\tthis.setUndecorated(false);\n\t}", "private void initializeGrid() {\n // 50 pixel first row for banner\n addPercentRows(root, 5);\n // second row takes up 100% of the remaining space\n addPercentRows(root, 95);\n // One column at 100% width\n addPercentColumns(root, 100);\n\n Label title = new Label(\"Mission Control\");\n title.setFont(new Font(\"Arial\", 22));\n title.setTextFill(Color.WHITE);\n\n GridPane contentGrid = new GridPane();\n // Only need one row as content will fill the entire vertical space\n addPercentRows(contentGrid, 100);\n\n // Need three columns, 1/6 column for nav, 2/3 for main content, 1/6 for warnings\n double sidePanelPercent = (1d / 6d) * 100d;\n double centerPanelPercent = (2d / 3d) * 100d;\n addPercentColumns(contentGrid, sidePanelPercent, centerPanelPercent, sidePanelPercent);\n\n\n addNodeToGrid(title, root, 0, 0, Pos.CENTER, Colours.PRIMARY_COLOUR, Insets.EMPTY);\n // NOTE:: This assumes that it is the only child added to root by this point to set ID.\n // If this is changed DynamicGuiTests will break.\n root.getChildren().get(0).setId(\"pnBanner\");\n\n addNodeToGrid(contentGrid, root, 1, 0);\n\n setupCenterPanel(contentGrid);\n setupRightHandSidePanel(contentGrid);\n setupLeftHandSidePanel(contentGrid);\n\n // Assert they are created - mainly to bypass Spot bugs issues.\n assert this.navigationView != null;\n assert this.graphView != null;\n assert this.informationView != null;\n }", "private void initialize() {\r\n\t\tthis.setSize(733, 427);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"jProxyChecker\");\r\n\t}", "private void initialize() {\n this.setSize(495, 276);\n this.setTitle(\"Translate Frost\");\n this.setContentPane(getJContentPane());\n }", "private void initialize() {\n\t\tthis.setSize(430, 280);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setUndecorated(true);\n\t\tthis.setModal(true);\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setTitle(\"Datos del Invitado\");\n\t\tthis.addComponentListener(this);\n\t}", "private void initialize() {\n\t\tthis.setSize(293, 155);\n\t\tthis.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"/abdo.jpg\")));\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"Désincription d'un étudiant\");\n\t}", "protected javax.swing.JPanel getJContentPane() {\n if (jContentPane == null) {\n jContentPane = new javax.swing.JPanel();\n java.awt.GridBagConstraints consGridBagConstraints9 = new java.awt.GridBagConstraints();\n java.awt.GridBagConstraints consGridBagConstraints8 = new java.awt.GridBagConstraints();\n java.awt.GridBagConstraints consGridBagConstraints10 = new java.awt.GridBagConstraints();\n consGridBagConstraints9.insets = new java.awt.Insets(1,5,2,5);\n consGridBagConstraints9.ipady = 263;\n consGridBagConstraints9.ipadx = 0;\n consGridBagConstraints9.fill = java.awt.GridBagConstraints.BOTH;\n consGridBagConstraints9.weighty = 2.0D;\n consGridBagConstraints9.weightx = 1.0;\n consGridBagConstraints9.gridy = 1;\n consGridBagConstraints9.gridx = 0;\n consGridBagConstraints8.insets = new java.awt.Insets(2,5,6,5);\n consGridBagConstraints8.ipadx = 0;\n consGridBagConstraints8.fill = java.awt.GridBagConstraints.HORIZONTAL;\n consGridBagConstraints8.weighty = 1.0;\n consGridBagConstraints8.weightx = 1.0;\n consGridBagConstraints8.gridy = 2;\n consGridBagConstraints8.gridx = 0;\n consGridBagConstraints10.insets = new java.awt.Insets(6,5,1,5);\n consGridBagConstraints10.ipadx = 0;\n consGridBagConstraints10.fill = java.awt.GridBagConstraints.HORIZONTAL;\n consGridBagConstraints10.weighty = 1.0;\n consGridBagConstraints10.weightx = 1.0;\n consGridBagConstraints10.gridy = 0;\n consGridBagConstraints10.gridx = 0;\n jContentPane.setLayout(new java.awt.GridBagLayout());\n jContentPane.add(getJPanelExitButtons(), consGridBagConstraints8);\n jContentPane.add(getJScrollPane(), consGridBagConstraints9);\n jContentPane.add(getJPanelPlayListButtons(), consGridBagConstraints10);\n }\n return jContentPane;\n }", "private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "private JPanel buildContentPane(){\t\n\t\tinitialiseElements();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new FlowLayout());\n\t\tpanel.setBackground(Color.lightGray);\n\t\tpanel.add(scroll);\n\t\tpanel.add(bouton);\n\t\tpanel.add(bouton2);\n\t\treturn panel;\n\t}", "public void initialPanes()\r\n\t{\n\t\t\t\tlmg.setLayout(null);\r\n\t\t\t\tlmg.setBounds(0, 0, 1280, 720);\r\n\t\t\t\t\r\n\t\t//adding child panes\r\n\t\t\t\t//World background pane\r\n\t\t\t\t\tlmg.add(wB, new Integer(0));\r\n\t\t\t\t//World pane\r\n\t\t\t\t\tlmg.add(w, new Integer(1));\r\n\t\t\t\t\t\r\n\t\t//DisplayPanel adds the layered pane which holds all child pane\r\n\t\t\t\tadd(lmg);\r\n\t}", "public void initScrollpane()\r\n \t{\n \t\tthis.panel.setPreferredSize( new Dimension( this.map.rows() * 32, this.map.cols() * 32 ) );\r\n \t\t\r\n \t\tthis.scroll.setViewportView( this.panel );\r\n \t}", "public IPPane() {\n\t\tsuper(new BorderLayout());\n\t\tfont = new Font(\"Monospaced\", Font.PLAIN, 12);\n\t\theader = new Header();\n\t\tthis.add(header,BorderLayout.NORTH);\n\t\tscroller = new JScrollPane();\n\t\teditor = new ScrollableEditorPane(\"text/plain\",\"\");\n\t\tscroller.setViewportView(editor);\n\t\tthis.add(scroller,BorderLayout.CENTER);\n\t\teditor.setFont(font);\n\t}", "public void addContentTo(JRootPane rootPane) {\r\n JPanel contentPane = new JPanel(new BorderLayout());\r\n rootPane.setContentPane(contentPane);\r\n configure(rootPane);\r\n }", "private void initLayoutComponents()\n {\n viewPaneWrapper = new JPanel(new CardLayout());\n viewPane = new JTabbedPane();\n crawlPane = new JPanel(new BorderLayout());\n transitionPane = new JPanel();\n searchPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n resultsPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n }", "private void setupLayout()\n {\n Container contentPane;\n\n setSize(300, 300); \n\n contentPane = getContentPane();\n\n // Layout this PINPadWindow\n }", "private void initComponents() {\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n }", "private void initialize()\n\t{\n\t\tthis.setModal(true);\t\t\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(450,400);\n\t\tScreenResolution.centerComponent(this);\n\t}", "private javax.swing.JPanel getJContentPane() {\n if (jContentPane == null) {\n jContentPane = new javax.swing.JPanel();\n jContentPane.setLayout(new java.awt.BorderLayout());\n jContentPane.add(getPButtons(), java.awt.BorderLayout.SOUTH);\n jContentPane.add(getSpPrefixList(), java.awt.BorderLayout.CENTER);\n }\n return jContentPane;\n }", "private void initialize() {\n\t\tthis.setSize(629, 270);\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setPreferredSize(new Dimension(629, 270));\n\t\tthis.setMinimumSize(new Dimension(629, 270));\n\t\tthis.setMaximumSize(new Dimension(629, 270));\n\t\tthis.add(getJSplitPane2(), BorderLayout.CENTER);\n\t}", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setTitle(\"Error\");\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "@Override\n\tpublic void setPane() {\n\t\tNewTaskPane textListPane = new NewTaskPane();\n\t\trootPane = new HomePane(new MainLeftPane(),textListPane);\t\t\n\t}", "public void initView() {\n JPanel pane= new JPanel();\n panel = new JPanel();\n this.getFile(pane);\n JScrollPane scp = new JScrollPane(pane);\n scp.setPreferredSize(new Dimension(500, 280));\n scp.setVisible(true);\n enter.setPreferredSize(new Dimension(100, 50));\n enter.setVisible(true);\n enter.setActionCommand(\"enter\");\n enter.addActionListener(this);\n send.setPreferredSize(new Dimension(80, 50));\n send.setVisible(true);\n send.setActionCommand(\"sendOptions\");\n send.addActionListener(this);\n send.setEnabled(true);\n back.setVisible(true);\n back.setActionCommand(\"back\");\n back.addActionListener(this);\n back.setPreferredSize(new Dimension(80, 50));\n \n panel.add(scp);\n panel.add(send);\n panel.add(enter);\n panel.add(back);\n Launch.frame.add(panel);\n }", "@Override\n\tpublic void setPane() {\n\t\tNewSchedulePane SchListPane = new NewSchedulePane();\n\t\trootPane = new HomePane(new MainLeftPane(),SchListPane);\n\t}", "private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }", "private void init() {\n this.currentStatus = false;\n\n // Instantiate both the left & the right panels.\n leftPanel = new LeftListPanel();\n rightPanel = new RightListPanel();\n // Initialize the splitPane with left & right panels.\n splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPanel, rightPanel);\n\n }", "@Override\n public void initialize() {\n sectionsPanel.removeAll();\n \n section1 = new ProgressReportSectionSettingPanel(this);\n section2 = new ProgressReportSectionSettingPanel(this);\n section3 = new ProgressReportSectionSettingPanel(this);\n section4 = new ProgressReportSectionSettingPanel(this);\n addSectionElement(0,section1);\n addSectionElement(1,section2);\n addSectionElement(2,section3);\n addSectionElement(3,section4);\n \n refresh();\n }", "private JPanel getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(new BorderLayout());\r\n\t\t\tjContentPane.add(getTlbNavigate(), BorderLayout.NORTH);\r\n\t\t\tjContentPane.add(getPnlCenter(), BorderLayout.CENTER);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}", "private void initBaseLayout()\n {\n add(viewPaneWrapper, BorderLayout.CENTER);\n \n currentLayoutView = VIEW_PANE;\n currentSearchView = SEARCH_PANE_VIEW;\n showMainView(VIEW_PANE);\n showSearchView(currentSearchView);\n }", "private JPanel getJContentPane() {\r\n if (jContentPane == null) {\r\n jContentPane = new JPanel();\r\n jContentPane.setLayout(new BorderLayout());\r\n }\r\n return jContentPane;\r\n }", "private JPanel getJContentPane() {\n\t\tif (jContentPane == null) {\n\t\t\tjContentPane = new JPanel();\n\t\t\t// jContentPane.setLayout(new BorderLayout());\n\t\t\tjContentPane.setLayout(new CardLayout());\n\t\t\tjContentPane.setPreferredSize(new Dimension(25, 25));\n\t\t}\n\t\treturn jContentPane;\n\t}", "public ReportPane() {\n initComponents();\n }", "public void pridajPane() {\n\t\tmojPane.setAlignment(Pos.CENTER);\n\n\t\tmojPane.getChildren().addAll(informacia, vyberPredmetov, tabulkaZiak);\n\t}", "private void initComponents() {\n\t\t\n\t\tsetBounds(800, 250, 320, 250);\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\t{\n\t\t\tbuttonPane = new JPanel();\n\t\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\t\t{\n\t\t\t\tbtnOK = new JButton(\"OK\");\n\t\t\t\tbtnOK.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\t\t\tbtnOK.setIcon(null);\n\t\t\t\tbtnOK.setActionCommand(\"OK\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbuttonPane.add(btnOK);\n\t\t\t\tgetRootPane().setDefaultButton(btnOK);\n\t\t\t}\n\t\t\t{\n\t\t\t\tbtnCancel = new JButton(\"Cancel\");\n\t\t\t\tbtnCancel.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\t\t\tbtnCancel.setActionCommand(\"Cancel\");\n\t\t\t\tbuttonPane.add(btnCancel);\n\t\t\t}\n\t\t}\n\t\tGroupLayout groupLayout = new GroupLayout(getContentPane());\n\t\tgroupLayout.setHorizontalGroup(\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addComponent(contentPanel, GroupLayout.DEFAULT_SIZE, 311, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(buttonPane, GroupLayout.DEFAULT_SIZE, 311, Short.MAX_VALUE))\n\t\t\t\t\t.addGap(76))\n\t\t);\n\t\tgroupLayout.setVerticalGroup(\n\t\t\tgroupLayout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\n\t\t\t\t\t.addComponent(contentPanel, GroupLayout.PREFERRED_SIZE, 160, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 39, Short.MAX_VALUE)\n\t\t\t\t\t.addComponent(buttonPane, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t);\n\t\tlblXCoordinate = new JLabel(\"X coordinate (ULP):\");\n\t\tlblXCoordinate.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tlblYCoordinate = new JLabel(\"Y coordinate (ULP):\");\n\t\tlblYCoordinate.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tlblHeight = new JLabel(\"Height:\");\n\t\tlblHeight.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tlblWidth = new JLabel(\"Width:\");\n\t\tlblWidth.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\t\n\t\ttxtXC = new JTextField();\n\t\ttxtXC.setEnabled(false);\n\t\ttxtXC.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\ttxtXC.setColumns(10);\n\t\t\n\t\ttxtYC = new JTextField();\n\t\ttxtYC.setEnabled(false);\n\t\ttxtYC.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\ttxtYC.setColumns(10);\n\t\t\n\t\ttxtHeight = new JTextField();\n\t\ttxtHeight.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\ttxtHeight.setColumns(10);\n\t\t\n\t\ttxtWidth = new JTextField();\n\t\ttxtWidth.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\ttxtWidth.setColumns(10);\n\t\t\n\t\ttxtColor = new JTextField();\n\t\ttxtColor.setMaximumSize(new Dimension(6, 22));\n\t\ttxtColor.setEnabled(false);\n\t\ttxtColor.setVisible(false);\n\t\ttxtColor.setColumns(10);\n\t\t\n\t\ttxtFill = new JTextField();\n\t\ttxtFill.setMaximumSize(new Dimension(6, 22));\n\t\ttxtFill.setVisible(false);\n\t\ttxtFill.setEnabled(false);\n\t\ttxtFill.setColumns(10);\n\t\t\n\t\t\n\t\tGroupLayout gl_contentPanel = new GroupLayout(contentPanel);\n\t\tgl_contentPanel.setHorizontalGroup(\n\t\t\tgl_contentPanel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addComponent(lblXCoordinate, GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(lblYCoordinate)\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t\t\t.addComponent(txtColor, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t.addComponent(txtFill, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 29, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addComponent(lblHeight, Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(lblWidth, Alignment.TRAILING))))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\n\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(txtHeight, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(txtWidth, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t.addComponent(txtYC, Alignment.LEADING, 0, 0, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addComponent(txtXC, Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 68, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tgl_contentPanel.setVerticalGroup(\n\t\t\tgl_contentPanel.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(lblXCoordinate)\n\t\t\t\t\t\t.addComponent(txtXC, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(lblYCoordinate)\n\t\t\t\t\t\t.addComponent(txtYC, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\n\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t.addComponent(txtColor, GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addComponent(txtFill, GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE))\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(lblHeight)\n\t\t\t\t\t\t\t\t.addComponent(txtHeight, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(lblWidth)\n\t\t\t\t\t\t\t\t.addComponent(txtWidth, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t.addGap(29))\n\t\t);\n\t\tcontentPanel.setLayout(gl_contentPanel);\n\t\tgetContentPane().setLayout(groupLayout);\n\t}", "private void initialize() {\n\t\tthis.setSize(300, 300);\n\t\tthis.setIconifiable(true);\n\t\tthis.setClosable(true);\n\t\tthis.setTitle(\"Sobre\");\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setFrameIcon(new ImageIcon(\"images/16x16/info16x16.gif\"));\n\t}", "private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}", "private JPanel getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(null);\r\n\r\n\t\t\tJTabbedPane mainTabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\t\tmainTabbedPane.setBounds(10, 29, 606, 331);\r\n\t\t\tjContentPane.add(mainTabbedPane);\r\n\t\t\tmainTabbedPane.addTab(\"Verify\", null, getVerifyPanel(), null);\r\n\t\t\tmainTabbedPane.addTab(\"Add/Capture\", null, getCapturePanel(), null);\r\n\t\t\tmainTabbedPane.addTab(\"Train\", null, getTrainPanel(), null);\r\n\t\t\t// mainTabbedPane.addTab(\"Train Data Editor\", null,\r\n\t\t\t// getTrainTestDataEditorPanel(), null);\r\n\t\t\tjContentPane.add(getStatusLabel());\r\n\t\t\tjContentPane.add(getAboutLabel());\r\n\r\n\t\t\tJLabel lblMouseGestureRecognition = new JLabel(\"Mouse Gesture Recognition\");\r\n\t\t\tlblMouseGestureRecognition.setFont(new Font(\"Arial\", Font.BOLD, 15));\r\n\t\t\tlblMouseGestureRecognition.setBounds(410, 11, 206, 27);\r\n\t\t\tjContentPane.add(lblMouseGestureRecognition);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}", "private void initMainComponents() {\n\t\tsetBackground(Color.RED);\n\t\tsetTitle(\"TABL\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 974, 842);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(new Color(100, 149, 237));\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\t\n\t\tcontentPane.setVisible(true);\n\t\tcontentPane.setLayout(null);\n\t\t\n\t\t\n\t\tlayeredPane = new JLayeredPane();\n\t\tlayeredPane.setBounds(10, 40, 941, 757);\n\t\tcontentPane.add(layeredPane);\n\t\t\n\t\tsetForeground(Color.BLACK);\n\t\tsetIconImage(Toolkit.getDefaultToolkit().getImage(AdminManageUsers.class.getResource(\"/resources/Logo.PNG\")));\n\n\t}", "public SummaryPane() {\n\t\tbuildUpGUI();\n\t\tsetDefaultValues();\n\t\t//summaryEditorPane.addHyperlinkListener( new Hyperactive() );\n\t}", "private PanelConImagen getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjLabel10 = new JLabel();\r\n\t\t\tjLabel10.setBounds(new Rectangle(108, 292, 106, 19));\r\n\t\t\tjLabel10.setText(\"Fonasa\");\r\n\t\t\tjLabel10.setForeground(Color.black);\r\n\t\t\tjLabel9 = new JLabel();\r\n\t\t\tjLabel9.setBounds(new Rectangle(107, 217, 106, 19));\r\n\t\t\tjLabel9.setText(\"Direccion\");\r\n\t\t\tjLabel9.setForeground(Color.black);\r\n\t\t\tjLabel8 = new JLabel();\r\n\t\t\tjLabel8.setBounds(new Rectangle(107, 191, 106, 19));\r\n\t\t\tjLabel8.setText(\"E-mail\");\r\n\t\t\tjLabel8.setForeground(Color.black);\r\n\t\t\tjLabel7 = new JLabel();\r\n\t\t\tjLabel7.setBounds(new Rectangle(107, 268, 106, 19));\r\n\t\t\tjLabel7.setText(\"Fecha Ingreso *\");\r\n\t\t\tjLabel7.setForeground(Color.black);\r\n\t\t\tjLabel6 = new JLabel();\r\n\t\t\tjLabel6.setBounds(new Rectangle(107, 243, 106, 19));\r\n\t\t\tjLabel6.setText(\"Telefono\");\r\n\t\t\tjLabel6.setForeground(Color.black);\r\n\t\t\tjLabel5 = new JLabel();\r\n\t\t\tjLabel5.setBounds(new Rectangle(107, 166, 106, 19));\r\n\t\t\tjLabel5.setText(\"C.I *\");\r\n\t\t\tjLabel5.setForeground(Color.black);\r\n\t\t\tjLabel4 = new JLabel();\r\n\t\t\tjLabel4.setBounds(new Rectangle(107, 140, 106, 19));\r\n\t\t\tjLabel4.setForeground(java.awt.Color.black);\r\n\t\t\tjLabel4.setText(\"Apellido *\");\r\n\t\t\tjLabel3 = new JLabel();\r\n\t\t\tjLabel3.setBounds(new Rectangle(107, 112, 106, 19));\r\n\t\t\tjLabel3.setForeground(java.awt.Color.black);\r\n\t\t\tjLabel3.setText(\"Nombre *\");\r\n\t\t\tjLabel1 = new JLabel();\r\n\t\t\tjLabel1.setBounds(new Rectangle(214, 9, 136, 33));\r\n\t\t\tjLabel1.setFont(new java.awt.Font(\"Arial\", java.awt.Font.PLAIN, 18));\r\n\t\t\tjLabel1.setForeground(new java.awt.Color(118,144,201));\r\n\t\t\tjLabel1.setText(\" Alta de Afiliado\");\r\n\t\t\tjLabel2 = new JLabel();\r\n\t\t\tjLabel2.setBounds(new Rectangle(107, 84, 106, 19));\r\n\t\t\tjLabel2.setForeground(java.awt.Color.black);\r\n\t\t\tjLabel2.setText(\"Nro. Afiliado *\");\r\n\t\t\tjContentPane = new PanelConImagen(\"./fondos/imgFondoGrl.jpg\");\r\n\t\t\tjContentPane.setLayout(null);\r\n\t\t\tjContentPane.setForeground(java.awt.Color.white);\r\n\t\t\tjContentPane.setBackground(new java.awt.Color(80,80,80));\r\n\t\t\tjContentPane.add(jLabel1, null);\r\n\t\t\tjContentPane.add(jLabel2, null);\r\n\t\t\tjContentPane.add(jLabel3, null);\r\n\t\t\tjContentPane.add(jLabel4, null);\r\n\t\t\tjContentPane.add(getJTextField1(), null);\r\n\t\t\tjContentPane.add(getJTextField2(), null);\r\n\t\t\tjContentPane.add(getJButton1(), null);\r\n\t\t\tjContentPane.add(getJButton2(), null);\r\n\t\t\tjContentPane.add(jTextField1, null);\r\n\t\t\tjContentPane.add(getJTextField(), null);\r\n\t\t\tjContentPane.add(jLabel5, null);\r\n\t\t\tjContentPane.add(getJTextField3(), null);\r\n\t\t\tjContentPane.add(jLabel6, null);\r\n\t\t\tjContentPane.add(getJTextField4(), null);\r\n\t\t\tjContentPane.add(jLabel7, null);\r\n\t\t\tjContentPane.add(jLabel8, null);\r\n\t\t\tjContentPane.add(getJTextField5(), null);\r\n\t\t\tjContentPane.add(jLabel9, null);\r\n\t\t\tjContentPane.add(getJTextField6(), null);\r\n\t\t\tjContentPane.add(jLabel10, null);\r\n\t\t\tjContentPane.add(getJCheckBox(), null);\r\n\t\t\tjContentPane.add(getJPanelFecha(), null);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}", "public PaneOrganizer() {\n\t\t\n\t\t_root = new BorderPane();\n\t\t_game = new Game(_root);\n\t\tthis.setupButton();\n\t\t\n\t}", "public Content_p7() {\n initComponents();\n }", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "private void addContent(Container pane) {\n //todo: make me\n pane.setLayout(new GridBagLayout());\n\n GridBagConstraints gbc = new GridBagConstraints();\n gbc.fill = GridBagConstraints.NONE;\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.CENTER;\n gbc.insets = new Insets(10, 10, 10, 10);\n\n infoLabel = new JLabel(\"Hello, Alex\");\n add(infoLabel, gbc);\n\n gbc.gridwidth = 1;\n gbc.gridy = 1;\n gbc.gridx = GridBagConstraints.RELATIVE;\n\n //feed\n for (int i = 0; i < zoo.getAnimals().size(); ++i) {\n Animal currAnimal = zoo.getAnimals().get(i);\n JButton btn = new JButton(\"Feed \" + currAnimal.getName());\n add(btn, gbc);\n\n int finalI = i;\n btn.addActionListener((ActionEvent actionEvent) -> {\n showInfo(zoo.getWorker().feedAnimal(finalI, \"Apple\"));\n });\n }\n\n gbc.gridy = 2;\n //clear\n for (int i = 0; i < zoo.getAnimals().size(); ++i) {\n Animal currAnimal = zoo.getAnimals().get(i);\n JButton btn = new JButton(\"Clear \" + currAnimal.getName() + \"'s cave\");\n add(btn, gbc);\n\n int finalI = i;\n btn.addActionListener((ActionEvent actionEvent) -> {\n showInfo(zoo.getWorker().ClearAnimalCage(finalI));\n });\n }\n }", "private JPanel getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(new BorderLayout());\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}", "protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}", "public void setContents()\r\n\t{\r\n\t\t// contents.widthProperty().bind(this.prefWidthProperty());\r\n\t\t// contents.heightProperty().bind(this.prefHeightProperty());\r\n\t\t// contents.resize(width, height);\r\n\t\t// contents.relocate(width/4, height/4);\r\n\r\n\t}", "public void init() {\n setLayout(new BorderLayout());\n }", "private JPanel getJContentPane() {\n\t\tif (jContentPane == null) {\n\t\t\tjContentPane = new JPanel();\n\t\t\tjContentPane.setLayout(new BorderLayout());\n\t\t\tjContentPane.setBorder(javax.swing.BorderFactory.createEmptyBorder(\n\t\t\t\t\t5, 5, 5, 5));\n\t\t\tjContentPane.add(getButtonPanel(), java.awt.BorderLayout.SOUTH);\n\t\t\tjContentPane.add(getScrollPane(), java.awt.BorderLayout.CENTER);\n\t\t}\n\t\treturn jContentPane;\n\t}", "private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}", "private void initComponent() {\r\n\t\t//Initialize variables to empty objects\r\n\t\tcard = new CardLayout();\r\n\t\tcardText = new CardLayout();\r\n\t\tslidePane = new JPanel();\r\n\t\ttextPane = new JPanel();\r\n\t\ttextPane.setBackground(Color.BLUE);\r\n\t\ttextPane.setBounds(5, 470, 790, 50);\r\n\t\ttextPane.setVisible(true);\r\n\t\tbuttonPane = new JPanel();\r\n\t\tbtnPrev = new JButton();\r\n\t\tbtnNext = new JButton();\r\n\t\tlblSlide = new JLabel();\r\n\t\tlblTextArea = new JLabel();\r\n\r\n\t\t//Setup frame attributes\r\n\t\tsetSize(800, 600);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetTitle(\"Top 5 Destinations SlideShow\");\r\n\t\tgetContentPane().setLayout(new BorderLayout(10, 50));\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t//Setting the layouts for the panels\r\n\t\tslidePane.setLayout(card);\r\n\t\ttextPane.setLayout(cardText);\r\n\t\t\r\n\t\t//logic to add each of the slides and text\r\n\t\tfor (int i = 1; i <= 5; i++) {\r\n\t\t\tlblSlide = new JLabel();\r\n\t\t\tlblTextArea = new JLabel();\r\n\t\t\tlblSlide.setText(getResizeIcon(i));\r\n\t\t\tlblTextArea.setText(getTextDescription(i));\r\n\t\t\tslidePane.add(lblSlide, \"card\" + i);\r\n\t\t\ttextPane.add(lblTextArea, \"cardText\" + i);\r\n\t\t}\r\n\r\n\t\tgetContentPane().add(slidePane, BorderLayout.CENTER);\r\n\t\tgetContentPane().add(textPane, BorderLayout.SOUTH);\r\n\r\n\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 10));\r\n\r\n\t\tbtnPrev.setText(\"Previous\");\r\n\t\tbtnPrev.addActionListener(new ActionListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tgoPrevious();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPane.add(btnPrev);\r\n\r\n\t\tbtnNext.setText(\"Next\");\r\n\t\tbtnNext.addActionListener(new ActionListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tgoNext();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPane.add(btnNext);\r\n\r\n\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\r\n\t}", "private void addComponents(Container content){\r\n\r\n content.add(getRentPane());\r\n content.add(getSellPane());\r\n\r\n }", "public void initTextPane()\r\n {\r\n\t setResultsFont();\r\n\t ResultsTextPane.setBorder(null);\r\n\r\n // Scroller.\r\n \tJScrollPane ResultsScrollPane = new JScrollPane();\r\n \tJViewport ResultsViewport = ResultsScrollPane.getViewport();\r\n \tResultsViewport.add(ResultsTextPane);\r\n\r\n \tJPanel ResultsPanel = new JPanel();\r\n \tResultsPanel.setLayout(new BorderLayout());\r\n \tResultsPanel.add(\"Center\", ResultsScrollPane);\r\n\r\n \tgetContentPane().add(\"Center\", ResultsPanel);\r\n }", "private void initialize() {\n layout = new HorizontalLayout();\n\n workspaceTabs = new TabSheet();\n\n WorkspacePanel panel = new WorkspacePanel(\"Workspace 1\");\n workspaceTabs.addTab(panel).setCaption(\"Workspace 1\");\n DropHandler dropHandler = searchMenu.createDropHandler(panel.getBaseLayout());\n panel.setDropHandler(dropHandler);\n\n layout.addComponent(workspaceTabs);\n\n setContent(layout);\n }", "private JPanel getJContentPane() {\n if (jContentPane == null) {\n jContentPane = new JPanel();\n jContentPane.setLayout(new BorderLayout());\n jContentPane.add(getCsvFilePanel(), BorderLayout.NORTH);\n jContentPane.add(getResultPane(), BorderLayout.CENTER);\n }\n return jContentPane;\n }", "private JPanel getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tGridBagConstraints gridBagConstraints14 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints14.gridx = 0;\r\n\t\t\tgridBagConstraints14.anchor = GridBagConstraints.EAST;\r\n\t\t\tgridBagConstraints14.gridwidth = 3;\r\n\t\t\tgridBagConstraints14.weightx = 1.0D;\r\n\t\t\tgridBagConstraints14.insets = new Insets(16, 0, 8, 0);\r\n\t\t\tgridBagConstraints14.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints14.gridy = 2;\r\n\t\t\tGridBagConstraints gridBagConstraints13 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints13.gridx = 2;\r\n\t\t\tgridBagConstraints13.insets = new Insets(4, 8, 0, 16);\r\n\t\t\tgridBagConstraints13.gridy = 1;\r\n\t\t\tlabel4 = new BLabel();\r\n\t\t\tlabel4.setText(\":0:000\");\r\n\t\t\tGridBagConstraints gridBagConstraints12 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints12.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints12.gridy = 1;\r\n\t\t\tgridBagConstraints12.weightx = 1.0;\r\n\t\t\tgridBagConstraints12.insets = new Insets(4, 0, 0, 0);\r\n\t\t\tgridBagConstraints12.gridx = 1;\r\n\t\t\tGridBagConstraints gridBagConstraints3 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints3.gridx = 0;\r\n\t\t\tgridBagConstraints3.anchor = GridBagConstraints.EAST;\r\n\t\t\tgridBagConstraints3.insets = new Insets(4, 16, 0, 8);\r\n\t\t\tgridBagConstraints3.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints3.gridy = 1;\r\n\t\t\tlblEnd = new BLabel();\r\n\t\t\tlblEnd.setText(\"End\");\r\n\t\t\tlblEnd.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\t\tlblEnd.setHorizontalTextPosition(SwingConstants.RIGHT);\r\n\t\t\tlblEnd.setVerticalAlignment(SwingConstants.CENTER);\r\n\t\t\tGridBagConstraints gridBagConstraints2 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints2.gridx = 2;\r\n\t\t\tgridBagConstraints2.insets = new Insets(8, 8, 0, 16);\r\n\t\t\tgridBagConstraints2.gridy = 0;\r\n\t\t\tlabel3 = new BLabel();\r\n\t\t\tlabel3.setText(\":0:000\");\r\n\t\t\tGridBagConstraints gridBagConstraints1 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints1.gridy = 0;\r\n\t\t\tgridBagConstraints1.weightx = 1.0;\r\n\t\t\tgridBagConstraints1.insets = new Insets(8, 0, 0, 0);\r\n\t\t\tgridBagConstraints1.gridx = 1;\r\n\t\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\r\n\t\t\tgridBagConstraints.gridx = 0;\r\n\t\t\tgridBagConstraints.anchor = GridBagConstraints.EAST;\r\n\t\t\tgridBagConstraints.insets = new Insets(8, 16, 0, 8);\r\n\t\t\tgridBagConstraints.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints.gridy = 0;\r\n\t\t\tlblStart = new BLabel();\r\n\t\t\tlblStart.setText(\"Start\");\r\n\t\t\tlblStart.setPreferredSize(new Dimension(30, 13));\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(new GridBagLayout());\r\n\t\t\tjContentPane.add(lblStart, gridBagConstraints);\r\n\t\t\tjContentPane.add(getNumStart(), gridBagConstraints1);\r\n\t\t\tjContentPane.add(label3, gridBagConstraints2);\r\n\t\t\tjContentPane.add(lblEnd, gridBagConstraints3);\r\n\t\t\tjContentPane.add(getNumEnd(), gridBagConstraints12);\r\n\t\t\tjContentPane.add(label4, gridBagConstraints13);\r\n\t\t\tjContentPane.add(getJPanel(), gridBagConstraints14);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}", "private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\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 .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)\n );\n }", "private JPanel getJContentPane() {\n\t\tif (jContentPane == null) {\n\t\t\tGridBagConstraints gridBagScrollPane = new GridBagConstraints();\n\t\t\tgridBagScrollPane.fill = GridBagConstraints.BOTH;\n\t\t\tgridBagScrollPane.gridy = 0;\n\t\t\tgridBagScrollPane.weightx = 1.0;\n\t\t\tgridBagScrollPane.weighty = 1.0;\n\t\t\tgridBagScrollPane.gridwidth = 2;\n\t\t\tgridBagScrollPane.gridx = 0;\n\t\t\tGridBagConstraints gridBagButtonOk = new GridBagConstraints();\n\t\t\tgridBagButtonOk.gridx = 1;\n\t\t\tgridBagButtonOk.anchor = GridBagConstraints.EAST;\n\t\t\tgridBagButtonOk.insets = new Insets(5, 0, 5, 5);\n\t\t\tgridBagButtonOk.gridy = 1;\n\t\t\tGridBagConstraints gridBagButtonCancel = new GridBagConstraints();\n\t\t\tgridBagButtonCancel.gridx = 0;\n\t\t\tgridBagButtonCancel.insets = new Insets(5, 5, 5, 0);\n\t\t\tgridBagButtonCancel.gridy = 1;\n\t\t\tjContentPane = new JPanel();\n\t\t\tjContentPane.setLayout(new GridBagLayout());\n\t\t\tjContentPane.add(getJButtonCancel(), gridBagButtonCancel);\n\t\t\tjContentPane.add(getJButtonOk(), gridBagButtonOk);\n\t\t\tjContentPane.add(getJScrollPane(), gridBagScrollPane);\n\t\t}\n\t\treturn jContentPane;\n\t}", "@Override\r\n\tprotected void initContent() {\r\n\t\tSystem.out.println(\"我是woshi\"+temp);\r\n\r\n\t\tRectangle rect = contPan.getBounds();\r\n\r\n\t\tca1 = new JLabel(\"选择演出计划\", JLabel.CENTER);\r\n\t\tca1.setBounds(0, 5, rect.width, 30);\r\n\t\tca1.setFont(new java.awt.Font(\"宋体\", 1, 25));\r\n\t\tca1.setForeground(Color.blue);\r\n\t\tcontPan.add(ca1);\r\n\r\n\t\tjsc = new JScrollPane();\r\n\t\tjsc.setBounds(0, 40, rect.width, rect.height - 90);\r\n\t\tcontPan.add(jsc);\r\n\r\n\t\thint = new JLabel(\"请输入演出计划id:\", JLabel.RIGHT);\r\n\t\thint.setBounds(60, rect.height - 45, 150, 30);\r\n\t\tcontPan.add(hint);\r\n\t\thint.setForeground(Color.black);\r\n\r\n\t\tinput = new JTextField();\r\n\t\tinput.setBounds(220, rect.height - 45, 200, 30);\r\n\t\tcontPan.add(input);\r\n\r\n\t\t// 查找 ,删除和编辑的按钮,其中含有相关的事件处理!\r\n\t\tbtnQuery = new JButton(\"查找\");\r\n\t\tbtnQuery.setBounds(440, rect.height - 45, 60, 30);\r\n\t\tbtnQuery.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent Event) {\r\n\t\t\t\tbtnQueryClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\tcontPan.add(btnQuery);\r\n\r\n\t\tbtnAdd = new JButton(\"下一步\");\r\n\t\tbtnAdd.setBounds(rect.width - 220, rect.height - 45, 100, 30);\r\n\t\tbtnAdd.addActionListener(new ActionListener() {\r\n//\t\t\t@Override\r\n\t\t\t@SuppressWarnings({ \"rawtypes\" })\r\n\t\t\t\r\n\t\t\tpublic void actionPerformed(ActionEvent Event) {\r\n\r\n\t\t\t\r\n\t\t\t\tselect() ;\r\n\r\n\t\t\t\tSeat_UI sui = new Seat_UI();\r\n\t\t\t\tsui.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tcontPan.add(btnAdd);\r\n\r\n\t\ttms = new SchedTable(jsc);\r\n\t\tSystem.out.println(\"我\"+this.temp);\r\n\t\tshowTable(this.temp);\r\n\t}", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}", "public void initialize(){\t\t\n\n\t\tsetBounds(100, 100, 900, 620);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(SystemColor.control);\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tcontentPane.setLayout(null);\n\t\tsetLayout(null);\n\n\t\t//build the image of the board for toggling the active squares\n\t\t//buildBoardImage();\n\n\t\tboardView = new BoardView(new Color(20,200,160), model, 1, app);\n\t\tboardView.builderInitialize(app);\n\t\tboardView.setSize(408, 440);\n\t\tboardView.setLocation(39, 158);\n\t\tadd(boardView);\n\n\t\tcomboBox = new JComboBox<String>();\n\t\tcomboBox.setModel(new DefaultComboBoxModel<String>(new String[] {\"Puzzle\", \"Lightning\", \"Theme\"}));\n\t\tcomboBox.setToolTipText(\"\");\n\t\tcomboBox.setMaximumRowCount(3);\n\t\tcomboBox.setBounds(593, 158, 97, 26);\n\t\tcomboBox.addItemListener(this);\n\t\tthis.add(comboBox, \"ComboBox\");\n\n\t\tJLabel lblTitle = new JLabel(\"LetterCraze: Builder\");\n\t\tlblTitle.setFont(new Font(\"Impact\", Font.BOLD | Font.ITALIC, 40));\n\t\tlblTitle.setBounds(39, 11, 522, 109);\n\t\tadd(lblTitle);\n\n\t\tpnlLevelSwitch = new JPanel();\n\t\tpnlLevelSwitch.setName(\"pnlLevelSwitch\");\n\t\tpnlLevelSwitch.setBounds(479, 192, 379, 362);\n\t\tpnlLevelSwitch.setLayout(new CardLayout());\n\t\tadd(pnlLevelSwitch);\n\n\t\tJPanel pnlPuzzle = new BuilderPuzzlePanelView(labelFont);\n\t\tpnlLevelSwitch.add(pnlPuzzle, \"Puzzle\");\n\t\tpnlPuzzle.setBackground(new Color(102,255,102));\n\t\tpnlPuzzle.setLayout(null);\n\n\t\tJPanel pnlLightning = new BuilderLightningPanelView();\n\t\tpnlLightning.setBackground(Color.ORANGE);\n\t\tpnlLevelSwitch.add(pnlLightning, \"Lightning\");\n\t\tpnlLightning.setLayout(null);\n\n\n\t\tJPanel pnlTheme = new BuilderThemePanelView(labelFont);\n\t\tpnlTheme.setBackground(Color.PINK);\n\t\tpnlLevelSwitch.add(pnlTheme, \"Theme\");\n\t\tpnlTheme.setLayout(null);\n\n\t\tcontentPane.setVisible(true);\n\t\tcontentPane.repaint();\n\t\tJButton btnReset = new JButton(\"Reset Level\");\n\t\tbtnReset.addMouseListener(new ResetBoardSquaresController(this, model));\n\t\tbtnReset.setBounds(39, 118, 107, 29);\n\t\tadd(btnReset);\n\n\t\tJButton btnSaveLevel = new JButton(\"Save And Exit\");\n\t\tbtnSaveLevel.setBounds(156, 118, 111, 29);\n\t\tbtnSaveLevel.addMouseListener(new SaveLevelController(this, cardLayoutPanel, model));\n\t\t//btnSaveLevel.addMouseListener(new ExitWithoutSavingController(this, cardLayoutPanel, model));\n\t\tadd(btnSaveLevel);\n\n\t\tJLabel lblLevelType = new JLabel(\"Level Type\");\n\t\tlblLevelType.setFont(labelFont);\n\t\tlblLevelType.setBounds(491, 158, 92, 26);\n\t\tadd(lblLevelType);\n\n\t\tJButton btnCloseWithoutSaving = new JButton(\"Close Without Saving\");\n\t\t//TODO replace with close builder controller\n\t\tbtnCloseWithoutSaving.addMouseListener(new ExitWithoutSavingController(this, cardLayoutPanel, model));\n\t\tbtnCloseWithoutSaving.setBounds(273, 118, 174, 29);\n\t\tadd(btnCloseWithoutSaving);\n\t\t\n\t\tJButton btnPreviewLevel = new JButton(\"Show Me The Money!\");\n\t\tbtnPreviewLevel.addMouseListener(new PreviewLevelController(this, model, cardLayoutPanel));\n\t\tbtnPreviewLevel.setBounds(491, 118, 199, 29);\n\t\tadd(btnPreviewLevel);\n\t\trepaint();\n\t}", "private void initComponents() {\n\n scenePanel = new javax.swing.JPanel();\n\n setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.PAGE_AXIS));\n\n scenePanel.setLayout(new javax.swing.BoxLayout(scenePanel, javax.swing.BoxLayout.LINE_AXIS));\n add(scenePanel);\n }", "private void initPane(Container pane){\n\n\t\tif(!(pane.getLayout() instanceof BorderLayout)){\n\t\t\tpane.add(new JLabel(\"Container doesn't use BorderLayout!\"));\n\t\t\treturn;\n\t\t}\n\n\t\tpane.setBackground(Color.DARK_GRAY);\n\n\t\tif(!DEVELOPMENT_MODE){\n\t\t\t// Transparent 16 x 16 pixel cursor image\n\t\t\tBufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);\n\t\t\t// Create a new blank cursor\n\t\t\tCursor blankCursor = Toolkit.getDefaultToolkit().createCustomCursor(cursorImg, new Point(0, 0), \"blank cursor\");\n\t\t\t// Set the blank cursor to the JFrame\n\t\t\tpane.setCursor(blankCursor);\n\t\t}\n\n//\t\tWebcam webcam = Webcam.getDefault();\n//\t\twebcam.setViewSize(WebcamResolution.QVGA.getSize());\n\n//\t\twebcamPanel = new WebcamPanel(webcam);\n//\t\twebcamPanel.setFPSDisplayed(true);\n//\t\twebcamPanel.setDisplayDebugInfo(true);\n//\t\twebcamPanel.setImageSizeDisplayed(true);\n//\t\twebcamPanel.setFPSLimit(FRAMERATE);\n//\n//\t\tpane.add(webcamPanel);\n//\n//\t\twebcamPanel.add(new JLabel(\"Hello world!\"));\n\n\t\tvideoContainer = new JLabel((ImageIcon)null); // Will be initialised later\n\t\tvideoContainer.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tvideoContainer.setFont(FONT);\n\t\tvideoContainer.setForeground(new Color(0xff6655));\n\t\tvideoContainer.setText(\"Camera error!\");\n\n\t\tpane.add(videoContainer);\n\n\t}", "private JPanel getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjLabel2 = new JLabel();\r\n\t\t\tjLabel2.setText(\"Note: the anon level is defined visiting a php script with the current testing proxy, this can take some time.\");\r\n\t\t\tlblDebug = new JLabel();\r\n\t\t\tlblDebug.setText(\"\");\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tGroupLayout gl_jContentPane = new GroupLayout(jContentPane);\r\n\t\t\tgl_jContentPane.setHorizontalGroup(\r\n\t\t\t\tgl_jContentPane.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t.addGroup(gl_jContentPane.createSequentialGroup()\r\n\t\t\t\t\t\t.addGap(1)\r\n\t\t\t\t\t\t.addGroup(gl_jContentPane.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t.addGroup(gl_jContentPane.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t.addComponent(jLabel2, GroupLayout.PREFERRED_SIZE, 606, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t.addContainerGap())\r\n\t\t\t\t\t\t\t.addGroup(gl_jContentPane.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t.addComponent(getJToolBar(), GroupLayout.DEFAULT_SIZE, 1383, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addGap(10))))\r\n\t\t\t\t\t.addGroup(gl_jContentPane.createSequentialGroup()\r\n\t\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t\t.addComponent(lblDebug, GroupLayout.PREFERRED_SIZE, 676, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addContainerGap(28, Short.MAX_VALUE))\r\n\t\t\t\t\t.addComponent(getJScrollPane(), GroupLayout.DEFAULT_SIZE, 717, Short.MAX_VALUE)\r\n\t\t\t);\r\n\t\t\tgl_jContentPane.setVerticalGroup(\r\n\t\t\t\tgl_jContentPane.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t.addGroup(gl_jContentPane.createSequentialGroup()\r\n\t\t\t\t\t\t.addGap(1)\r\n\t\t\t\t\t\t.addComponent(getJToolBar(), GroupLayout.PREFERRED_SIZE, 53, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t.addComponent(getJScrollPane(), GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE)\r\n\t\t\t\t\t\t.addGap(19)\r\n\t\t\t\t\t\t.addComponent(lblDebug, GroupLayout.PREFERRED_SIZE, 16, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t.addComponent(jLabel2, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t);\r\n\t\t\tjContentPane.setLayout(gl_jContentPane);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}", "public void setContentPane(AMenu container){\n\t\t\n\t\t// aktuelles Panel entfernen, sofern vorhanden\n\t\tif(content.getComponents().length != 0)\n\t\t\tcontent.removeAll();\n\t\t\n\t\t// neues Panel setzen\n\t\tcontent.add(container);\n\t\t\n\t\t\n\t\t// Framegröße auf Panelgröße anpassen\n\t\tif(container.getOriginalSize().height > getHeight() || container.getOriginalSize().width > getWidth()){\n\t\t\tcontainer.setPreferredSize(container.getOriginalSize());\n\t\t\t\n\t\t\tpack();\n\t\t\t\t\t\t\n\t\t\t//Frameminimumgröße auf Panelgröße festlegen\n\t\t\tsetMinimumSize(getSize());\n\t\t}else{\n\t\t\tvController.resizePanel(container);\n\t\t}\n\t\t\n\t\tvalidate();\n\t\trepaint();\n\t}", "private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }", "private Component doInit() {\n\t\tJXPanel panel = new JXPanel();\n\t\tpanel.setLayout(new BorderLayout());\n\n\t\t// create a label\n\t\tfinal JXLabel label = new JXLabel();\n\t\tlabel.setFont(new Font(\"Segoe UI\", Font.BOLD, 14));\n\t\tlabel.setText(\"task pane item 1 : a label\");\n\t\tlabel.setIcon(Images.NetworkDisconnected.getIcon(32, 32));\n\t\tlabel.setHorizontalAlignment(JXLabel.LEFT);\n\t\tlabel.setBackgroundPainter(getPainter());\n\n\t\t// tweak with the UI defaults for the taskpane and taskpanecontainer\n\t\tchangeUIdefaults();\n\n\t\t// create a taskpanecontainer\n\t\tJXTaskPaneContainer taskpanecontainer = new JXTaskPaneContainer();\n\n\t\t// create a taskpane, and set it's title and icon\n\t\tJXTaskPane taskpane = new JXTaskPane();\n\t\ttaskpane.setTitle(\"My Tasks\");\n\t\ttaskpane.setIcon(Images.Quit.getIcon(24, 24));\n\n\t\t// add various actions and components to the taskpane\n\t\ttaskpane.add(label);\n\t\ttaskpane.add(new AbstractAction() {\n\t\t\tprivate static final long serialVersionUID = -7314920635669764914L;\n\t\t\t{\n\t\t\t\tputValue(Action.NAME, \"task pane item 2 : an action\");\n\t\t\t\tputValue(Action.SHORT_DESCRIPTION, \"perform an action\");\n\t\t\t\tputValue(Action.SMALL_ICON,\n\t\t\t\t\t\tImages.NetworkConnected.getIcon(32, 32));\n\t\t\t}\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlabel.setText(\"an action performed\");\n\t\t\t}\n\t\t});\n\n\t\t// add the task pane to the taskpanecontainer\n\t\ttaskpanecontainer.add(taskpane);\n\n\t\t// set the transparency of the JXPanel to 50% transparent\n\t\tpanel.setAlpha(0.7f);\n\n\t\tpanel.add(taskpanecontainer, BorderLayout.CENTER);\n\t\tpanel.setPreferredSize(new Dimension(250, 200));\n\n\t\treturn panel;\n\t}", "private JPanel getAboutContentPane() {\n\t\tif (aboutContentPane == null) {\n\t\t\taboutContentPane = new JPanel();\n\t\t\taboutContentPane.setLayout(new BorderLayout());\n\t\t\taboutContentPane.add(getAboutVersionLabel(), BorderLayout.CENTER);\n\t\t}\n\t\treturn aboutContentPane;\n\t}", "private void initRoot() {\n root = new VBox(10);\n root.setAlignment(Pos.CENTER);\n root.setPadding(new Insets(10));\n root.setPrefWidth(300);\n root.setPrefHeight(150);\n }", "private JPanel getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjLabelDataNum = new JLabel();\r\n\t\t\tjLabelDataNum.setBounds(new Rectangle(484, 6, 70, 23));\r\n\t\t\tjLabelDataNum.setBorder(BorderFactory.createLineBorder(SystemColor.controlShadow, 1));\r\n\t\t\tjLabelDataNum.setText(\"共 0 个\");\r\n\t\t\tjLabel12 = new JLabel();\r\n\t\t\tjLabel12.setBounds(new Rectangle(7, 36, 80, 23));\r\n\t\t\tjLabel12.setText(\"配置名称:\");\r\n\t\t\tjLabelDataDir = new JLabel();\r\n\t\t\tjLabelDataDir.setBounds(new Rectangle(88, 6, 389, 23));\r\n\t\t\tjLabelDataDir.setForeground(new Color(204, 51, 0));\r\n\t\t\tjLabelDataDir.setBorder(BorderFactory.createLineBorder(SystemColor.controlShadow, 1));\r\n\t\t\tjLabelDataDir.setText(\"\");\r\n\t\t\tjLabel7 = new JLabel();\r\n\t\t\tjLabel7.setBounds(new Rectangle(7, 6, 80, 23));\r\n\t\t\tjLabel7.setText(\"数据文件夹:\");\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(null);\r\n\t\t\tjContentPane.add(getJPanelVar(), null);\r\n\t\t\tjContentPane.add(getJPaneSql(), null);\r\n\t\t\tjContentPane.add(getJPanelConfig(), null);\r\n\t\t\tjContentPane.add(getJButtonInto(), null);\r\n\t\t\tjContentPane.add(jLabel5, null);\r\n\t\t\tjContentPane.add(getJComboBoxDbType(), null);\r\n\t\t\tjContentPane.add(jLabel7, null);\r\n\t\t\tjContentPane.add(jLabelDataDir, null);\r\n\t\t\tjContentPane.add(getJButtonSelectData(), null);\r\n\t\t\tjContentPane.add(getJButtonOpen(), null);\r\n\t\t\tjContentPane.add(jLabel12, null);\r\n\t\t\tjContentPane.add(getJComboBoxConfigName(), null);\r\n\t\t\tjContentPane.add(getJButtonSaveCfg(), null);\r\n\t\t\tjContentPane.add(getJButtonDelCfg(), null);\r\n\t\t\tjContentPane.add(jLabelDataNum, null);\r\n\t\t\tjContentPane.add(getJButtonSaveInto(), null);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}", "private void init() {\n\t\tsetModal(true);\n\t\t\n\t\tsetResizable(false);\n\t\tgetContentPane().setLayout(new GridBagLayout());\n\t\tc = new GridBagConstraints();\n\t\tc.insets = new Insets(10, 10, 10, 10);\n\t\tc.gridx = 0;\n\t\tc.gridy = 0;\n\t}", "protected void initializeComponents() {\n\t\t/* Create fonts for information nodes */\n\t\tFont titleFont = Font.font(\"Arial\", FontWeight.BOLD, 18);\n\t\tFont descriptionFont = Font.font(\"Arial\", 14);\n\t\t/* Configure information nodes */\n\t\tconfigureTitle(titleFont);\n\t\tconfigureDescription(descriptionFont);\n\t\tconfigureIconContainer();\n\t\tconfigureWindow();\n\t\t/* set scene */\n\n\t\tgetContent().add(notificationContainer);\n\t}", "private JPanel getJContentPane() {\r\n\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(null);\r\n\t\t\tjContentPane.setSize(new Dimension(600, 320));\r\n\t\t\tjContentPane.add(getEkitCoreEditorHTMLPanel(), null);\r\n\t\t\tjContentPane.add(getJToolBarEditorHTML(), null);\r\n\t\t\tjContentPane.add(getJButtonAcceptHTML(), null);\r\n\t\t\tjContentPane.add(getJButtonCancelHTML(), null);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}", "protected IFigure setupContentPane(IFigure nodeShape) {\r\n\t\treturn nodeShape; // use nodeShape itself as contentPane\r\n\t}", "private void initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(300, 200);\n this.setPreferredSize(new java.awt.Dimension(450, 116));\n this.add(getListPanel(), java.awt.BorderLayout.CENTER);\n this.add(getButtonPanel(), java.awt.BorderLayout.SOUTH);\n }", "private void init() {\n setLayout(new BorderLayout());\n setBackground(ProgramPresets.COLOR_BACKGROUND);\n add(getTitlePanel(), BorderLayout.NORTH);\n add(getTextPanel(), BorderLayout.CENTER);\n add(getLinkPanel(), BorderLayout.SOUTH);\n }", "private void init() {\n\t\tcontentPane=getContentPane();\n\t\ttopPanel= new JPanel();\n\t\tcontentPane.setLayout(new BorderLayout());\n\t\tlabel = new JLabel(\"Username\");\n\t\ttextfield = new JTextField(\"Type Username\", 15);\n\t\ttextfield.addActionListener(aListener);\n\t\tconnectButton = new JButton(\"Connect to Server\");\n\t\tconnectButton.addActionListener(aListener);\n\t\ttopPanel.setLayout(new FlowLayout());\n\t\tlabel.setVerticalAlignment(FlowLayout.LEFT);\n\t\ttopPanel.add(label);\n\t\ttopPanel.add(textfield);\n\t\ttopPanel.add(connectButton);\n\t\tsetSize(600, 600);\n\t\tcontentPane.add(topPanel, BorderLayout.NORTH);\n\t\tsetVisible(true);\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\t\tthis.addWindowListener(framListener);\n\t}" ]
[ "0.7684057", "0.7318758", "0.73181033", "0.7251925", "0.72209597", "0.7132415", "0.70463085", "0.6955116", "0.69313073", "0.68635863", "0.68542916", "0.685189", "0.68350875", "0.6811309", "0.679066", "0.6738732", "0.66736513", "0.6643642", "0.65928465", "0.65924037", "0.6590951", "0.65182054", "0.64848924", "0.64841866", "0.64776987", "0.6473766", "0.6469061", "0.6457677", "0.64572054", "0.6451034", "0.64459366", "0.64431477", "0.6441111", "0.64170575", "0.6402937", "0.6398338", "0.6386472", "0.63836", "0.63789386", "0.6370437", "0.6370399", "0.636838", "0.63669884", "0.6361436", "0.63516176", "0.6346836", "0.6336157", "0.632845", "0.6320023", "0.63177437", "0.6316202", "0.6301835", "0.6299702", "0.6296971", "0.62964404", "0.6295773", "0.6280396", "0.6279556", "0.62764853", "0.6273463", "0.62564415", "0.625043", "0.62405705", "0.62331337", "0.6232447", "0.6223519", "0.62233603", "0.6222607", "0.62223834", "0.6219827", "0.6217019", "0.6215316", "0.62145", "0.6214177", "0.6203359", "0.62024176", "0.62019676", "0.6201457", "0.6192729", "0.61896104", "0.61829567", "0.61809397", "0.61808896", "0.61796147", "0.61788213", "0.617585", "0.61684877", "0.6164021", "0.61601543", "0.6159968", "0.6159947", "0.61544406", "0.6153896", "0.6152913", "0.61525184", "0.6150664", "0.61445934", "0.6139864", "0.61393976", "0.6134845" ]
0.6859108
10
This method initializes txtStatus
private javax.swing.JLabel getTxtStatus() { if (txtStatus == null) { txtStatus = new javax.swing.JLabel(); txtStatus.setName("txtStatus"); txtStatus.setText("Initializing..."); txtStatus.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); txtStatus.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); txtStatus.setPreferredSize(new java.awt.Dimension(800,18)); } return txtStatus; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initializeControls() {\n\t\tlabel = new Label(status.toString());\n\t}", "private void initGUI() {\n statusLabel = new JLabel();\n add(statusLabel);\n updateStatus();\n }", "public ManualInput() {\n Globals.Status =\" \";\n initComponents();\n }", "private void initStatusBar() {\n ModelerSession.getStatusBarService().addStatusBarItem(\n getIdentifier(), selectedToolStatusBarItem, JideBoxLayout.FIX\n );\n }", "@Override\r\n\t\t\tpublic void handleEvent(Event arg0) {\n\t\t\t\tstatus = txt_status.getText();\r\n\t\t\t}", "private void prepareStatus() {\n clock = new JLabel(new Date().toString());\n statusPanel = new JPanel();\n statusPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));\n this.add(statusPanel, BorderLayout.SOUTH);\n statusPanel.setPreferredSize(new Dimension(this.getWidth(), 16));\n statusPanel.setLayout(new BoxLayout(statusPanel, BoxLayout.X_AXIS));\n statusLabel = new JLabel(\"status\");\n statusLabel.setHorizontalAlignment(SwingConstants.LEFT);\n statusPanel.add(statusLabel);\n statusPanel.add(new JLabel(\" \"));\n clock.setHorizontalAlignment(SwingConstants.RIGHT);\n statusPanel.add(clock);\n \n ActionListener updateClockAction = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n clock.setText(new Date().toString()); \n }\n };\n Timer t = new Timer(1000, updateClockAction);\n t.start();\n }", "public void setStatusText(String text) {\r\n\t\tthis.status_text.setText(text);\r\n\t}", "public void initialize() {\r\n\t\t\tsetTextValue(!updateNoteEnabled);\r\n\t\t}", "public void status(){\n lblStats.setText(\"\"+level+\"L\");\n }", "private void internalSetStatus(String status) {\n jStatusLine.setText(\"Status: \" + status);\n }", "public void setStatus(String text) {\n labelStatus.setText(text);\n }", "public RSPStatusPanel() \n {\n initComponents();\n }", "public StatusLabel (GlContext ctx)\n {\n super(ctx, \"\");\n }", "private void setLblStatus(String s){\n\t\tlblState.setText(s);\n\t}", "private void initButtonsAndTextFields(){\n delayTxt.setText(\"0\");\n delayTxt.setDisable(true);\n }", "public void setConnStatus(String text){\n connStatus.setText(text);\n }", "@Override\n protected void onProgressUpdate(String... values) {\n labelStatus.setText(values[0]);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n text = new javax.swing.JTextArea();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowActivated(java.awt.event.WindowEvent evt) {\n formWindowActivated(evt);\n }\n });\n\n jLabel1.setText(\"STATUS\");\n\n text.setColumns(20);\n text.setEditable(false);\n text.setRows(5);\n jScrollPane1.setViewportView(text);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 581, Short.MAX_VALUE)\n .addComponent(jLabel1))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }", "public void setInitStatus(String initStatus) {\n this.initStatus = initStatus == null ? null : initStatus.trim();\n }", "private void updateStatus() {\n \tif (!status.getText().equals(\"\")) {\n\t\t\tif (currentProfile != null) {\n\t\t\t\tcurrentProfile.setStatus(status.getText());\n\t\t\t\tcanvas.displayProfile(currentProfile);\n\t\t\t\tcanvas.showMessage(\"Status updated to \" + status.getText());\n\t\t\t} else {\n\t\t\t\tcanvas.showMessage(\"Please select a profile to change status\");\n\t\t\t}\n\t\t}\n\t}", "protected void setupStatusBar() {\r\n\t\tStatusBar statusBar = new StatusBar() {\r\n\t\t\tprivate static final long serialVersionUID = -8334549384792867496L;\r\n\r\n\t\t\t@Override\r\n\t\t\tprotected String makeAngleDescription(String label, Angle angle) {\r\n\t\t\t\tString s;\r\n\t\t\t\tif (Angle.ANGLE_FORMAT_DMS.equals(getAngleFormat()))\r\n\t\t\t\t\ts = String.format(\"%s %s\", label, angle.toDMSString());\r\n\t\t\t\telse\r\n\t\t\t\t\ts = String.format(\"%s %,.6f\\u00B0\", label, angle.degrees);\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Overridden to capture the current altitude.\r\n\t\t\t */\r\n\t\t\t@Override\r\n\t\t\tprotected String makeEyeAltitudeDescription(double metersAltitude){\r\n\t\t\t\t//System.out.println(\"metersAltitude: \"+ metersAltitude);\r\n\t\t\t\tsetCurrentAltitude(metersAltitude);\r\n\t\t\t\treturn super.makeEyeAltitudeDescription(metersAltitude);\r\n\t\t\t}\r\n\t\t};\r\n\t\tadd(statusBar, BorderLayout.PAGE_END);\r\n\t\tstatusBar.setEventSource(getWWD());\r\n\t}", "public StatusBar() {\n\t\tthis(DEFAULT_STATUS_MESSAGE, true, 1, 1, true);\n\t}", "public static void updateStatusBar(){\n\t\tstatus.setText(\"Sensors: \"+Sensor.idToSensor.size()+(TurnController.getInstance().getCurrentTurn()!=null?\", Turn: \"+TurnController.getInstance().getCurrentTurn().turn:\"\"));\n\t}", "@Override\n public void setStatusText(String text) {\n status.setText(text);\n }", "public void setText() {\n\t\ttxtPower.setText(\"\");\n\t\ttxtPower.setText(\"Battery Info: \\n\" + getBatteryInfo() + \"\\n\"\n\t\t\t\t+ \"Battery Status: \" + getStatus() + \"\\n\"\n\t\t\t\t+ \"External AC Power: \" + getExtPowerStatus() + \"\\n\"\n\t\t\t\t+ \"External USB Power: \" + getUsbPowerStatus() + \"\\n\"\n\t\t\t\t+ \"Current level: \" + getCurrentLevel() + \"\\n\"\n\t\t);\n\t}", "private void statusCheck() {\n\t\tif(status.equals(\"waiting\")) {if(waitingPlayers.size()>1) status = \"ready\";}\n\t\tif(status.equals(\"ready\")) {if(waitingPlayers.size()<2) status = \"waiting\";}\n\t\tif(status.equals(\"start\")) {\n\t\t\tif(players.size()==0) status = \"waiting\";\n\t\t}\n\t\tview.changeStatus(status);\n\t}", "@Override\n public void onInit(int status) {\n if (status == TextToSpeech.SUCCESS) {\n\n int result = tts.setLanguage(Locale.US);\n tts.setSpeechRate(0.8f);\n\n int uResult = tts.setOnUtteranceProgressListener(this);\n\n if (result == TextToSpeech.LANG_MISSING_DATA\n || result == TextToSpeech.LANG_NOT_SUPPORTED) {\n Log.e(\"TTS\", \"This Language is not supported\");\n }\n\n } else {\n Log.e(\"TTS\", \"Initialization Failed!\");\n Toast.makeText(mainActivity, \"TTS Initialization Failed!\", Toast.LENGTH_SHORT).show();\n }\n\n }", "@Override\n public void run() {\n \tstatusTextView.setText(statusText(s));\n }", "private void updateStatus(final String status)\n {\n jLabelStatus.setText(status);\n jLabelStatus.paintImmediately(jLabelStatus.getVisibleRect());\n }", "private void updateStatusText() {\n Piece.Color playerColor = board.getTurnColor();\n\n if(board.isGameOver()) {\n if(board.isDraw()) {\n tvShowStatus.setTextColor(Color.BLUE);\n tvShowStatus.setText(\"DRAW\");\n }\n else if (board.getWinnerColor() == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK WINS\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE WINS\");\n }\n }\n else if(playerColor == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE\");\n }\n }", "public SensorTest()\n\t{\n\t\tsuper(\"Sensor Status\");\n\t\tsetSize(455, 400);\n\t\tDimension frameSize = this.getSize();\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tsetLocation(0, (screenSize.height - frameSize.height));\n\t\tgetContentPane().setLayout(null);\n\t\tsetResizable(false);\n\t\t\n\t\t// instanciate sensor and text field for status\n\t\ttestW = new JTextField[SensorControl.MAX_SENSOR];\n\t\treadW = new JTextField[SensorControl.MAX_SENSOR];\n\t\t\n\t\ttestM = new JTextField[SensorControl.MAX_SENSOR];\n\t\treadM = new JTextField[SensorControl.MAX_SENSOR];\n\t\t\n\t\tfor(int i=0; i<SensorControl.MAX_SENSOR; i++)\n\t\t{\n\t\t\ttestW[i] = new JTextField();\n\t\t\treadW[i] = new JTextField();\n\t\t\t\n\t\t\ttestW[i].setEditable(false);\n\t\t\treadW[i].setEditable(false);\n\t\t\t\n\t\t\ttestM[i] = new JTextField();\n\t\t\treadM[i] = new JTextField();\n\t\t\t\n\t\t\ttestM[i].setEditable(false);\n\t\t\treadM[i].setEditable(false);\n\t\t}\n\t\t\n\t\t\n\t\t// make buttons\n\t\t\n\t\t/*\n\t\tJButton buttonrefresh = new JButton(\"refresh\");\n\t\tbuttonrefresh.addActionListener(this);\n\t\tJButton buttonEnable = new JButton(\"Enable All\");\n\t\tbuttonEnable.addActionListener(this);\n\t\tJButton buttonDisable = new JButton(\"Disable All\");\n\t\tbuttonDisable.addActionListener(this);\n\t\t*/\n\t\t// attach text field to dialog\n\t\tJPanel displayPanel = new JPanel(new GridLayout(13, 3));\n\t\tdisplayPanel.add(new Label(\"Type and ID\"));\n\t\tdisplayPanel.add(new Label(\"Test\"));\n\t\tdisplayPanel.add(new Label(\"Read\"));\n\t\t\n\t\t// attach test fields of array to dialog\n\t\tfor(int i=0; i<SensorControl.MAX_SENSOR; i++)\n\t\t{\n\t\t\tdisplayPanel.add(new Label(\"WinDoor \"+MainDemo.sensorController.getIDWinDoorSensor(i)));\n\t\t\tdisplayPanel.add(testW[i]);\n\t\t\tdisplayPanel.add(readW[i]);\n\t\t}\n\t\tfor(int i=0; i<SensorControl.MAX_SENSOR; i++)\n\t\t{\n\t\t\tdisplayPanel.add(new Label(\"Motion \"+MainDemo.sensorController.getIDMotionDetector(i)));\n\t\t\tdisplayPanel.add(testM[i]);\n\t\t\tdisplayPanel.add(readM[i]);\n\t\t}\n\t\t\n\t\t/*\n\t\tdisplayPanel.add(new Label(\"\"));\n\t\tdisplayPanel.add(new Label(\"\"));\n\t\tdisplayPanel.add(new Label(\"\"));\n\t\t\n\t\t// attach buttons to dialog\n\t\tdisplayPanel.add(buttonrefresh);\n\t\tdisplayPanel.add(buttonEnable);\n\t\tdisplayPanel.add(buttonDisable);\n\t\t*/\n\t\tdisplayPanel.setBounds(25, 25, 400, 370);\n\t\tgetContentPane().add(displayPanel);\n\t\t\n\t\t// initially one time update is necessary to fill up sensor status table\n\t\trefresh();\n\t}", "private void initGUI() {\n\t\teditor = new JTextArea();\n\t\tthis.getContentPane().setLayout(new BorderLayout());\n\t\tthis.getContentPane().add(new JScrollPane(editor), BorderLayout.CENTER);\n\n\t\tscPane = new JScrollPane(editor);\n\t\tJPanel panel = new JPanel(new BorderLayout());\n\t\tpanel.add(scPane, BorderLayout.CENTER);\n\n\t\tadd(pane);\n\n\t\tJPanel statusBar = new JPanel();\n\t\tJLabel welcomedate;\n\t\twelcomedate = new JLabel();\n\n\t\tstatusBar.setBorder(new BevelBorder(BevelBorder.LOWERED));\n\t\tadd(statusBar, BorderLayout.SOUTH);\n\t\tstatusBar.setPreferredSize(new Dimension(getWidth(), 16));\n\t\tstatusBar.setLayout(new GridLayout(1, 4));\n\n\t\tstatusLabel = new JLabel();\n\t\tlineLabel = new JLabel();\n\t\tcolumnLabel = new JLabel();\n\t\tselectedLabel = new JLabel();\n\n\t\tstatusLabel.setHorizontalAlignment(SwingConstants.LEFT);\n\n\t\tstatusBar.add(statusLabel);\n\n\t\tstatusBar.add(lineLabel);\n\t\tstatusBar.add(columnLabel);\n\t\tstatusBar.add(selectedLabel);\n\n\t\tstatusBar.add(welcomedate, BorderLayout.EAST);\n\n\t\tjavax.swing.Timer time = new javax.swing.Timer(1000, new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjava.util.Date now = new java.util.Date();\n\t\t\t\tString ss = SimpleDateFormat.getDateTimeInstance().format(now);\n\t\t\t\twelcomedate.setText(ss);\n\t\t\t}\n\t\t});\n\t\ttime.start();\n\n\t\tadd(statusBar, BorderLayout.SOUTH);\n\n\t\tsetVisible(true);\n\n\t\tcreateMenus();\n\t\tcreateToolbars();\n\n\t\tcreateLanguageMenu();\n\n\t}", "private void initText() {\n// urlText.setText(jPAConfig.getUrl());\n// userText.setText(jPAConfig.getUser());\n// dbNameText.setText(jPAConfig.getDbName());\n// portText.setText(jPAConfig.getPort());\n// passText.setText(jPAConfig.getPassword());\n }", "private void updateStatus() {\n String statusString = dataModel.getStatus().toString();\n if (dataModel.getStatus() == DefinitionStatus.MARKER_DEFINITION) {\n statusString += \" Number of markers: \" + dataModel.getNumberOfMarkers() + \". Current position: \"\n + dataModel.getTempMousePosition();\n }\n if (dataModel.getStatus() == DefinitionStatus.POINTS_DEFINITION) {\n statusString += \" Number of point fields: \" + dataModel.getNumberOfPoints() + \". Current position: \"\n + dataModel.getTempMousePosition();\n }\n statusLabel.setText(statusString);\n }", "private void updateGUIStatus() {\r\n\r\n }", "@Override\n public void onInit(int status) {\n\n if (status == TextToSpeech.SUCCESS) {\n\n int result = tts.setLanguage(Locale.US);\n\n //tts.setPitch(0.8f); // set pitch level\n tts.setSpeechRate(1); // set speech speed rate\n\n if (result == TextToSpeech.LANG_MISSING_DATA\n || result == TextToSpeech.LANG_NOT_SUPPORTED) {\n Log.e(\"TTS\", \"Language is not supported\");\n } else {\n Log.e(\"TTS\", \"Language is supported\");\n }\n\n } else {\n Log.e(\"TTS\", \"Initilization Failed\");\n }\n\n }", "public void setStatusText(java.lang.String statusText) {\n this.statusText = statusText;\n }", "@Override\n\tpublic void setStatusText (String text) {\n\t}", "public void status(leapstream.scoreboard.core.model.Status status) {\n Stati stati = status.is();\n foreground(stati);\n background(stati);\n label.text(\"\" + stati);\n }", "private void updateUI(String msg){\n if(msg != null) {\n textViewStatus.setText(msg);\n }\n }", "@Override\r\n public void onInit(int status) {\n if(status!=TextToSpeech.ERROR) {\r\n ttobj.setLanguage(Locale.UK);\r\n //ttobj.setPitch(2);\r\n }\r\n }", "public void setStatusText(String statusText) {\r\n\t\tcheckHeaderGeneration();\r\n\t\tthis.statusText = statusText;\r\n\t}", "private void initProgress()\n {\n\n if (showProgressBar && progressBar == null)\n { // there's an issue if called from matlab of getting the progress frame\n // in matlab's event loop so we can't just create a new one here\n progressBar = new Progress();\n }\n if (progressBar != null)\n {\n progressBar.setChanName(channelName);\n progressBar.setWorkingOn(\"Initializing\");\n progressBar.setEstTime(\"Time remaining: unknown\");\n progressBar.setProgress(-1);\n progressBar.setPosition();\n }\n }", "private void init(){\n this.firstNameTF.setText(user.getFirstName());\n this.nameTF.setText(user.getName());\n this.phoneTF.setText(user.getPhone());\n\n this.mailLabel.setText(user.getMail());\n this.roleLabel.setText(user.getFirstName());\n }", "private void initControlUI() {\n typeAdapter = new SpinnerSimpleAdapter(self, android.R.layout.simple_spinner_item, self.getResources().getStringArray(R.array.arr_feedback_type));\n spnType.setAdapter(typeAdapter);\n }", "private void initializeDisplayText() {\n // Title and field labels\n Stage stage = (Stage) titleLabel.getScene().getWindow();\n stage.setTitle(rb.getString(\"windowTitle\"));\n if (action.equals(Constants.ADD)) {\n titleLabel.setText(rb.getString(\"addTitleLabel\"));\n } else if (action.equals(Constants.UPDATE)) {\n titleLabel.setText(rb.getString(\"updateTitleLabel\"));\n }\n idLabel.setText(rb.getString(\"idLabel\"));\n nameLabel.setText(rb.getString(\"nameLabel\"));\n addressLabel.setText(rb.getString(\"addressLabel\"));\n cityLabel.setText(rb.getString(\"cityLabel\"));\n countryLabel.setText(rb.getString(\"countryLabel\"));\n divisionLabel.setText(rb.getString(\"divisionLabel\"));\n postalLabel.setText(rb.getString(\"postalLabel\"));\n phoneLabel.setText(rb.getString(\"phoneLabel\"));\n\n // Prompt text\n idField.setPromptText(rb.getString(\"idPrompt\"));\n nameField.setPromptText(rb.getString(\"namePrompt\"));\n addressField.setPromptText(rb.getString(\"addressPrompt\"));\n cityField.setPromptText(rb.getString(\"cityPrompt\"));\n countryComboBox.setPromptText(rb.getString(\"countryPrompt\"));\n divisionComboBox.setPromptText(rb.getString(\"divisionPrompt\"));\n postalField.setPromptText(rb.getString(\"postalPrompt\"));\n phoneField.setPromptText(rb.getString(\"phonePrompt\"));\n\n // Button labels\n Common.scaleButton(saveBtn, rb.getString(\"saveBtn\"));\n Common.scaleButton(cancelBtn, rb.getString(\"cancelBtn\"));\n\n // Error label; initially blank\n errorLabel.setText(\"\");\n }", "public status(Locale locale) {\n initComponents();\n try {\n initlocale();\n } catch (Exception e) {\n }\n setLocationRelativeTo(null);\n Bindcombo();\n }", "@Override\n public void statusChanged(String text) {\n fireStatusChanged(text);\n }", "private void updateStatus() {\n if (bold != null) {\n bold.setDown(basic.isBold());\n }\n\n if (italic != null) {\n italic.setDown(basic.isItalic());\n }\n\n if (underline != null) {\n underline.setDown(basic.isUnderlined());\n }\n\n if (subscript != null) {\n subscript.setDown(basic.isSubscript());\n }\n\n if (superscript != null) {\n superscript.setDown(basic.isSuperscript());\n }\n\n if (strikethrough != null) {\n strikethrough.setDown(extended.isStrikethrough());\n }\n }", "public void setgetStatus()\r\n\t{\r\n\t\tthis.status = 'S';\r\n\t}", "@Override\n public void onInit(int status) {\n showNotification(\"text to speech is ready\", Snackbar.LENGTH_SHORT);\n registerBroadCastReceiver();\n }", "private void initialize() {\n\t\tString teamNumber = Integer.toString(WPILibCore.getDefault().getTeamNumber(null));\n\t\tteamNumberText.setText(teamNumber);\n\t}", "protected void init_status(String id) {\n\t\tstatus.put(id, 1);\n\t\t\n\t}", "private void init() {\n setText(\"Case Name\");\n createFieldsComp();\n GuiUtil.addSeparator(shell, SWT.HORIZONTAL);\n createBottomActionButtons();\n }", "public GraficaEstatus() {\n initComponents();\n }", "public void showStatus(){\n\t\tjlMoves.setText(\"\"+moves);\n\t\tjlCorrectMoves.setText(\"\"+correctMoves);\n\t\tjlWrongMoves.setText(\"\"+wrongMoves);\n\t\tjlOpenMoves.setText(\"\"+openMoves);\n\t\tjlNumberGames.setText(\"\"+numberGames);\n\t}", "public void setStatus(String status) {\n statusLabel.setText(status);\n }", "private void updateRefreshTokenUI(boolean status) {\n\n TextView rt = (TextView) findViewById(R.id.rtStatus);\n\n if (rt.getText().toString().contains(getString(R.string.noToken))\n || rt.getText().toString().contains(getString(R.string.tokenPresent))) {\n rt.setText(R.string.RT);\n }\n if (status) {\n rt.setText(rt.getText() + \" \" + getString(R.string.tokenPresent));\n } else {\n rt.setText(rt.getText() + \" \" + getString(R.string.noToken) + \" or Invalid\");\n }\n }", "protected void updateStatus() {\n super.updateStatus();\n if (!getHaveData()) {\n if (getAllowMultiple()) {\n setStatus(\"Select one or more files\");\n } else {\n setStatus(\"Select a file\");\n }\n }\n }", "public void update_statusfield(StatusField field,String text)\r\n {\r\n JLabel targetfield;\r\n if (field==StatusField.STATUSFIELD1) {targetfield=this.statusfield1;}\r\n else if (field==StatusField.STATUSFIELD2) {targetfield=this.statusfield2;}\r\n else {targetfield=this.statusfield3;}\r\n \r\n targetfield.setText(text);\r\n targetfield.repaint();\r\n }", "private EditingStatus() {\n // Class values\n className = \"\";\n editedClassName = \"\";\n associationClass = false;\n editedClass = false;\n\n // Relationship values\n openEditing = false;\n editedRel = false;\n deletedRels = false;\n relName = \"\";\n editedRelName = \"\";\n delRelationships = FXCollections.observableArrayList();\n }", "public StatusBar() {\n super();\n super.setPreferredSize(new Dimension(100, 16));\n setMessage(\"Ready\");\n }", "private void updateSubModeSpinnerTexts() {\n\n }", "public void setStatus(String stat)\n {\n status = stat;\n }", "public void initializeText(){\n\t\tfont = new BitmapFont();\n\t\tfont1 = new BitmapFont();\n\t\tfont1.setColor(Color.BLUE);\n\t\tfont2 = new BitmapFont();\n\t\tfont2.setColor(Color.BLACK);\n\t}", "private void init() {\n\t\ttxt_account=(TextView) findViewById(R.id.txt_account);\n\t\ttxt_passwd=(TextView) findViewById(R.id.txt_passwd);\n\t\ttxt_passwd_again=(TextView) findViewById(R.id.txt_passwd_again);\n\t\ttxt_hit=(TextView) findViewById(R.id.txt_hit);\n\t\ttxt_hit.setVisibility(View.GONE);\n\t\t\n\t\tedt_account=(EditText) findViewById(R.id.edt_zhanghao);\n\t\tedt_passwd=(EditText) findViewById(R.id.edt_mima);\n\t\tedt_passwd_again=(EditText) findViewById(R.id.edt_passwd_again);\n\t\t\n\t\t\n\t\tbtn_ok=(Button) findViewById(R.id.btn_ok);\n\t\tbtn_ok.setOnClickListener(this);\n\t}", "public void receiveMyBtStatus(String status) {\n \t\n \tfinal String s = status;\n \t\n \t\n// \tLog.d(\"handler\", \"receiveMyBtStatus\"); \t\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n // This gets executed on the UI thread so it can safely modify Views\n \tBTstatusTextView.setText(s);\n \t\n \tif(s.equals(\"BT-Ready\") && !(poll.getVisibility() == View.VISIBLE)){\n \t\tLog.d(\"poll buttion\", \"setting visible\");\n \t//Ready to poll\n \t\tpoll.setVisibility(View.VISIBLE);\n \t\n }\n }\n });\n }", "public RemoteControlTest() {\n // reset to initial state\n reset();\n // display \"ready\"\n TextLCD.print(READY);\t\t\n }", "private void $$$setupUI$$$() {\n statusPanel = new JPanel();\n statusPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\n statusLabel = new JLabel();\n statusLabel.setText(\"Status Label\");\n statusPanel.add(statusLabel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JSeparator separator1 = new JSeparator();\n statusPanel.add(separator1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n }", "@Override\r\n\tpublic void onInit(int status) {\n\t\t\r\n\t}", "private void setComponentStatus() {}", "@Override\npublic void onInit(int status) {\n\t\n\t\t\t\t\t\t\t\t}", "@Override\n\tpublic void onInit(int status) {\n\t G.trace(\"TTS OnInit: Status= [\"+status+\"]\");\n\t if (status == TextToSpeech.SUCCESS) {\n\t G.trace(\"TTS engine initialized\");\n\t tts.setLanguage(Locale.UK);\t\t\n\t }\n\t else\n\t\t G.trace(\"TTS engine could not be initialized\");\n\t}", "public Text()\n {\n super();\n initialize();\n }", "public void updateExpStatus(String str) {\n final String status = str;\n Runnable doUpdate = new Runnable() {\n public void run() {\n infoLabel.setText(status);\n }\n };\n SwingUtilities.invokeLater(doUpdate);\n }", "public releve() {\n initComponents();\n this.txtPath.setOpaque(true);\n this.txtPath.setEditable(false);\n }", "private void dynInit()\r\n\t{\t\t\r\n\t\t//\tInfo\r\n\t\tstatusBar.setStatusLine(Msg.getMsg(Env.getCtx(), \"InOutGenerateSel\"));//@@\r\n\t\tstatusBar.setStatusDB(\" \");\r\n\t\t//\tTabbed Pane Listener\r\n\t\ttabbedPane.addChangeListener(this);\r\n\t}", "public void loadStatus (){\n\t}", "private void initVar() {\n tvHello.setText(stringFromJNI());\n }", "public void loadStatus() {\r\n\r\n\t\ttry {\r\n\t\t\tRemoteOffice objRemoteOffice = Application.UNITY_CLIENT_APPLICATION.getreRemoteOffice();\r\n\t\t\tif (objRemoteOffice != null) {\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"Going to load the status of the components from broadworks.\");\r\n\r\n\t\t\t\tboolean isActive = objRemoteOffice.isActive();\r\n\t\t\t\tString phnumber = objRemoteOffice.getPhoneNumber();\r\n\t\t\t\tobjRemoteOfficeEnableJCheckBox.setSelected(isActive);\r\n\t\t\t\tobjRemoteOfficeJTextField.setText(phnumber);\r\n\r\n\t\t\t\tif (objRemoteOfficeEnableJCheckBox.isSelected()) {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(true);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(false);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status loaded successfully\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status not loaded successfully\");\r\n\t\t}\r\n\t}", "public void setStatus(java.lang.CharSequence value) {\n this.status = value;\n }", "private void createStatusBar() {\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout(new GridLayout(1, 4));\r\n\t\t\r\n\t\tlengthLab = new JLabel(\"Length: 0\");\r\n\t\tlengthLab.setForeground(Color.GRAY);\r\n\t\tlengthLab.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tpanel.add(lengthLab);\r\n\t\t\r\n\t\tlnLab = new JLabel(\"Ln: 0\");\r\n\t\tlnLab.setForeground(Color.GRAY);\r\n\t\tlnLab.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tpanel.add(lnLab);\r\n\t\t\r\n\t\tcolLab = new JLabel(\"Col: 1\");\r\n\t\tcolLab.setForeground(Color.GRAY);\r\n\t\tcolLab.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tpanel.add(colLab);\r\n\t\t\r\n\t selLab = new JLabel(\"Sel: 0\");\r\n\t\tselLab.setForeground(Color.GRAY);\r\n\t\tselLab.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tpanel.add(selLab);\r\n\t\t\r\n\t\tJLabel clock = new JLabel(new Date().toString());\r\n\t\tclock.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tpanel.add(clock, BorderLayout.PAGE_END);\r\n\t\ttimer = new Timer(100, (e) -> { \r\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\tclock.setText(sdf.format(new Date()));\r\n\t\t});\r\n\t\ttimer.start();\r\n\t\t\r\n\t\tgetContentPane().add(panel, BorderLayout.PAGE_END);\r\n\t}", "private void initializeViewAndControls() {\r\n txtEmail.setText(\"Email - \"+ AppConstants.ADMIN_EMAIL);\r\n txtCustomerCarePhone.setText(\"Customer Care - \"+ AppConstants.CUSTOMER_CARE_NUMBER);\r\n txtTollFreePhone.setText(\"Toll Free - \"+ AppConstants.TOLL_FREE_NUMBER);\r\n }", "public static void initComponents() {\n\n StyleConstants.setFontSize(headingStyle, 12);\n StyleConstants.setBold(headingStyle, true);\n StyleConstants.setFontFamily(headingStyle, \"Monospaced\");\n\n StyleConstants.setFontSize(black, 10);\n StyleConstants.setFontFamily(black, \"Monospaced\");\n\n StyleConstants.setFontSize(red, 10);\n StyleConstants.setFontFamily(red, \"Monospaced\");\n StyleConstants.setForeground(red, Color.red);\n\n StyleConstants.setFontSize(green, 10);\n StyleConstants.setFontFamily(green, \"Monospaced\");\n StyleConstants.setForeground(green, Color.blue);\n\n try {\n textPane.setCharacterAttributes(headingStyle, true);\n documentModel.insertString(documentModel.getLength(), \"Logging started ...\\n\\n\", headingStyle);\n } catch (BadLocationException ble) {\n System.out.println(\"Bad location for text insert on logpanel.\");\n }\n }", "public void setStatusText(String statusText) {\n\t\tif (headerGenerated)\n\t\t\tthrow new RuntimeException(\"Header already generated\");\n\t\tthis.statusText = statusText;\n\t}", "public stat() {\n initComponents();\n \n jLabel4.setVisible(false);\n jLabel5.setVisible(false);\n jLabel14.setText(System.getProperty(\"user.name\" ));\n jLabel15.setText(System.getProperty(\"os.name\"));\n \n }", "public EditorTxt() {\n initComponents();\n }", "public HwStatus() {\n \t\tsuper();\n \t\tthis.hwSig = 0;\n \t\tthis.microtickPeriod = 10000;\t// default\n \t\tthis.cf_version = \"\";\n \t}", "@Override\n public void onInit(int status) {\n if (status == TextToSpeech.SUCCESS) {\n int result = tts.setLanguage(Locale.US);\n if (result == TextToSpeech.LANG_MISSING_DATA ||\n result == TextToSpeech.LANG_NOT_SUPPORTED) {\n Log.e(\"error\", \"This Language is not supported\");\n } else {\n ConvertTextToSpeech(\"\");\n\n }\n } else\n Log.e(\"error\", \"Initilization Failed!\");\n\n\n }", "public void clear()\n\t{\n\t\tstatus.setTextFill(BLACK);\n\t\tstatus.setText(\"awaiting input...\");\n\t\tusername.setText(\"\");\n\t\taddress.setText(\"\");\n\t\tport.setText(\"\");\n\t}", "protected void setStatus(String status) {\n Message msg = mHandler.obtainMessage(DIALOG_UPDATE, status);\n mHandler.sendMessage(msg);\n }", "protected void initControl() {\n\t\t\r\n\t}", "private void init() {\n ip = SPUtils.get(this, Constant.SP_SERVICE_IP, \"\").toString();\n port = SPUtils.get(this, Constant.SP_SERVICE_PORT, \"\").toString();\n\n if (TextUtils.isEmpty(ip) || TextUtils.isEmpty(port)){\n editPort.setText(getResources().getString(R.string.default_port));\n editIp.setText(getResources().getString(R.string.default_ip));\n }else{\n editIp.setText(ip);\n editPort.setText(port);\n }\n }", "public StatusBar() {\n\t\tsuper();\n\t}", "private void initTextsI18n()\n {\n // Remember the different indentations to integrate better in different OS's\n String notMacLargeIndentation = (!OSUtil.IS_MAC ? \" \" : \"\");\n String notMacSmallIndentation = (!OSUtil.IS_MAC ? \" \" : \"\");\n String linuxLargeIndentation = (OSUtil.IS_LINUX ? \" \" : \"\");\n String linuxSmallIndentation = (OSUtil.IS_LINUX ? \" \" : \"\");\n \n this.setLocale(Locale.FRANCE);\n // this.setLocale(Locale.UK);\n I18nUtil.getInstance().setLocale(this.getLocale().getLanguage(), this.getLocale().getCountry());\n this.buttonAutoManual.setText(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.buttonAutoManual.Manual\"));\n this.buttonLaunchPause.setText(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.buttonLaunchPause.Pause\"));\n this.labelAuthMode.setText(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelAuthMode.Auto\"));\n this.labelAutoConnectState.setText(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelAutoConnectState.Launched\"));\n this.labelConnectionState.setText(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelConnectionState.Disconnected\"));\n this.labelNotifications.setText(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelNotifications\"));\n this.labelProfile.setForeground(Color.decode(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelProfile.Color\")));\n this.labelGroupSeparator.setForeground(Color.decode(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelGroupSeparator.Color\")));\n this.labelConnectionState.setForeground(Color.decode(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelConnectionState.Color\")));\n this.menuFile.setText(notMacLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile\") + notMacSmallIndentation);\n this.menuProfiles.setText(notMacSmallIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuProfiles\") + notMacSmallIndentation);\n this.menuHelp.setText(notMacSmallIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp\") + notMacSmallIndentation);\n this.menuFile_Parameters.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile_Parameters\"));\n this.menuFile_Quit.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile_Quit\"));\n this.menuHelp_Update.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_Update\"));\n this.menuHelp_Doc.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_Doc\"));\n this.menuHelp_FAQ.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_FAQ\"));\n this.menuHelp_About.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_About\"));\n this.popupMenu_ShowApp.setLabel(linuxSmallIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_ShowApp\"));\n this.popupMenu_PauseStart.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_PauseStart.Pause\"));\n this.popupMenu_Profiles.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_Profiles\"));\n this.popupMenu_Logs.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_Logs\"));\n this.popupMenu_Parameters.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_Parameters\"));\n this.popupMenu_Quit.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_Quit\"));\n this.setMenuBarMnemonics();\n }", "private void initialize() {\n\t\tfrmReadabilityStatistics = new JFrame();\n\t\tfrmReadabilityStatistics.getContentPane().setSize(new Dimension(720, 420));\n\t\tfrmReadabilityStatistics.getContentPane().setLayout(null);\n\t\t\n\t\tfinal JTextPane textPane = new JTextPane();\n\t\ttextPane.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\n\t\ttextPane.setMargin(new Insets(5, 5, 5, 5));\n\t\ttextPane.setBounds(10, 11, 530, 271);\n\t\tfrmReadabilityStatistics.getContentPane().add(textPane);\n\t\ttextField = new JTextField();\n\t\ttextField.setText(\"Enter File Path\");\n\t\ttextField.setColumns(10);\n\t\ttextField.setBounds(66, 310, 474, 23);\n\t\tfrmReadabilityStatistics.getContentPane().add(textField);\n\t\tfinal JLabel label = new JLabel(\"File Path:\");\n\t\tlabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlabel.setBounds(10, 308, 66, 22);\n\t\tfrmReadabilityStatistics.getContentPane().add(label);\n\t\t\n\t\tJButton btnReadability = new JButton(\"Readability\");\n\t\tbtnReadability.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString text = textPane.getText();\n\t\t\t\tif(!text.equals(\"\")){\n\t\t\t\t\tDocParseV1 dv1 = new DocParseV1();\n\t\t\t\t\tdv1.processText(text);\n\t\t\t\t\tStatistics stats = new Statistics();\n\t\t\t\t\tstats.frmStatistics.setVisible(true);\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(frmReadabilityStatistics,\n\t\t\t\t\t\t\t\"Please Enter some TEXT and then Click Readability \",\n\t\t\t\t\t\t\t\"Enter Some Text\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnReadability.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\n\t\tbtnReadability.setBounds(550, 21, 154, 23);\n\t\tfrmReadabilityStatistics.getContentPane().add(btnReadability);\n\t\t\n\t\tJButton btnBackToWiki = new JButton(\"Back to Wiki\");\n\t\tbtnBackToWiki.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tWiki wiki = new Wiki();\n\t\t\t\tReadability.this.frmReadabilityStatistics.dispose();\n\t\t\t\twiki.frmWiki.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tbtnBackToWiki.setBounds(10, 358, 140, 23);\n\t\tfrmReadabilityStatistics.getContentPane().add(btnBackToWiki);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Enhance Readability\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tEnhanceStatistics ehs = new EnhanceStatistics();\n\t\t\t\tehs.frmEnhanceReadability.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\n\t\tbtnNewButton.setBounds(550, 80, 154, 23);\n\t\tfrmReadabilityStatistics.getContentPane().add(btnNewButton);\n\t\t\n\t\tJButton btnProcessDocument = new JButton(\"Process Document\");\n\t\tbtnProcessDocument.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString resourceLocation = textField.getText();\n\t\t\t\tDocParseV1 dv1 = new DocParseV1();\n\t\t\t\ttry {\n\t\t\t\t\tif (!dv1.parse(resourceLocation)) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frmReadabilityStatistics,\n\t\t\t\t\t\t\t\t\"Make sure you entered a valid file path\",\n\t\t\t\t\t\t\t\t\"File not Found\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tStatistics stats = new Statistics();\n\t\t\t\t\t\tstats.frmStatistics.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnProcessDocument.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\n\t\tbtnProcessDocument.setBounds(550, 310, 154, 23);\n\t\tfrmReadabilityStatistics.getContentPane().add(btnProcessDocument);\n\t\tfrmReadabilityStatistics.setLocation(new Point(200, 150));\n\t\tfrmReadabilityStatistics.setFont(new Font(\"Arial\", Font.PLAIN, 12));\n\t\tfrmReadabilityStatistics.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\tfrmReadabilityStatistics.setResizable(false);\n\t\tfrmReadabilityStatistics.setTitle(\"Readability Statistics\");\n\t\tfrmReadabilityStatistics.setSize(new Dimension(720, 420));\n\t\tfrmReadabilityStatistics.setBounds(100, 100, 720, 420);\n\t\tfrmReadabilityStatistics.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "private void statInit() throws Exception\n \t{\n \t\tlDocumentNo.setLabelFor(fDocumentNo);\n \t\tfDocumentNo.setBackground(AdempierePLAF.getInfoBackground());\n \t\tfDocumentNo.addActionListener(this);\n // Begin Marcos Zúñiga\n lRoutingNo.setLabelFor(fRoutingNo);\n fRoutingNo.setBackground(AdempierePLAF.getInfoBackground());\n fRoutingNo.addActionListener(this);\n lCheckNo.setLabelFor(fCheckNo);\n fCheckNo.setBackground(AdempierePLAF.getInfoBackground());\n fCheckNo.addActionListener(this);\n // End Marcos Zúñiga\n \t\tfIsReceipt.setSelected(!\"N\".equals(Env.getContext(Env.getCtx(), p_WindowNo, \"IsSOTrx\")));\n \t\tfIsReceipt.addActionListener(this);\n // Begin Marcos Zúñiga\n \t\tlA_Name.setLabelFor(fA_Name);\n \t\tfA_Name.setBackground(AdempierePLAF.getInfoBackground());\n \t\tfA_Name.addActionListener(this);\n // End Marcos Zúñiga\n \t\tlDateFrom.setLabelFor(fDateFrom);\n \t\tfDateFrom.setBackground(AdempierePLAF.getInfoBackground());\n \t\tfDateFrom.setToolTipText(Msg.translate(Env.getCtx(), \"DateFrom\"));\n \t\tlDateTo.setLabelFor(fDateTo);\n \t\tfDateTo.setBackground(AdempierePLAF.getInfoBackground());\n \t\tfDateTo.setToolTipText(Msg.translate(Env.getCtx(), \"DateTo\"));\n \t\tlAmtFrom.setLabelFor(fAmtFrom);\n \t\tfAmtFrom.setBackground(AdempierePLAF.getInfoBackground());\n \t\tfAmtFrom.setToolTipText(Msg.translate(Env.getCtx(), \"AmtFrom\"));\n \t\tlAmtTo.setLabelFor(fAmtTo);\n \t\tfAmtTo.setBackground(AdempierePLAF.getInfoBackground());\n \t\tfAmtTo.setToolTipText(Msg.translate(Env.getCtx(), \"AmtTo\"));\n \t\t//\n \t\tparameterPanel.setLayout(new ALayout());\n \t\t// First Row\n \t\tparameterPanel.add(lDocumentNo, new ALayoutConstraint(0,0));\n \t\tparameterPanel.add(fDocumentNo, null);\n \t\tparameterPanel.add(lA_Name, null); // Marcos Zúñiga\n \t\tparameterPanel.add(fA_Name, null); // Marcos Zúñiga\n \t\tparameterPanel.add(fIsReceipt, new ALayoutConstraint(0,5));\n \t\t// 2nd Row\n parameterPanel.add(lRoutingNo, new ALayoutConstraint(1,0)); // Marcos Zúñiga\n parameterPanel.add(fRoutingNo, null); // Marcos Zúñiga\n \t\tparameterPanel.add(lDateFrom, new ALayoutConstraint(1,2));\n \t\tparameterPanel.add(fDateFrom, null);\n \t\tparameterPanel.add(lDateTo, null);\n \t\tparameterPanel.add(fDateTo, null);\n \t\t// 3rd Row\n parameterPanel.add(lCheckNo, new ALayoutConstraint(2,0)); // Marcos Zúñiga\n parameterPanel.add(fCheckNo, null); // Marcos Zúñiga\n \t\tparameterPanel.add(lAmtFrom, new ALayoutConstraint(2,2));\n \t\tparameterPanel.add(fAmtFrom, null);\n \t\tparameterPanel.add(lAmtTo, null);\n \t\tparameterPanel.add(fAmtTo, null);\n \t//\tparameterPanel.add(lOrg_ID, null);\n \t//\tparameterPanel.add(fOrg_ID, null);\n \t\tfIsReceipt.setEnabled(false);\n \t}", "private void initVar() {\n\n sTextLD = sTextMLD;\n\n }", "private void initialization() {\n\t\tprogressbar = (ProgressBar) findViewById(R.id.progressBar1);\n\t\tprogressbar.getIndeterminateDrawable().setColorFilter(0xFFFFC107,\n\t\t\t\tandroid.graphics.PorterDuff.Mode.MULTIPLY);\n\t\ttheBrow = (WebView) findViewById(R.id.clickBrower);\n\t\trel = (RelativeLayout) findViewById(R.id.reL);\n\t\tbringBack = (Button) findViewById(R.id.bBack);\n\t\tbringForward = (Button) findViewById(R.id.bForward);\n\t\tbRefresh = (Button) findViewById(R.id.brefresh);\n\t\tinputText = (EditText) findViewById(R.id.editUrl);\n\t\tbingo = (Button) findViewById(R.id.bGo);\n\t}", "void init() {\n txtMaKM.setText(random().toUpperCase());\n dccThoiHan.setDateFormatString(\"dd/MM/yyyy\");\n dccThoiHan.setDate(new Date());\n checkHSD();\n load();\n }" ]
[ "0.7157107", "0.6928019", "0.6489533", "0.6269479", "0.61948276", "0.61850363", "0.61571836", "0.6149281", "0.6126835", "0.6117461", "0.6078625", "0.60561854", "0.6022668", "0.60143656", "0.5987101", "0.5944397", "0.5937265", "0.59127915", "0.59079057", "0.5890925", "0.58807266", "0.58785003", "0.584216", "0.5809353", "0.5806781", "0.5799631", "0.5793794", "0.57912135", "0.57903904", "0.5781082", "0.5768179", "0.5762168", "0.5757905", "0.5745059", "0.5744018", "0.57270783", "0.57191247", "0.5718781", "0.5708359", "0.568633", "0.5675587", "0.5673529", "0.56606525", "0.56587815", "0.56516427", "0.5627076", "0.56210065", "0.5615531", "0.5604878", "0.5598008", "0.559149", "0.55871975", "0.55784935", "0.55720323", "0.55625623", "0.5560106", "0.555991", "0.55506855", "0.5534133", "0.55327123", "0.5532179", "0.5531954", "0.55099833", "0.5503256", "0.5497575", "0.5495371", "0.5479982", "0.54786307", "0.54737204", "0.5467953", "0.54634786", "0.5458323", "0.5447902", "0.54371166", "0.54368377", "0.542677", "0.54265624", "0.54235524", "0.5422864", "0.54189235", "0.5408538", "0.540183", "0.5399679", "0.5398606", "0.5393673", "0.5390627", "0.5385014", "0.5383229", "0.53822017", "0.53762543", "0.53757447", "0.53696585", "0.5367214", "0.5366496", "0.5357015", "0.53560865", "0.53458536", "0.53366536", "0.53353393", "0.53332055" ]
0.72914296
0
This method initializes paneStandard
org.parosproxy.paros.view.WorkbenchPanel getWorkbench() { if (paneStandard == null) { paneStandard = new org.parosproxy.paros.view.WorkbenchPanel(); paneStandard.setLayout(new java.awt.CardLayout()); paneStandard.setName("paneStandard"); } return paneStandard; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initPane() {\n\t\tContainer localContainer = getContentPane();\n\t\tlocalContainer.setLayout(new BorderLayout());\n\t\t\n\t\tsplitpane_left_top.setBorder(BorderFactory.createTitledBorder(\"Training Data\"));\n\t\tsplitpane_left_bottom.setBorder(BorderFactory.createTitledBorder(\"Tree View\"));\n\t\tsplitpane_left.setDividerLocation(400);\n\t\tsplitpane_left.setLastDividerLocation(0);\n\t\tsplitpane_left.setOneTouchExpandable(true);\n\t\tsplitpane_right.setBorder(BorderFactory.createTitledBorder(\"Classifer Output\"));\n\t\tsplitpane_main.setDividerLocation(500);\n\t\tsplitpane_main.setLastDividerLocation(0);\n\t\tsplitpane_main.setOneTouchExpandable(true);\n\t\tlocalContainer.add(splitpane_main, \"Center\");\n\t\tlocalContainer.add(statusPanel,BorderLayout.SOUTH);\n\t}", "public void initialize() {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(548, 372));\n this.add(getTitlePane(), new com.ulcjava.base.application.GridBagConstraints(0, 0, 3, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getXpertIvyPane(), new com.ulcjava.base.application.GridBagConstraints(0, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getLicensePane(), new com.ulcjava.base.application.GridBagConstraints(0, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getDatabasePane(), new com.ulcjava.base.application.GridBagConstraints(0, 3, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getJavaPane(), new com.ulcjava.base.application.GridBagConstraints(0, 4, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n }", "private void initialiseUI()\n { \n // The actual data go in this component.\n String defaultRootElement = \"icr:regionSetData\";\n JPanel contentPanel = initialiseContentPanel(defaultRootElement);\n pane = new JScrollPane(contentPanel);\n \n panelLayout = new GroupLayout(this);\n\t\tthis.setLayout(panelLayout);\n\t\tthis.setBackground(DAOConstants.BG_COLOUR);\n\n\t\tpanelLayout.setAutoCreateContainerGaps(true);\n\n panelLayout.setHorizontalGroup(\n\t\t\tpanelLayout.createParallelGroup()\n\t\t\t.addComponent(pane, 10, 520, 540)\n );\n\n panelLayout.setVerticalGroup(\n\t\t\tpanelLayout.createSequentialGroup()\n .addComponent(pane, 10, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)\n );\n }", "public void init()\n {\n buildUI(getContentPane());\n }", "public void initCon() {\n\t\t\n\t\t//ImageIcon icon = new ImageIcon(this.getClass().getResource(\"lib/data/icon/log.png\"));\n\t\t//txtArea.setLineWrap(true);\n\t\ttxtArea = new JTextArea(16,70);\n\t\t//txtArea.setLineWrap(true);\n\t\tJTabbedPane tPane = new JTabbedPane();\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane(txtArea); \n\t\t\n\t\t\n\t\tJPanel top = new JPanel();\n\t\tJPanel center = new JPanel();\n\t\t\n\t\tbottom = new JPanel();\n\t\tColor color = UIManager.getColor ( \"Panel.background\" );\n\t\t\n\t\ttop.add( scrollPane );\n\t\ttPane.addTab(\"Console\", top);\n\t\t\n\t\t\n\t\t//set colors\n\t\treadout.setBackground(color);\n\t\ttop.setBackground(color);\n\t\tcenter.setBackground(color);\n\t\tbottom.setBackground(color);\n\t\t//.setOpaque(true);\n\t\t\n\t\tbottom.setLayout(new GridLayout(1,2));\n\t\tbottom.add(readout);\n\t\tcenter.setLayout(new GridLayout(2,1));\n\t\tadd(center, BorderLayout.CENTER);\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\tadd(tPane, BorderLayout.NORTH);\n\t}", "public PaneOrganizer() {\n\t\t\n\t\t_root = new BorderPane();\n\t\t_game = new Game(_root);\n\t\tthis.setupButton();\n\t\t\n\t}", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "@Override\n\tpublic void setPane() {\n\t\tNewTaskPane textListPane = new NewTaskPane();\n\t\trootPane = new HomePane(new MainLeftPane(),textListPane);\t\t\n\t}", "public OptionPane() {\n\t\t\n\t\tinit();\n\t}", "public SummaryPane() {\n\t\tbuildUpGUI();\n\t\tsetDefaultValues();\n\t\t//summaryEditorPane.addHyperlinkListener( new Hyperactive() );\n\t}", "@Override\n\tpublic void setPane() {\n\t\tNewSchedulePane SchListPane = new NewSchedulePane();\n\t\trootPane = new HomePane(new MainLeftPane(),SchListPane);\n\t}", "private void initRoot() {\n root = new VBox(10);\n root.setAlignment(Pos.CENTER);\n root.setPadding(new Insets(10));\n root.setPrefWidth(300);\n root.setPrefHeight(150);\n }", "public AStationPane() {\n }", "public MainContentPane() {\r\n\t\tsuper();\r\n\r\n\t\t// Add design-time configured components.\r\n\t\tinitComponents();\r\n\t}", "public ReportPane() {\n initComponents();\n }", "public void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Pepoview.class.getResource(\"MainWindow.fxml\"));\n rootLayout = (SplitPane) loader.load(); \n \n // Show the scene containing the root layout.\n Scene scene = new Scene(rootLayout);\n primaryStage.setScene(scene);\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void initModule(){\n SplitPane pane = new SplitPane();\n VBox module = (VBox) loader.getNamespace().get(\"vbox_grapher\");\n ScrollPane module_parent = (ScrollPane) loader.getNamespace().get(\"vbox_grapher_parent\");\n\n //bug solution (set resizable with parent):\n module_parent.setFitToHeight(true);\n module_parent.setFitToWidth(true);\n\n //clear(module);\n createGraphes(-1, module);\n }", "private void init() {\n List<Contructor> list = servisContructor.getAllContructors();\n for (Contructor prod : list) {\n contructor.add(new ContructorViewer(prod));\n }\n\n Label label = new Label(\"Catalog Contructors\");\n label.setLayoutX(140);\n label.setLayoutY(20);\n label.setStyle(\"-fx-font-size:20px\");\n\n initTable();\n table.setLayoutX(120);\n table.setLayoutY(60);\n table.setStyle(\"-fx-font-size:16px\");\n\n GridPane control = new ControlPanel(this, 2).getPanel();\n control.setLayoutX(120);\n control.setLayoutY(300);\n\n panel.setAlignment(Pos.CENTER);\n panel.add(label, 0, 0);\n panel.add(table, 0, 1);\n panel.add(control, 0, 2);\n }", "@Override\n\t\tpublic void setPane(JPanel pane) {\n\t\t\t\n\t\t}", "private void initialize() {\n\t\tthis.setSize(629, 270);\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setPreferredSize(new Dimension(629, 270));\n\t\tthis.setMinimumSize(new Dimension(629, 270));\n\t\tthis.setMaximumSize(new Dimension(629, 270));\n\t\tthis.add(getJSplitPane2(), BorderLayout.CENTER);\n\t}", "private void initializateGUI() {\n\t\t\n\t\t\n\t\tthis.menuBar = buildMenuBar();\n\t\t\n\t\tthis.toolBar = buildToolBar();\n\t\t\n\t\tthis.container = (JComponent) ContainerViewFactory.getInstance().getContainerView(null);\n\t\t\n\t\tthis.status = buildStatusBar();\n\t\t\n\t\tscrollPane = new JScrollPane();\n\t\tscrollPane.getViewport().add(this.container);\n\t\t\n\t\ttextResources.getString(\"application.title\").ifPresent(super::setTitle);\n\n\t\tif (this.menuBar != null) {\n\t\t\tsuper.setJMenuBar(this.menuBar);\n\t\t}\n\t\tsuper.setPreferredSize(MINIMUM_SIZE);\n\t\tsuper.setMinimumSize(MINIMUM_SIZE);\n\t\tsuper.setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));\n\n\t\tsuper.getRootPane().setPreferredSize(MINIMUM_SIZE);\n\t\tsuper.getRootPane().setMinimumSize(MINIMUM_SIZE);\t\t\n\t\tsuper.getRootPane().setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));\n\t\t\n\t\tsuper.setLayout(new BorderLayout());\n\t\t\n\t\tsuper.add(toolBar, BorderLayout.NORTH);\n\t\tsuper.add(scrollPane, BorderLayout.CENTER);\n\t\tsuper.add(status, BorderLayout.SOUTH);\n\t\t\n\t\tsuper.addWindowListener(new WindowAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\tinitializationDialog = buildInitializationAction();\n\t\t\t\tinitializationDialog.setVisible(true);\n\t\t\t\tinitializationDialog.toFront();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tconfirmExitAction();\n\t\t\t}\n\t\t});\n\t\tthis.handlerInitializateGUI();\n\t}", "private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}", "private void initPane(Container pane){\n\n\t\tif(!(pane.getLayout() instanceof BorderLayout)){\n\t\t\tpane.add(new JLabel(\"Container doesn't use BorderLayout!\"));\n\t\t\treturn;\n\t\t}\n\n\t\tpane.setBackground(Color.DARK_GRAY);\n\n\t\tif(!DEVELOPMENT_MODE){\n\t\t\t// Transparent 16 x 16 pixel cursor image\n\t\t\tBufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);\n\t\t\t// Create a new blank cursor\n\t\t\tCursor blankCursor = Toolkit.getDefaultToolkit().createCustomCursor(cursorImg, new Point(0, 0), \"blank cursor\");\n\t\t\t// Set the blank cursor to the JFrame\n\t\t\tpane.setCursor(blankCursor);\n\t\t}\n\n//\t\tWebcam webcam = Webcam.getDefault();\n//\t\twebcam.setViewSize(WebcamResolution.QVGA.getSize());\n\n//\t\twebcamPanel = new WebcamPanel(webcam);\n//\t\twebcamPanel.setFPSDisplayed(true);\n//\t\twebcamPanel.setDisplayDebugInfo(true);\n//\t\twebcamPanel.setImageSizeDisplayed(true);\n//\t\twebcamPanel.setFPSLimit(FRAMERATE);\n//\n//\t\tpane.add(webcamPanel);\n//\n//\t\twebcamPanel.add(new JLabel(\"Hello world!\"));\n\n\t\tvideoContainer = new JLabel((ImageIcon)null); // Will be initialised later\n\t\tvideoContainer.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tvideoContainer.setFont(FONT);\n\t\tvideoContainer.setForeground(new Color(0xff6655));\n\t\tvideoContainer.setText(\"Camera error!\");\n\n\t\tpane.add(videoContainer);\n\n\t}", "private void initBaseLayout()\n {\n add(viewPaneWrapper, BorderLayout.CENTER);\n \n currentLayoutView = VIEW_PANE;\n currentSearchView = SEARCH_PANE_VIEW;\n showMainView(VIEW_PANE);\n showSearchView(currentSearchView);\n }", "public void displayTestPane() {\n mainWindow.setContent(new TestPane());\n console = null;\n }", "private void initialize() {\r\n this.setSize(new Dimension(374, 288));\r\n this.setContentPane(getJPanel());\r\n this.setResizable(false);\r\n this.setModal(true);\r\n this.setTitle(\"颜色选择面板\");\r\n addJPanel();\r\n\t}", "private void initProcess(){\n this.getScPanelFriends().getViewport().setOpaque(false);\n this.getScPanelTopics().getViewport().setOpaque(false);\n this.getCenterPanel().setSize(0,0);\n this.getEastPanel().setSize(1700,800);\n //Administrador inhabilitado por defecto hasta implementación\n this.getBtnAdmin().setEnabled(false);\n this.getMenuOption().setLocationRelativeTo(this);\n }", "private void initializeSplitPane() {\n\t\tthis.splitPane = new JSplitPane();\n\t\tthis.splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);\n\t\tthis.splitPane.setDividerLocation(this.screenDimensions.height / 2);\n\t\tthis.getContentPane().add(this.splitPane, BorderLayout.CENTER);\n\t}", "private void initialize() {\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(810, 600);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\t\tthis.setModal(true);\n\t\tthis.setResizable(false);\n\t\tthis.setName(\"FramePrincipalLR\");\n\t\tthis.setTitle(\"CR - Lista de Regalos\");\n\t\tthis.setLocale(new java.util.Locale(\"es\", \"VE\", \"\"));\n\t\tthis.setUndecorated(false);\n\t}", "private void createLayout () {\n \t\n \tBorderPane border = new BorderPane();\n \t\n \t\n \t tabPane = new TabPane();\n ArrayList <ScrollPane> tabs = new ArrayList <ScrollPane>();\n \t\n //create column 1 - need to refactor this and make more generic\n TilePane col1 = new TilePane();\n \tcol1.setPrefColumns(2);\n \tcol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol1.setAlignment(Pos.TOP_LEFT);\n \tcol1.getChildren().addAll(createElements ());\n \tScrollPane scrollCol1 = new ScrollPane(col1);\n \ttabs.add(scrollCol1);\n \t\n \tTilePane col2 = new TilePane();\n \tcol2.setPrefColumns(2);\n \tcol2.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol2.setAlignment(Pos.TOP_LEFT);\n \tcol2.getChildren().addAll(createElements ());\n \tScrollPane scrollCol2 = new ScrollPane(col2);\n \ttabs.add(scrollCol2);\n \t\n \t\n \t\n for (int i = 0; i < tabs.size(); i++) {\n Tab tab = new Tab();\n String tabLabel = \"Col-\" + i;\n tab.setText(tabLabel);\n keywordsList.put(tabLabel, new ArrayList <String>());\n \n tab.setContent(tabs.get(i));\n tabPane.getTabs().add(tab);\n }\n \t\n \t\n \t\n \t\n \t\n \t\n //System.out.println(controller.getScene());\n border.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n border.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n ToolBar toolbar = createtoolBar();\n toolbar.setPrefHeight(50);\n \n border.setTop(toolbar);\n\t\t\n\n\t scrollCol1.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n\t scrollCol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n border.setCenter(tabPane);\n\t Group root = (Group)this.getRoot();\n root.getChildren().add(border);\n\t}", "private void initUI() {\n\t\tStage stage = Stage.createStage();\n\n\t\tControl formPanel = buildFormTestTab();\n\n\t\tControl cellPanel = buildCellTestTab();\n\t\t\n\t\tTabPanel tabbedPane = new TabPanel();\n\t\ttabbedPane.add(\"Form Test\", formPanel);\n\t\ttabbedPane.add(\"Cell Layout Test\", cellPanel);\n\n\t\tstage.setContent(tabbedPane);\n\t}", "public void initialPanes()\r\n\t{\n\t\t\t\tlmg.setLayout(null);\r\n\t\t\t\tlmg.setBounds(0, 0, 1280, 720);\r\n\t\t\t\t\r\n\t\t//adding child panes\r\n\t\t\t\t//World background pane\r\n\t\t\t\t\tlmg.add(wB, new Integer(0));\r\n\t\t\t\t//World pane\r\n\t\t\t\t\tlmg.add(w, new Integer(1));\r\n\t\t\t\t\t\r\n\t\t//DisplayPanel adds the layered pane which holds all child pane\r\n\t\t\t\tadd(lmg);\r\n\t}", "@Override\n protected void windowInit ()\n {\n }", "private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}", "@Override\r\n\tprotected void initPage() {\n\t\t\r\n\t\t\r\n\t\tJPanel paneLabel = new JPanel();\r\n\t\t//JPanel panelTabs = new JPanel();\r\n\t\t\r\n\t\t\r\n\t\t//pack.setVisible(false);\r\n\r\n\t\t//setlay out\r\n\t\t//panelTabs.setLayout(new GridLayout(1, 1));\r\n\t\t\r\n\t\t//add label to label panel\r\n\t\tpaneLabel.add(new JLabel(\"Please select Objects To export\"));\r\n\t\t//tabs.setLayout(new GridLayout(1, 1));\r\n\t\t\r\n\t\t//add tabs\r\n\t\ttabs.addTab(\"Packages\", null, pack, \"Packages\");\r\n\t\ttabs.addTab(\"Functions\", null, fun, \"Functions\");\r\n\t\ttabs.addTab(\"Procedures\", null, proc, \"Procedures\");\r\n\t\ttabs.addTab(\"Schemas\", null, sch, \"Schemas\");\r\n\t\t\r\n\t\t\r\n\t\ttabs.setTabPlacement(JTabbedPane.TOP);\r\n\t\t\r\n\t\t//add tabs to tabpanel panel\r\n\t\t//panelTabs.add(tabs);\r\n\t\t\r\n\t\t//add data tables to panels\r\n\t\tpackTbl = new JObjectTable(pack);\r\n\t\tfunTbl = new JObjectTable(fun);\r\n\t\tschTbl = new JObjectTable(sch);\r\n\t\tprocTbl = new JObjectTable(proc);\r\n\t\t\r\n\t\t//set layout\r\n\t\tsetLayout(new GridLayout(1,1));\r\n\t\t\r\n\t\t//add label & tabs to page panel\r\n\t\t//add(paneLabel, BorderLayout.NORTH);\r\n\t\t//add(panelTabs,BorderLayout.CENTER);\r\n\t\tadd(tabs);\r\n\t\t\r\n\t\t//init select all check boxes\r\n\t\tinitChecks();\r\n\t\t\r\n\t\t//add checks to panel\r\n\t\tpack.add(ckPack);\r\n\t\tfun.add(ckFun);\r\n\t\tsch.add(ckSchema);\r\n\t\tproc.add(ckProc);\r\n\t\t\r\n\t}", "public GUI()\n {\n initComponents();\n setSize(xSize, ySize);\n figures = new PFigure[numFigs];\n }", "private void initComponents() {\n\t\tstage = new Stage();\n\t\tHBox root = new HBox();\n\t\troot.setPadding(new Insets(10));\n\t\troot.setAlignment(Pos.CENTER);\n\t\tlabel = new Label(\" \");\n\t\tlabel.setPrefWidth(144);\n\t\tlabel.setFont(new Font(\"Arial\", 80.0));\n\t\tlabel.setAlignment(Pos.CENTER);\n\t\troot.getChildren().add(label);\n\t\tScene scene = new Scene(root);\n\t\tstage.setScene(scene);\n\t\tstage.setTitle(\"Count Guest\");\n\t\tstage.sizeToScene();\n\t}", "private void initComponents() {\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n }", "public NavigatorPane() {\n _initNewLayer(_symbolLayer);\n _rebuildLayerArray();\n }", "private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "@Override\n\tpublic void setPane() {\n\t\tNewRecordPane RecListPane = new NewRecordPane();\n\t\trootPane = new HomePane(new MainLeftPane(),RecListPane);\n\t}", "public MainWindow()\n {\n initComponents();\n\n // Asignamos los eventos de los controles propios\n this.setCustomControlEvents();\n // Desactivamos por defecto todos los elementos de las barras de imagen\n this.setImageWindowDeactivated();\n \n this.jSplitPane1.setDividerLocation(0.9);\n }", "private void initComponents() {\n\t\tSplitPane mainSplitPane = new SplitPane(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM);\n\t\tmainSplitPane.setSeparatorPosition(new Extent(34));\n\t\tnavigator = new AnyRowNavigator();\n\t\tmainSplitPane.add(navigator);\n\t\tSplitPane splitPane = new SplitPane();\n\t\tsplitPane.setOrientation(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM);\n\t\tsplitPane.setSeparatorPosition(new Extent(200));\n\t\tsplitPane.setResizable(true);\n\t\tmainSplitPane.add(splitPane);\n\t\tadd(mainSplitPane);\t\t\n rootLayout = new Grid();\n rootLayout.setWidth(new Extent(100, Extent.PERCENT));\n rootLayout.setSize(8);\n splitPane.add(rootLayout);\n EMPSN_CaptionLabel = new nextapp.echo2.app.Label();\n EMPSN_CaptionLabel.setText(\"N_GET_DATA.EMPSN\");\n rootLayout.add(EMPSN_CaptionLabel);\n GridLayoutData infoLayout = new GridLayoutData();\n infoLayout.setColumnSpan(7);\n Row row = new Row();\n row.setLayoutData(infoLayout);\n EMPSN_DscField1 = new dsc.echo2app.component.DscField();\n EMPSN_DscField1.setWidth(new Extent(60));\n EMPSN_DscField1.setId(\"EMPSN_DscField1\");\n row.add(EMPSN_DscField1);\n lblInfo = new DirectHtml();\n row.add(lblInfo);\n rootLayout.add(row);\n// DEPSN_CaptionLabel = new nextapp.echo2.app.Label();\n// rootLayout.add(DEPSN_CaptionLabel);\n// DEPSN_DscField1 = new dsc.echo2app.component.DscField();\n// DEPSN_DscField1.setWidth(new Extent(60));\n// DEPSN_DscField1.setId(\"DEPSN_DscField1\");\n// rootLayout.add(DEPSN_DscField1);\n MONTHS_CaptionLabel = new nextapp.echo2.app.Label();\n MONTHS_CaptionLabel.setText(\"N_GET_DATA.MONTHS\");\n rootLayout.add(MONTHS_CaptionLabel);\n MONTHS_DscField2 = new dsc.echo2app.component.DscField();\n MONTHS_DscField2.setWidth(new Extent(60));\n MONTHS_DscField2.setId(\"MONTHS_DscField2\");\n rootLayout.add(MONTHS_DscField2);\n YEARS_CaptionLabel = new nextapp.echo2.app.Label();\n YEARS_CaptionLabel.setText(\"N_GET_DATA.YEARS\");\n rootLayout.add(YEARS_CaptionLabel);\n YEARS_DscField3 = new dsc.echo2app.component.DscField();\n YEARS_DscField3.setWidth(new Extent(60));\n YEARS_DscField3.setId(\"YEARS_DscField3\");\n rootLayout.add(YEARS_DscField3);\n DUCLS_CaptionLabel = new nextapp.echo2.app.Label();\n DUCLS_CaptionLabel.setText(\"N_GET_DATA.DUCLS\");\n rootLayout.add(DUCLS_CaptionLabel);\n DUCLS_DscField4 = new dsc.echo2app.component.DscField();\n DUCLS_DscField4.setWidth(new Extent(60));\n DUCLS_DscField4.setDisabledBackground(new Color(0xFBF4D4));\n DUCLS_DscField4.setDisabledForeground(new Color(0x2A7FFF));\n DUCLS_DscField4.setId(\"DUCLS_DscField4\");\n rootLayout.add(DUCLS_DscField4);\n NDUCLS_CaptionLabel = new nextapp.echo2.app.Label();\n NDUCLS_CaptionLabel.setText(\"N_GET_DATA.NDUCLS\");\n rootLayout.add(NDUCLS_CaptionLabel);\n NDUCLS_DscField5 = new dsc.echo2app.component.DscField();\n NDUCLS_DscField5.setWidth(new Extent(60));\n NDUCLS_DscField5.setId(\"NDUCLS_DscField5\");\n rootLayout.add(NDUCLS_DscField5);\n ADDHOL_CaptionLabel = new nextapp.echo2.app.Label();\n ADDHOL_CaptionLabel.setText(\"N_GET_DATA.ADDHOL\");\n rootLayout.add(ADDHOL_CaptionLabel);\n ADDHOL_DscField6 = new dsc.echo2app.component.DscField();\n ADDHOL_DscField6.setWidth(new Extent(60));\n ADDHOL_DscField6.setId(\"ADDHOL_DscField6\");\n rootLayout.add(ADDHOL_DscField6);\n ADDCLS1_CaptionLabel = new nextapp.echo2.app.Label();\n ADDCLS1_CaptionLabel.setText(\"N_GET_DATA.ADDCLS1\");\n rootLayout.add(ADDCLS1_CaptionLabel);\n ADDCLS1_DscField7 = new dsc.echo2app.component.DscField();\n ADDCLS1_DscField7.setWidth(new Extent(60));\n ADDCLS1_DscField7.setId(\"ADDCLS1_DscField7\");\n rootLayout.add(ADDCLS1_DscField7);\n NADDCLS_CaptionLabel = new nextapp.echo2.app.Label();\n NADDCLS_CaptionLabel.setText(\"N_GET_DATA.NADDCLS\");\n rootLayout.add(NADDCLS_CaptionLabel);\n NADDCLS_DscField8 = new dsc.echo2app.component.DscField();\n NADDCLS_DscField8.setWidth(new Extent(60));\n NADDCLS_DscField8.setId(\"NADDCLS_DscField8\");\n rootLayout.add(NADDCLS_DscField8);\n LATE_CaptionLabel = new nextapp.echo2.app.Label();\n LATE_CaptionLabel.setText(\"N_GET_DATA.LATE\");\n rootLayout.add(LATE_CaptionLabel);\n LATE_DscField9 = new dsc.echo2app.component.DscField();\n LATE_DscField9.setWidth(new Extent(60));\n LATE_DscField9.setId(\"LATE_DscField9\");\n rootLayout.add(LATE_DscField9);\n SIGN_CaptionLabel = new nextapp.echo2.app.Label();\n SIGN_CaptionLabel.setText(\"N_GET_DATA.SIGN\");\n rootLayout.add(SIGN_CaptionLabel);\n SIGN_DscField10 = new dsc.echo2app.component.DscField();\n SIGN_DscField10.setWidth(new Extent(60));\n SIGN_DscField10.setId(\"SIGN_DscField10\");\n rootLayout.add(SIGN_DscField10);\n ACN_CaptionLabel = new nextapp.echo2.app.Label();\n ACN_CaptionLabel.setText(\"N_GET_DATA.ACN\");\n rootLayout.add(ACN_CaptionLabel);\n ACN_DscField11 = new dsc.echo2app.component.DscField();\n ACN_DscField11.setWidth(new Extent(60));\n ACN_DscField11.setId(\"ACN_DscField11\");\n rootLayout.add(ACN_DscField11);\n ACNM_CaptionLabel = new nextapp.echo2.app.Label();\n ACNM_CaptionLabel.setText(\"N_GET_DATA.ACNM\");\n rootLayout.add(ACNM_CaptionLabel);\n ACNM_DscField12 = new dsc.echo2app.component.DscField();\n ACNM_DscField12.setWidth(new Extent(60));\n ACNM_DscField12.setId(\"ACNM_DscField12\");\n rootLayout.add(ACNM_DscField12);\n REST_CaptionLabel = new nextapp.echo2.app.Label();\n REST_CaptionLabel.setText(\"N_GET_DATA.REST\");\n rootLayout.add(REST_CaptionLabel);\n REST_DscField13 = new dsc.echo2app.component.DscField();\n REST_DscField13.setWidth(new Extent(60));\n REST_DscField13.setId(\"REST_DscField13\");\n rootLayout.add(REST_DscField13);\n REST_PAY_CaptionLabel = new nextapp.echo2.app.Label();\n REST_PAY_CaptionLabel.setText(\"N_GET_DATA.REST_PAY\");\n rootLayout.add(REST_PAY_CaptionLabel);\n REST_PAY_DscField14 = new dsc.echo2app.component.DscField();\n REST_PAY_DscField14.setWidth(new Extent(60));\n REST_PAY_DscField14.setId(\"REST_PAY_DscField14\");\n rootLayout.add(REST_PAY_DscField14);\n REST_SICK_CaptionLabel = new nextapp.echo2.app.Label();\n REST_SICK_CaptionLabel.setText(\"N_GET_DATA.REST_SICK\");\n rootLayout.add(REST_SICK_CaptionLabel);\n REST_SICK_DscField15 = new dsc.echo2app.component.DscField();\n REST_SICK_DscField15.setWidth(new Extent(60));\n REST_SICK_DscField15.setId(\"REST_SICK_DscField15\");\n rootLayout.add(REST_SICK_DscField15);\n OTHER_CaptionLabel = new nextapp.echo2.app.Label();\n OTHER_CaptionLabel.setText(\"N_GET_DATA.OTHER\");\n rootLayout.add(OTHER_CaptionLabel);\n OTHER_DscField16 = new dsc.echo2app.component.DscField();\n OTHER_DscField16.setWidth(new Extent(60));\n OTHER_DscField16.setId(\"OTHER_DscField16\");\n rootLayout.add(OTHER_DscField16);\n NWHOUR_CaptionLabel = new nextapp.echo2.app.Label();\n NWHOUR_CaptionLabel.setText(\"N_GET_DATA.NWHOUR\");\n rootLayout.add(NWHOUR_CaptionLabel);\n NWHOUR_DscField17 = new dsc.echo2app.component.DscField();\n NWHOUR_DscField17.setWidth(new Extent(60));\n NWHOUR_DscField17.setId(\"NWHOUR_DscField17\");\n rootLayout.add(NWHOUR_DscField17);\n ADDHOLN_CaptionLabel = new nextapp.echo2.app.Label();\n ADDHOLN_CaptionLabel.setText(\"N_GET_DATA.ADDHOLN\");\n rootLayout.add(ADDHOLN_CaptionLabel);\n ADDHOLN_DscField18 = new dsc.echo2app.component.DscField();\n ADDHOLN_DscField18.setWidth(new Extent(60));\n ADDHOLN_DscField18.setId(\"ADDHOLN_DscField18\");\n rootLayout.add(ADDHOLN_DscField18);\n LMATER_CaptionLabel = new nextapp.echo2.app.Label();\n LMATER_CaptionLabel.setText(\"N_GET_DATA.LMATER\");\n rootLayout.add(LMATER_CaptionLabel);\n LMATER_DscField19 = new dsc.echo2app.component.DscField();\n LMATER_DscField19.setWidth(new Extent(60));\n LMATER_DscField19.setId(\"LMATER_DscField19\");\n rootLayout.add(LMATER_DscField19);\n LOCKED_CaptionLabel = new nextapp.echo2.app.Label();\n LOCKED_CaptionLabel.setText(\"N_GET_DATA.LOCKED\");\n rootLayout.add(LOCKED_CaptionLabel);\n LOCKED_DscField20 = new dsc.echo2app.component.DscField();\n LOCKED_DscField20.setWidth(new Extent(60));\n LOCKED_DscField20.setId(\"LOCKED_DscField20\");\n rootLayout.add(LOCKED_DscField20);\n// UP_DATE_CaptionLabel = new nextapp.echo2.app.Label();\n// UP_DATE_CaptionLabel.setText(\"N_GET_DATA.UP_DATE\");\n// rootLayout.add(UP_DATE_CaptionLabel);\n// UP_DATE_DscDateField1 = new dsc.echo2app.component.DscDateField();\n// UP_DATE_DscDateField1.setId(\"UP_DATE_DscDateField1\");\n// rootLayout.add(UP_DATE_DscDateField1);\n// UP_USER_CaptionLabel = new nextapp.echo2.app.Label();\n// UP_USER_CaptionLabel.setText(\"N_GET_DATA.UP_USER\");\n// rootLayout.add(UP_USER_CaptionLabel);\n// UP_USER_DscField22 = new dsc.echo2app.component.DscField();\n// UP_USER_DscField22.setId(\"UP_USER_DscField22\");\n// rootLayout.add(UP_USER_DscField22);\n dailyContent = new DataDailyBrowserContent();\n splitPane.add(dailyContent);\n\t}", "public PaneOrganizer() {\n\t\t_root = new BorderPane(); // new border pane\n\t\t\n\t\tLabel score = new Label(\"Score: 0\"); // score label\n\t\tscore.setTextFill(Color.WHITE); // text color\n\t\t\n\t\tLabel lives = new Label(\"Lives: 3\"); // lives label\n\t\tlives.setTextFill(Color.WHITE); // text color\n\t\t\n\t\tGame game = new Game(score, lives); // game pane\n\t\tHBox hbox = new HBox(); // hbox to organize the quit button\n\n\t\tButton quit = new Button(\"Quit\"); // Creating quit button\n\t\tquit.setOnAction(new QuitHandler()); // add the quit handler\n\t\tquit.minHeight(Constants.QUIT_HEIGHT); // sizing\n\n\t\thbox.getChildren().addAll(quit, score, lives); // add components to hbox\n\t\thbox.setSpacing(20);\n\t\t\n\t\t_root.setCenter(game); // set the game pane\n\t\t_root.setBottom(hbox); // set the hbox\n\t\t_root.setStyle(\"-fx-background-color: black\");\n\t}", "private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }", "@Override\n public void initialize() {\n sectionsPanel.removeAll();\n \n section1 = new ProgressReportSectionSettingPanel(this);\n section2 = new ProgressReportSectionSettingPanel(this);\n section3 = new ProgressReportSectionSettingPanel(this);\n section4 = new ProgressReportSectionSettingPanel(this);\n addSectionElement(0,section1);\n addSectionElement(1,section2);\n addSectionElement(2,section3);\n addSectionElement(3,section4);\n \n refresh();\n }", "public AbstractREPLPanel() {\r\n\t\tsuper(new BorderLayout());\r\n\r\n\t\tloadArea();\r\n\t\tstyles = StyleSettings.getInstance(area);\r\n\t}", "private void initializeTreePane() {\n Rectangle clipRect = new Rectangle(treePane.getWidth(), treePane.getHeight());\n clipRect.heightProperty().bind(treePane.heightProperty());\n clipRect.widthProperty().bind(treePane.widthProperty());\n treePane.setClip(clipRect);\n }", "private void initialize() {\r\n this.setSize(new Dimension(666, 723));\r\n this.setContentPane(getJPanel());\r\n\t\t\t\r\n\t}", "private void configureScene() {\n uiController.setTitle(resources.getString(\"Launch\"));\n BorderPane sp = new BorderPane();\n this.fileLoadButton = new Button();\n sp.setCenter(fileLoadButton);\n sp.setTop(createSettings());\n fileLoadButton.setText(resources.getString(\"LoadSimulationXML\"));\n fileLoadButton.setOnAction(event -> uiController.loadNewSimulation());\n sp.setPrefWidth(width);\n sp.setPrefHeight(height);\n renderNode(sp);\n }", "public void init() {\n setLayout(new BorderLayout());\n }", "private void createUI() {\n\t\tthis.rootPane = new TetrisRootPane(true);\n\t\tthis.controller = new TetrisController(this, rootPane, getWorkingDirectory());\n\t\tthis.listener = new TetrisActionListener(controller, this, rootPane);\n\t\t\n\t\trootPane.setActionListener(listener);\n\t\trootPane.setGameComponents(controller.getGameComponent(), controller.getPreviewComponent());\n\t\trootPane.initialize();\n\t\t\n\t\tPanelBorder border = controller.getPlayer().getPanel().getPanelBorder(\"Tetris v\" + controller.getVersion());\n\t\tborder.setRoundedCorners(true);\n\t\tJPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));\n\t\tpanel.setBackground(getBackgroundColor(border.getLineColor()));\n\t\tpanel.setBorder(border);\n\t\tpanel.setPreferredSize(new Dimension(564, 551));\n\t\tpanel.add(rootPane);\n\t\trootPane.addPanelBorder(border, panel);\n\t\t\n\t\tthis.setContentPane(panel);\n\t\tthis.setSize(564, 550);\n\t\t\n\t\tcontroller.initializeUI();\n\t}", "private void initialize() {\r\n\t\tthis.setSize(392, 496);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"Informações\");\r\n\t}", "private void init() {\n this.currentStatus = false;\n\n // Instantiate both the left & the right panels.\n leftPanel = new LeftListPanel();\n rightPanel = new RightListPanel();\n // Initialize the splitPane with left & right panels.\n splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPanel, rightPanel);\n\n }", "private void initComponents() {\n\n scenePanel = new javax.swing.JPanel();\n\n setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.PAGE_AXIS));\n\n scenePanel.setLayout(new javax.swing.BoxLayout(scenePanel, javax.swing.BoxLayout.LINE_AXIS));\n add(scenePanel);\n }", "public void initialize(){\n\n //load Settings\n settings = new Settings(settingsFile);\n if (settings.isExcludeCupboard()){\n cupboardCheckBox.setSelected(true);\n }\n\n //The first pane to see when the program starts is the meals Browse pane\n mealsBtnClicked();\n\n //set up focus and out of focus styling for all the Panes\n styleIngredientBrowsePane();\n styleIngredientAddPane();\n styleMealAddPane();\n styleMealBrowsePane();\n stylePlanShoppingListPane();\n stylePlanWeeklyPlanner();\n stylePlanCupboard();\n\n //setup the Ingredients Browse Pane\n setupBrowseIngredientsPane();\n\n //setup up the main menu hoover button effects\n setupHoverMainMenuButtons();\n\n //setup the meal Add Pane\n MealAddPaneSetUp();\n\n //setup the meal Browse Pane\n mealBrowsePaneSetup();\n\n //setup up the meal planner weekly pane\n weeklyPlannerSetup();\n\n //setup the planner shopping list pane\n plannerShoppingListSetup();\n\n //setup the planner cupboard pane\n plannerCupboardSetup();\n\n //Load the meals from the database\n loadMeals();\n\n //set up the focus styling for the minimise and exit buttons\n setupWindowButtons();\n\n //when the program loads, load the shopping list and meal planner from previous usage\n loadShoppingList();\n loadMealPlanner();\n\n //Set up the information boxes instance for ingredient pane, meal pane and planner pane\n plannerBox = new InformationBox(PlannerPlanPane, plannerColor, plannerColorDark,\n \"images/icons8_planner_96px_Black.png\");\n mealBox = new InformationBox(MealsBrowsePane, mealColor, mealColorDark,\n \"images/icons8_cutlery_96px_Black.png\");\n ingredientBox = new InformationBox(IngredientsBrowsePane, ingredientColor, ingredientColorDark,\n \"images/icons8_apple_96px_Black.png\");\n\n }", "private void initializeLayout(Stage primaryStage) throws IOException {\r\n baseLayout = FXMLLoader.load(getClass().getResource(\"/presentation/view/RootLayout.fxml\"));\r\n Scene scene = new Scene(baseLayout);\r\n primaryStage.setScene(scene);\r\n primaryStage.setResizable(true);\r\n primaryStage.show();\r\n }", "public void initView() {\n JPanel pane= new JPanel();\n panel = new JPanel();\n this.getFile(pane);\n JScrollPane scp = new JScrollPane(pane);\n scp.setPreferredSize(new Dimension(500, 280));\n scp.setVisible(true);\n enter.setPreferredSize(new Dimension(100, 50));\n enter.setVisible(true);\n enter.setActionCommand(\"enter\");\n enter.addActionListener(this);\n send.setPreferredSize(new Dimension(80, 50));\n send.setVisible(true);\n send.setActionCommand(\"sendOptions\");\n send.addActionListener(this);\n send.setEnabled(true);\n back.setVisible(true);\n back.setActionCommand(\"back\");\n back.addActionListener(this);\n back.setPreferredSize(new Dimension(80, 50));\n \n panel.add(scp);\n panel.add(send);\n panel.add(enter);\n panel.add(back);\n Launch.frame.add(panel);\n }", "private WaitTitledPane() {\n\n }", "private void initialize()\n\t{\n\t\tthis.setModal(true);\t\t\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(450,400);\n\t\tScreenResolution.centerComponent(this);\n\t}", "private void init() {\r\n\r\n createGUI();\r\n\r\n setSize(new Dimension(600, 600));\r\n setTitle(\"Grid - Regular Grid Renderer\");\r\n }", "private void initComponents() {\n\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jToggleButton1 = new javax.swing.JToggleButton();\n jPanel4 = new javax.swing.JPanel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jProgressBar1 = new javax.swing.JProgressBar();\n jEditorPane1 = new javax.swing.JEditorPane();\n\n setLayout(new java.awt.BorderLayout());\n\n jPanel2.setLayout(new java.awt.BorderLayout());\n\n jPanel3.setLayout(new java.awt.GridLayout(4, 0, 0, 8));\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel1.text\")); // NOI18N\n jLabel1.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jPanel3.add(jLabel1);\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel3.text\")); // NOI18N\n jLabel3.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jPanel3.add(jLabel3);\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel4.text\")); // NOI18N\n jLabel4.setToolTipText(org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel4.toolTipText\")); // NOI18N\n jLabel4.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jPanel3.add(jLabel4);\n\n org.openide.awt.Mnemonics.setLocalizedText(jToggleButton1, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jToggleButton1.text\")); // NOI18N\n jToggleButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jToggleButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButton1ActionPerformed(evt);\n }\n });\n jPanel3.add(jToggleButton1);\n\n jPanel2.add(jPanel3, java.awt.BorderLayout.WEST);\n\n jPanel4.setLayout(new java.awt.GridLayout(4, 0, 0, 8));\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel8, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel8.text\")); // NOI18N\n jLabel8.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jPanel4.add(jLabel8);\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel9, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel9.text\")); // NOI18N\n jLabel9.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jPanel4.add(jLabel9);\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel10, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel10.text\")); // NOI18N\n jLabel10.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jPanel4.add(jLabel10);\n\n jProgressBar1.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jProgressBar1.setStringPainted(true);\n jPanel4.add(jProgressBar1);\n\n jPanel2.add(jPanel4, java.awt.BorderLayout.CENTER);\n\n add(jPanel2, java.awt.BorderLayout.PAGE_START);\n\n jEditorPane1.setBackground(jPanel2.getBackground());\n jEditorPane1.setBorder(javax.swing.BorderFactory.createEmptyBorder(8, 12, 8, 12));\n jEditorPane1.setEditable(false);\n jEditorPane1.setMaximumSize(new java.awt.Dimension(200, 200));\n add(jEditorPane1, java.awt.BorderLayout.CENTER);\n }", "public Scene Window(){\n Area.setPrefHeight(177);\n Area.setPrefWidth(650);\n Area.setOpacity(0.5);\n Area.setEditable(false);\n Area.setText(\"\\n\\nThe application is used for PV(photovoltaics) sizing to power a RO(Reverse osmosis) desalination unit\" +\n \"\\nThe system depends on batteries to store energy.\" +\n \"\\n\\nTo use this application without problems, you must have the following information\\n\" +\n \"\\t*The location of the desalination unit;\\n\" +\n \"\\t*Amount of power required to operate the unit in kilowatts;\\n\" +\n \"\\t*Time of operating for RO;\\n\" +\n \"\\t*Detailed specification information of the pv modules;\\n\" +\n \"\\t*The number of people the Ro unit will provide water for,and the average water consumption for regular person\");\n\n boxPane.setPrefHeight(44);\n boxPane.setPrefWidth(650);\n\n //Go user map selection interface\n nextWindow.setPrefHeight(30);\n nextWindow.setPrefWidth(300);\n nextWindow.setMnemonicParsing(false);\n nextWindow.setText(\"NEXT\");\n\n\n //HBox.setMargin(nextWindow, new Insets(5,0,5,0));\n // boxPane.getChildren().addAll(nextWindow);\n boxPane.setAlignment(Pos.CENTER);\n\n //Load text area and button to the container\n rootPane.setCenter(Area);\n rootPane.setBottom(boxPane);\n\n scene = new Scene(rootPane,640,300);\n return scene;\n }", "private void initialize() {\n\t\troot = new Group();\n\t\tgetProperties();\n\t\tsetScene();\n\t\tsetStage();\n\t\tsetGUIComponents();\n\t}", "private void initStage() {\n stage = new Stage();\n stage.setTitle(\"Attentions\");\n stage.setScene(new Scene(root));\n stage.sizeToScene();\n }", "private void initLayoutComponents()\n {\n viewPaneWrapper = new JPanel(new CardLayout());\n viewPane = new JTabbedPane();\n crawlPane = new JPanel(new BorderLayout());\n transitionPane = new JPanel();\n searchPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n resultsPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n }", "public void initRootLayout() {\n try {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApplication.class.getResource(\"view/RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load();\n Scene scene = new Scene(rootLayout);\n primaryStage.setScene(scene);\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n \t}\n }", "public PInputPane() {\r\n initComponents();\r\n }", "public ToolsPaletteWindow()\n {\n super( TOOLS, false, false );\n setContentPane( this.content );\n createUI();\n }", "public void initRootLayout() {\r\n FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_MAIN));\r\n\r\n try {\r\n rootLayout = loader.load();\r\n } catch (IOException ex) {\r\n logger.warn(\"Failed to load: \" + FXML_MAIN, ex);\r\n\r\n return;\r\n }\r\n\r\n Scene scene = new Scene(rootLayout);\r\n scene.getStylesheets().add(STYLESHEET_DEFAULT);\r\n\r\n mainStage.setScene(scene);\r\n mainStage.setTitle(\"Business eValuator\");\r\n mainStage.setResizable(true);\r\n mainStage.centerOnScreen();\r\n mainStage.setHeight(900);\r\n mainStage.show();\r\n }", "public HangingFlowPane() {\n super();\n }", "private void initialize() {\n this.setSize(300, 200);\n this.setContentPane(getJContentPane());\n this.pack();\n }", "private void initialize() {\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\tthis.setBounds(new Rectangle(0, 0, 393, 177));\r\n\t\tthis.add(getBasePanel(), BorderLayout.CENTER);\r\n\r\n\t}", "private void initTabs() {\n\t\tJPanel newTab = new JPanel();\r\n\t\taddTab(\"\", newTab); //$NON-NLS-1$\r\n\t\tsetTabComponentAt(0, new NewPaneButton());\r\n\t\tsetEnabledAt(0, false);\r\n\t\t// Add a new pane\r\n\t\taddPane();\r\n }", "private void $$$setupUI$$$() {\n panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootTabControl = new JTabbedPane();\n panel1.add(rootTabControl, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n }", "@FXML protected void initialize() {\n\t\tinitConfigVar();\n\t\tapplyStyle();\n\t}", "public IPPane() {\n\t\tsuper(new BorderLayout());\n\t\tfont = new Font(\"Monospaced\", Font.PLAIN, 12);\n\t\theader = new Header();\n\t\tthis.add(header,BorderLayout.NORTH);\n\t\tscroller = new JScrollPane();\n\t\teditor = new ScrollableEditorPane(\"text/plain\",\"\");\n\t\tscroller.setViewportView(editor);\n\t\tthis.add(scroller,BorderLayout.CENTER);\n\t\teditor.setFont(font);\n\t}", "@Override\n public final void init() {\n super.init();\n UIUtils.clearAllFields(upperPane);\n changeStatus(Status.NONE);\n intCombo();\n }", "private void initialize() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setSize(300, 200);\n\t\tthis.add(getJScrollPane(), java.awt.BorderLayout.CENTER);\n\t}", "public SplitPaneTest2() {\n initComponents();\n\n horizontalSplitPane.putClientProperty(\"Quaqua.SplitPane.style\", \"bar\");\n horizontalSplitPane.setDividerSize(1);\n verticalSplitPane.putClientProperty(\"Quaqua.SplitPane.style\", \"bar\");\n\n messageScrollPane.setBorder(new EmptyBorder(0, 0, 0, 0));\n messagesScrollPane.setBorder(new EmptyBorder(0, 0, 0, 0));\n foldersScrollPane.setBorder(new EmptyBorder(0, 0, 0, 0));\n /*\n horizontalSplitPane.setContinuousLayout(true);\n verticalSplitPane.setContinuousLayout(true);\n */\n\n }", "public void pridajPane() {\n\t\tmojPane.setAlignment(Pos.CENTER);\n\n\t\tmojPane.getChildren().addAll(informacia, vyberPredmetov, tabulkaZiak);\n\t}", "private void init() {\n setLayout(new BorderLayout());\n setBackground(ProgramPresets.COLOR_BACKGROUND);\n add(getTitlePanel(), BorderLayout.NORTH);\n add(getTextPanel(), BorderLayout.CENTER);\n add(getLinkPanel(), BorderLayout.SOUTH);\n }", "private void initialize() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setSize(300,200);\n\t\tthis.add(getJPanel(), java.awt.BorderLayout.CENTER);\n\t\tthis.add(getJPanel1(), java.awt.BorderLayout.SOUTH);\n\t}", "public Mainwindow(){\n \n try \n {\n //LookAndFeel asd = new SyntheticaAluOxideLookAndFeel();\n //UIManager.setLookAndFeel(asd);\n } \n catch (Exception e) \n {\n e.printStackTrace();\n }\n initComponents();\n \n \n userinitComponents();\n \n \n }", "private void initialize()\n\t{\n\t\t_frame = new JFrame();\n\t\t_frame.setTitle(\"Super Awesome Fighter GUI\");\n\t\t_frame.setBounds(100, 100, 624, 461);\n\t\t_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t_frame.getContentPane().setBounds(100, 100, 100, 100);\n\t\t_frame.getContentPane().setLayout(new BorderLayout(0, 0));\n\t\t_frame.setMinimumSize(new Dimension(400, 200));\n\t\t\n\t\tJPanel bottom = new JPanel();\n\t\t_frame.getContentPane().add(bottom, BorderLayout.SOUTH);\n\t\t\n\t\tDimension minimumSize = new Dimension(100, 50);\n\t\t\n\t\tJPanel top = new JPanel();\n\t\t_frame.getContentPane().add(top, BorderLayout.NORTH);\n\n\t\tJTree tree = new JTree();\n\t\ttree.setModel(new DefaultTreeModel(\n\t\t\tnew DefaultMutableTreeNode(\"SAF 0.0.1\") {\n\t\t\t\t{\n\t\t\t\t\tadd(new DefaultMutableTreeNode(\"D. Blommesteijn\"));\n\t\t\t\t\tadd(new DefaultMutableTreeNode(\"UvA id: 10276726\"));\n\t\t\t\t}\n\t\t\t}\n\t\t));\n\t\ttree.setBackground(new Color(250,250,250));\n\t\ttree.setRootVisible(false);\n\t\ttree.setShowsRootHandles(true);\n\t\ttree.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\ttree.setAlignmentY(Component.TOP_ALIGNMENT);\n\t\ttree.setMinimumSize(minimumSize);\n\t\ttree.repaint();\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane(tree);\n\t\tscrollPane.setBorder(null);\n\t\tscrollPane.setMinimumSize(minimumSize);\n\t\tscrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n\t\t\n\t\tJPanel contentScrollPane = new JPanel();\n\t\tcontentScrollPane.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));\n\t\tcontentScrollPane.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\tcontentScrollPane.setBackground(Color.WHITE);\n\t\tcontentScrollPane.setMinimumSize(minimumSize);\n\t\tcontentScrollPane.setLayout(new BorderLayout(0, 0));\n\t\t\t\t\n\t\t\n\t\t_outputPaneLeft = new JTextPane();\n\t\t_outputPaneLeft.setFont(new Font(\"Courier\", Font.PLAIN, 13));\n\t\t_outputPaneLeft.setText(\"center\");\n\t\t_outputPaneLeft.setEditable(false);\n\t\tcontentScrollPane.add(_outputPaneLeft, BorderLayout.WEST);\n\t\t\n\t\t\n\t\tJSplitPane center = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scrollPane, contentScrollPane);\n\t\t\n\t\t_score = new JTextField();\n\t\t_score.setFont(new Font(\"Courier\", Font.PLAIN, 13));\n\t\tcontentScrollPane.add(_score, BorderLayout.NORTH);\n\t\t_score.setColumns(10);\n\t\t\n\t\t_action = new JTextField();\n\t\t_action.setFont(new Font(\"Courier\", Font.PLAIN, 10));\n\t\t_action.setColumns(10);\n\t\tcontentScrollPane.add(_action, BorderLayout.SOUTH);\n\t\t\n\t\t_outputPaneRight = new JTextPane();\n\t\t_outputPaneRight.setText(\"center\");\n\t\t_outputPaneRight.setFont(new Font(\"Courier\", Font.PLAIN, 13));\n\t\t_outputPaneRight.setEditable(false);\n\t\tcontentScrollPane.add(_outputPaneRight, BorderLayout.EAST);\n\t\tcenter.setBackground(new Color(250,250,250));\n\t\tcenter.setForeground(Color.LIGHT_GRAY);\n\t\tcenter.setContinuousLayout(true);\n\t\tcenter.setDividerLocation(200);\n\t\tcenter.scrollRectToVisible(new Rectangle(10,10));\n\t\t\n\t\t\n\t\t_frame.getContentPane().add(center, BorderLayout.CENTER);\n\t\t\n\t\t\n\t\t\n\t}", "private void initUI(BorderPane mainPane) {\n //Top message\n Label topMessage = new Label(\"Personal Loan Calculator\");\n topMessage.setFont(Font.font(\"Arial\", FontWeight.NORMAL, FontPosture.REGULAR, 30));\n\n //Top HBox\n HBox topLayout = new HBox(10);\n topLayout.getChildren().add(topMessage);\n topLayout.setStyle(\"-fx-background-color: #d2d2a6\");\n topLayout.setAlignment(Pos.CENTER);\n topLayout.setMinHeight(100);\n\n //Defining text for instructions\n Text loanAmountText = new Text(\"Loan amount\");\n loanAmountText.setFont(Font.font(\"Arial\", FontWeight.NORMAL, FontPosture.REGULAR, 25));\n\n Text loanTermText = new Text(\"Loan term\");\n loanTermText.setFont(Font.font(\"Arial\", FontWeight.NORMAL, FontPosture.REGULAR, 25));\n\n Text interestRateText = new Text(\"Interest rate\");\n interestRateText.setFont(Font.font(\"Arial\", FontWeight.NORMAL, FontPosture.REGULAR, 25));\n\n Text loanTypeText = new Text(\"Loan type\");\n loanTypeText.setFont(Font.font(\"Arial\", FontWeight.NORMAL, FontPosture.REGULAR, 25));\n\n //Left text VBox\n VBox textOptions = new VBox(60);\n textOptions.getChildren().addAll(loanAmountText, loanTermText, interestRateText, loanTypeText);\n textOptions.setStyle(\"-fx-background-color: BEIGE;\");\n textOptions.setPadding(new Insets(60,30,30,50));\n textOptions.setAlignment(Pos.BASELINE_RIGHT);\n\n mainPane.setStyle(\"-fx-background-color: BEIGE\");\n mainPane.setTop(topLayout);\n mainPane.setLeft(textOptions);\n\n }", "public PhotoOrganizer() {\n\t\t\n\n\t\t// set up the panel on the left with two subpanels in a vertical layout\n\t\tJPanel catalogPanel = new JPanel();\n\t\tcatalogPanel.setLayout(new BoxLayout(catalogPanel,\n\t\t\t\tBoxLayout.PAGE_AXIS));\n\t\t\n\t\t// make the row of buttons \n\t\tJPanel buttonPanel = makeButtonPanel();\n\t\tcatalogPanel.add(buttonPanel);\n\t\t\n\t\t// make the album tree\n\t\t\n\t\talbumTree = makeCatalogTree();\n\t\talbumTree.setEditable(true);\n\t\tcatalogPanel.add(new JScrollPane(albumTree));\n\t\t\n\t\t// make the image previewer\n\t\tpreviewPane = new PreviewPane();\n\n\t\t// put the catalog tree and image previewer side by side, \n\t\t// with an adjustable splitter between\n\t\tJSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,\n\t\t\t\tcatalogPanel, previewPane);\n\t\tsplitPane.setDividerLocation(1200);\n\t\tthis.add(splitPane);\n\t\t\n\t\t/*SlideShowWindow slideShowWindow = new SlideShowWindow();\n\t\tslideShowWindow.setVisible(true); */\n\t\t\n\t\t// give the whole window a good default size\n\t\tthis.setTitle(\"Photo Organizer\");\n this.setSize(1600,600);\n \n \n \n this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n this.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent event) {\n \tif(POamount==1){\n \t\t\n \t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n \t\tSystem.exit(0);\n \t}\n \telse{\n \t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\n \t\tpoc.closingWindow(po);\n \t}\n \n }\n });\n\n // end the program when the user presses the window's Close button\n\t\t\n\t\t\n\t\t\n\t\taddSearchAlbums();\n\t\tallAlbumsList= allCurrentAlbums();\n\t\t\n\t\tpreviewPane.display(root);\n\t\t\n\t\tpoc = new PhotoOrganizerController(this);\n\t\t\n\t\t\n\t\n\t\t\n\t\t\n\t}", "private void $$$setupUI$$$()\n {\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(6, 1, new Insets(20, 20, 20, 20), -1, -1));\n panel.setAutoscrolls(true);\n buttonSettings = new JButton();\n buttonSettings.setEnabled(true);\n buttonSettings.setText(\"Open Application Settings\");\n panel.add(buttonSettings,\n new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonStartGit = new JButton();\n buttonStartGit.setEnabled(true);\n buttonStartGit.setText(\"Start Git Management\");\n panel.add(buttonStartGit,\n new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n null, new Dimension(500, 500), null, 0, false));\n textPaneConsole = new JTextPane();\n textPaneConsole.setEditable(false);\n scrollPane1.setViewportView(textPaneConsole);\n buttonOpenBenchmarkDialog = new JButton();\n buttonOpenBenchmarkDialog.setText(\"Open YCSB Benchmark Dialog\");\n panel.add(buttonOpenBenchmarkDialog,\n new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonShowGitSettings = new JButton();\n buttonShowGitSettings.setEnabled(true);\n buttonShowGitSettings.setText(\"Open Git Management\");\n panel.add(buttonShowGitSettings,\n new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Console Output\");\n panel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,\n null, null, 0, false));\n }", "@Override\n public void initStyle() {\n\t// NOTE THAT EACH CLASS SHOULD CORRESPOND TO\n\t// A STYLE CLASS SPECIFIED IN THIS APPLICATION'S\n\t// CSS FILE\n \n // FOR CHANGING THE ITEMS INSIDE THE EDIT TOOLBAR\n editToolbarPane.getStyleClass().add(CLASS_EDITTOOLBAR_PANE);\n \n mapNameLabel.getStyleClass().add(CLASS_MAPNAME_LABEL);\n mapName.getStyleClass().add(CLASS_MAPNAME_TEXTFIELD);\n backgroundColorLabel.getStyleClass().add(CLASS_LABEL);\n borderColorLabel.getStyleClass().add(CLASS_LABEL);\n borderThicknessLabel.getStyleClass().add(CLASS_LABEL);\n zoomLabel.getStyleClass().add(CLASS_MAPNAME_LABEL);\n borderThicknessSlider.getStyleClass().add(CLASS_BORDER_SLIDER);\n mapZoomingSlider.getStyleClass().add(CLASS_ZOOM_SLIDER);\n buttonBox.getStyleClass().add(CLASS_PADDING);\n // FIRST THE WORKSPACE PANE\n workspace.getStyleClass().add(CLASS_BORDERED_PANE);\n }", "private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setTitle(\"Error\");\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}", "public Test1UI() {\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setLayout(new BorderLayout());\n\t\tsetDefaultValues();\n\t\taddActionListeners();\n\n\t\tthis.add(pnlWest, BorderLayout.WEST);\n\t\tthis.add(pnlEast, BorderLayout.EAST);\n\t\tthis.add(pnlCenter, BorderLayout.CENTER);\n\t\tthis.add(pnlSouth, BorderLayout.SOUTH);\n\n\t\tfor (int row = 0; row < 7; row++) {\n\t\t\tpnlWest.add(tfWest[row]);\n\t\t\tpnlSouth.add(tfSouth[row]);\n\t\t\tfor (int col = 0; col < 7; col++) {\n\t\t\t\tpnlCenter.add(lblCenter[row][col]);\n\t\t\t}\n\t\t}\n\t\tpnlEast.add(pnlEastTop, BorderLayout.NORTH);\n\t\tpnlEast.add(pnlEastBottom, BorderLayout.SOUTH);\n\n\t\tpnlEastTop.add(pnlEastTopText);\n\t\tpnlEastTop.add(btnReadRow);\n\t\tpnlEastTop.add(btnPrintRow);\n\t\tpnlEastTopText.add(lblRow);\n\t\tpnlEastTopText.add(tfRow);\n\n\t\tpnlEastBottom.add(pnlEastBottomText);\n\t\tpnlEastBottom.add(btnReadCol);\n\t\tpnlEastBottom.add(btnPrintCol);\n\t\tpnlEastBottomText.add(lblCol);\n\t\tpnlEastBottomText.add(tfCol);\n\n\t\tpack();\n\t\tsetVisible(true);\n\t}", "@FXML\n\tprivate void initialize() {\n\n\t\thelp.setOnAction(new EventHandler<ActionEvent>() {\n\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlogger.info(\"click rootstage's help button\");\n\t\t\t\tshowRootDocumentScreen(ID_HELP);\n\t\t\t}\n\t\t});\n\t\tcomparator.setOnAction(new EventHandler<ActionEvent>() {\n\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlogger.info(\"click rootstage's comparator button\");\n\t\t\t\tshowRootDocumentScreen(ID_COMPARATOR);\n\t\t\t}\n\t\t});\n\t\tsetting.setOnAction(new EventHandler<ActionEvent>() {\n\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlogger.info(\"click rootstage's setting button\");\n\t\t\t\tshowRootDocumentScreen(ID_SETTING);\n\t\t\t}\n\t\t});\n\t\tsubmitButton.setOnAction(new EventHandler<ActionEvent>() {\n\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlogger.info(\"click rootstage's submit button\");\n\n\t\t\t\tScreensContainer container = new ScreensContainer();\n\t\t\t\tcontainer.registerScreen(ID_SHOWPROBLEM, file_showproblem);\n\t\t\t\tcontainer.registerScreen(ID_SUBMITCODE, file_submitcode);\n\n\t\t\t\tStage dialogStage = new Stage();\n\t\t\t\tdialogStage.setTitle(\"在线提交\");\n\t\t\t\tdialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\t\tdialogStage.initOwner(rootLayout.getScene().getWindow());\n\n\t\t\t\tScene scene = new Scene(container);\n\t\t\t\tdialogStage.setScene(scene);\n\t\t\t\tcontainer.setScreen(ID_SHOWPROBLEM);\n\n\t\t\t\tdialogStage.showAndWait();\n\n\t\t\t}\n\t\t});\n\t\ttabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.SELECTED_TAB);\n\t}", "private void initialize() {\n this.setSize(495, 276);\n this.setTitle(\"Translate Frost\");\n this.setContentPane(getJContentPane());\n }", "private void initialize() {\n layout = new HorizontalLayout();\n\n workspaceTabs = new TabSheet();\n\n WorkspacePanel panel = new WorkspacePanel(\"Workspace 1\");\n workspaceTabs.addTab(panel).setCaption(\"Workspace 1\");\n DropHandler dropHandler = searchMenu.createDropHandler(panel.getBaseLayout());\n panel.setDropHandler(dropHandler);\n\n layout.addComponent(workspaceTabs);\n\n setContent(layout);\n }", "public void initBaseProductionSpace(){\n this.baseProductionPanel = new BaseProductionPanel(gui);\n\n this.add(baseProductionPanel);\n }", "private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}", "private void initComponents() {\n\t\tfiltersPanel = new FiltersPanel(mainView);\n\t\tdetailsPanel = new DetailsPanel();\n\t\t\n\t\tthis.setStylePrimaryName(\"variantdisplay\");\n\t\tthis.addWest(filtersPanel, 240);\n\n\t\tvarTable = new VarTable(this, colModel);\n\n\t\t\n\t\t//details panel listens to variant selection events generated by the varTable\n\t\tvarTable.addVariantSelectionListener(detailsPanel); \n\t\tvarManager.addListener(this);\n\t\tcolModel.addListener(this);\n\t\tfiltersPanel.addListener(this);\n\t\t\n\t\tthis.addSouth(detailsPanel, 300.0);\n\t\tthis.add(varTable);\n\t}", "private void initComponents() {\n jSplitPane1 = new javax.swing.JSplitPane();\n pnlTree = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jtrLocal = new DnDTree();\n pnlTab = new javax.swing.JPanel();\n jtpApps = new javax.swing.JTabbedPane();\n\n jSplitPane1.setDividerLocation(260);\n\n pnlTree.setBorder(javax.swing.BorderFactory.createTitledBorder(\n NbBundle.getMessage(\n EditDistributionVisualPanel2.class,\n \"EditDistributionVisualPanel2.pnlTree.border.title\"))); // NOI18N\n\n jtrLocal.setDragEnabled(true);\n jScrollPane1.setViewportView(jtrLocal);\n\n final javax.swing.GroupLayout pnlTreeLayout = new javax.swing.GroupLayout(pnlTree);\n pnlTree.setLayout(pnlTreeLayout);\n pnlTreeLayout.setHorizontalGroup(\n pnlTreeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(\n jScrollPane1,\n javax.swing.GroupLayout.DEFAULT_SIZE,\n 246,\n Short.MAX_VALUE));\n pnlTreeLayout.setVerticalGroup(\n pnlTreeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(\n jScrollPane1,\n javax.swing.GroupLayout.Alignment.TRAILING,\n javax.swing.GroupLayout.DEFAULT_SIZE,\n 238,\n Short.MAX_VALUE));\n\n jSplitPane1.setLeftComponent(pnlTree);\n\n final javax.swing.GroupLayout pnlTabLayout = new javax.swing.GroupLayout(pnlTab);\n pnlTab.setLayout(pnlTabLayout);\n pnlTabLayout.setHorizontalGroup(\n pnlTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(\n jtpApps,\n javax.swing.GroupLayout.Alignment.TRAILING,\n javax.swing.GroupLayout.DEFAULT_SIZE,\n 200,\n Short.MAX_VALUE));\n pnlTabLayout.setVerticalGroup(\n pnlTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(\n jtpApps,\n javax.swing.GroupLayout.Alignment.TRAILING,\n javax.swing.GroupLayout.DEFAULT_SIZE,\n 266,\n Short.MAX_VALUE));\n\n jSplitPane1.setRightComponent(pnlTab);\n\n final javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(\n jSplitPane1,\n javax.swing.GroupLayout.Alignment.TRAILING,\n javax.swing.GroupLayout.DEFAULT_SIZE,\n 471,\n Short.MAX_VALUE));\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(\n jSplitPane1,\n javax.swing.GroupLayout.Alignment.TRAILING,\n javax.swing.GroupLayout.DEFAULT_SIZE,\n 270,\n Short.MAX_VALUE));\n }", "private void initialize() {\r\n\t\tSpringLayout springLayout = new SpringLayout();\r\n\t\tthis.setLayout(springLayout);\r\n\r\n\t\tcoi = new ContenedorOfertasInterno(gui);\r\n\r\n\t\tscrollPane = new JScrollPane(coi, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,\r\n\t\t\t\tJScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r\n\t\tscrollPane.getVerticalScrollBar().setUI(new ThinSolidScrollBarUi(7));\r\n\t\tscrollPane.getVerticalScrollBar().setUnitIncrement(16);\r\n\t\tscrollPane.setPreferredSize(new Dimension(1006, 563));\r\n\t\tscrollPane.setBackground(Color.BLUE);\r\n\r\n\t\tthis.add(scrollPane);\r\n\t\tthis.setLayer(scrollPane, 1);\r\n\r\n\t}" ]
[ "0.73409396", "0.7058969", "0.67115265", "0.66538435", "0.6611976", "0.65930986", "0.6559149", "0.6515292", "0.65047616", "0.6500536", "0.64972323", "0.6491171", "0.64887536", "0.6456225", "0.6443168", "0.64077455", "0.6407608", "0.63802916", "0.63726616", "0.6368336", "0.6361136", "0.6360396", "0.6351266", "0.63159925", "0.631584", "0.62917125", "0.62823737", "0.6273264", "0.6255892", "0.62558675", "0.6250938", "0.62439317", "0.62393576", "0.62338996", "0.6228028", "0.6218847", "0.6217669", "0.6203134", "0.61997384", "0.6196967", "0.61968553", "0.61814463", "0.6168236", "0.6167769", "0.6160421", "0.61574227", "0.61544126", "0.61478686", "0.6137009", "0.61350244", "0.6132252", "0.61273104", "0.6126424", "0.6102324", "0.60918903", "0.6090143", "0.60890645", "0.608518", "0.6082704", "0.60806984", "0.6080263", "0.60754377", "0.6068782", "0.6066053", "0.60555494", "0.60549724", "0.60539305", "0.604774", "0.604168", "0.6039323", "0.6039238", "0.6033467", "0.60303354", "0.60268563", "0.6026123", "0.6024583", "0.6022061", "0.6015828", "0.60071015", "0.60043067", "0.5996216", "0.5995278", "0.59935397", "0.5978338", "0.597766", "0.5976247", "0.59726113", "0.5968216", "0.5967408", "0.5965328", "0.5960067", "0.59593374", "0.59585506", "0.5954584", "0.5950494", "0.5945829", "0.59451765", "0.594151", "0.5939627", "0.59393436", "0.59368896" ]
0.0
-1
This method initializes mainMenuBar
public org.parosproxy.paros.view.MainMenuBar getMainMenuBar() { if (mainMenuBar == null) { mainMenuBar = new org.parosproxy.paros.view.MainMenuBar(); } return mainMenuBar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initializeMenuBar() {\n\t\tthis.hydraMenu = new HydraMenu(this.commands);\n\t\tthis.setJMenuBar(this.hydraMenu);\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "private void initializeMenuBar()\r\n\t{\r\n\t\tJMenuBar menuBar = new SmsMenuBar(this);\r\n\t\tsetJMenuBar(menuBar);\r\n\t}", "private void initMenubar() {\r\n\t\tsetJMenuBar(new MenuBar(controller));\r\n\t}", "private void initMenuBar() {\r\n\t\t// file menu\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic(KeyEvent.VK_F);\r\n\t\tadd(fileMenu);\r\n\r\n\t\tJMenuItem fileNewMenuItem = new JMenuItem(new NewAction(parent, main));\r\n\t\tfileNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileNewMenuItem);\r\n\t\tJMenuItem fileOpenMenuItem = new JMenuItem(new OpenAction(parent, main));\r\n\t\tfileOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileOpenMenuItem);\r\n\r\n\t\tJMenuItem fileSaveMenuItem = new JMenuItem(new SaveAction(main));\r\n\t\tfileSaveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveMenuItem);\r\n\t\tJMenuItem fileSaveAsMenuItem = new JMenuItem(new SaveAsAction(main));\r\n\t\tfileSaveAsMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveAsMenuItem);\r\n\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.addSeparator();\r\n\r\n\t\tJMenuItem exitMenuItem = new JMenuItem(new ExitAction(main));\r\n\t\texitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(exitMenuItem);\r\n\r\n\t\t// tools menu\r\n\t\tJMenu toolsMenu = new JMenu(\"Application\");\r\n\t\ttoolsMenu.setMnemonic(KeyEvent.VK_A);\r\n\t\tadd(toolsMenu);\r\n\r\n\t\tJMenuItem defineCategoryMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineCategoryAction());\r\n\t\tdefineCategoryMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_C, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineCategoryMenuItem);\r\n\t\tJMenuItem defineBehaviorNetworkMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineBehaviorNetworkAction());\r\n\t\tdefineBehaviorNetworkMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_B, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineBehaviorNetworkMenuItem);\r\n\t\tJMenuItem startSimulationMenuItem = new JMenuItem(\r\n\t\t\t\tnew StartSimulationAction(main));\r\n\t\tstartSimulationMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_E, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(startSimulationMenuItem);\r\n\r\n\t\t// help menu\r\n\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\thelpMenu.setMnemonic(KeyEvent.VK_H);\r\n\t\tadd(helpMenu);\r\n\r\n\t\tJMenuItem helpMenuItem = new JMenuItem(new HelpAction(parent));\r\n\t\thelpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\thelpMenu.add(helpMenuItem);\r\n\r\n\t\t// JCheckBoxMenuItem clock = new JCheckBoxMenuItem(new\r\n\t\t// ScheduleSaveAction(parent));\r\n\t\t// helpMenu.add(clock);\r\n\t\thelpMenu.addSeparator();\r\n\t\tJMenuItem showMemItem = new JMenuItem(new ShowMemAction(parent));\r\n\t\thelpMenu.add(showMemItem);\r\n\r\n\t\tJMenuItem aboutMenuItem = new JMenuItem(new AboutAction(parent));\r\n\t\thelpMenu.add(aboutMenuItem);\r\n\t}", "private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(\"About\");\n \n bar.add(fileMenu);\n bar.add(crawlerMenu);\n bar.add(aboutMenu);\n \n exit = new JMenuItem(\"Exit\");\n preferences = new JMenuItem(\"Preferences\");\n author = new JMenuItem(\"Author\");\n startCrawlerItem = new JMenuItem(\"Start\");\n stopCrawlerItem = new JMenuItem(\"Stop\");\n newIndexItem = new JMenuItem(\"New index\");\n openIndexItem = new JMenuItem(\"Open index\");\n \n stopCrawlerItem.setEnabled(false);\n \n fileMenu.add(newIndexItem);\n fileMenu.add(openIndexItem);\n fileMenu.add(exit);\n aboutMenu.add(author);\n crawlerMenu.add(startCrawlerItem);\n crawlerMenu.add(stopCrawlerItem);\n crawlerMenu.add(preferences);\n \n author.addActionListener(this);\n preferences.addActionListener(this);\n exit.addActionListener(this);\n startCrawlerItem.addActionListener(this);\n stopCrawlerItem.addActionListener(this);\n newIndexItem.addActionListener(this);\n openIndexItem.addActionListener(this);\n \n frame.setJMenuBar(bar);\n }", "private void initMenuBar() {\n\t\t// Menu Bar\n\t\tmenuBar = new JMenuBar();\n\t\tgameMenu = new JMenu(\"Boggle\");\n\t\tgameMenu.setMnemonic('B');\n\t\tmenuBar.add(gameMenu);\n\t\tthis.setJMenuBar(menuBar);\n\t\t\n\t\t// New Game\n\t\tnewGame = new JMenuItem(\"New Game\");\n\t\tnewGame.setMnemonic('N');\n\t\tnewGame.addActionListener(new NewGameListener());\n\t\tgameMenu.add(newGame);\n\t\t\n\t\t// Exit Game\n\t\texitGame = new JMenuItem(\"Exit Game\");\n\t\texitGame.setMnemonic('E');\n\t\texitGame.addActionListener(new ExitListener());\n\t\tgameMenu.add(exitGame);\n\t}", "MenuBar setMenu() {\r\n\t\t// initially set up the file chooser to look for cfg files in current directory\r\n\t\tMenuBar menuBar = new MenuBar(); // create main menu\r\n\r\n\t\tMenu mFile = new Menu(\"File\"); // add File main menu\r\n\t\tMenuItem mExit = new MenuItem(\"Exit\"); // whose sub menu has Exit\r\n\t\tmExit.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\tpublic void handle(ActionEvent t) { // action on exit\r\n\t\t\t\ttimer.stop(); // stop timer\r\n\t\t\t\tSystem.exit(0); // exit program\r\n\t\t\t}\r\n\t\t});\r\n\t\tmFile.getItems().addAll(mExit); // add load, save and exit to File menu\r\n\r\n\t\tMenu mHelp = new Menu(\"Help\"); // create Help menu\r\n\t\tMenuItem mAbout = new MenuItem(\"About\"); // add Welcome sub menu item\r\n\t\tmAbout.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent actionEvent) {\r\n\t\t\t\tshowAbout(); // whose action is to give welcome message\r\n\t\t\t}\r\n\t\t});\r\n\t\tmHelp.getItems().addAll(mAbout); // add Welcome and About to Run main item\r\n\r\n\t\tmenuBar.getMenus().addAll(mFile, mHelp); // set main menu with File, Config, Run, Help\r\n\t\treturn menuBar; // return the menu\r\n\t}", "private void initialize() {\r\n this.setJMenuBar(getMainMenuBar());\r\n this.setContentPane(getPaneContent());\r\n\r\n this.setSize(800, 600);\r\n this.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\r\n this.addWindowListener(new java.awt.event.WindowAdapter() { \r\n\r\n \tpublic void windowClosing(java.awt.event.WindowEvent e) { \r\n\r\n \t\tgetMainMenuBar().getMenuFileControl().exit();\r\n \t}\r\n });\r\n\r\n this.setVisible(false);\r\n\t}", "private void initMenu() {\n \n JMenuBar menuBar = new JMenuBar();\n \n JMenu commands = new JMenu(\"Commands\");\n \n JMenuItem add = new JMenuItem(\"Add\");\n add.addActionListener((ActionEvent e) -> {\n changeState(\"Add\");\n });\n commands.add(add);\n \n JMenuItem search = new JMenuItem(\"Search\");\n search.addActionListener((ActionEvent e) -> {\n changeState(\"Search\");\n });\n commands.add(search);\n \n JMenuItem quit = new JMenuItem(\"Quit\");\n quit.addActionListener((ActionEvent e) -> {\n System.out.println(\"QUITING\");\n System.exit(0);\n });\n commands.add(quit);\n \n menuBar.add(commands);\n \n setJMenuBar(menuBar);\n }", "private void setUpMenuBar() {\r\n\t\t// Create menu bar.\r\n\t\tthis.menuBar = new JMenuBar();\r\n\t\t\r\n\t\t// Create each sub-menu in the menu bar\r\n\t\tthis.setUpMenuBar_FileMenu();\r\n\t\t//this.setUpMenuBar_ZoomMenu();\r\n\t\tthis.setUpMenuBar_CompareMenu();\t\r\n\t\tthis.pictureFrame.setJMenuBar(menuBar);\r\n\t}", "private void createMenuBar(){\n\t\tmenuBar = new JMenuBar();\n\t\t\n\t\t//Create the \"File\" menu\n\t\tthis.createFileMenu();\n\t\tmenuBar.add(fileMenu);\n\t\t\t\t\n\t\t//Create \"debug\" menu[disabled]\n\t\t//createDebugMenu();\t\t\n\t\t\n\t\t//last to be added to the menubar: about\n\t\tabout = new JMenuItem(\"About\");\n\t\tabout.addActionListener(this);\n\t\tmenuBar.add(about);\n\t}", "public static void initMenuBars()\n\t{\n\t\tmenuBar = new JMenuBar();\n\n\t\t//Build the first menu.\n\t\tmenu = new JMenu(\"Options\");\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenu.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(menu);\n\n\t\t//a group of JMenuItems\n\t\tmenuItem = new JMenuItem(\"Quit\",\n\t\t KeyEvent.VK_T);\n\t\tmenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmenuItem.getAccessibleContext().setAccessibleDescription(\n\t\t \"This doesn't really do anything\");\n\t\tmenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(\"Both text and icon\",\n\t\t new ImageIcon(\"images/middle.gif\"));\n\t\tmenuItem.setMnemonic(KeyEvent.VK_B);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(new ImageIcon(\"images/middle.gif\"));\n\t\tmenuItem.setMnemonic(KeyEvent.VK_D);\n\t\tmenu.add(menuItem);\n\n\t\t//a group of radio button menu items\n\t\tmenu.addSeparator();\n\t\tButtonGroup group = new ButtonGroup();\n\t\trbMenuItem = new JRadioButtonMenuItem(\"A radio button menu item\");\n\t\trbMenuItem.setSelected(true);\n\t\trbMenuItem.setMnemonic(KeyEvent.VK_R);\n\t\tgroup.add(rbMenuItem);\n\t\tmenu.add(rbMenuItem);\n\n\t\trbMenuItem = new JRadioButtonMenuItem(\"Another one\");\n\t\trbMenuItem.setMnemonic(KeyEvent.VK_O);\n\t\tgroup.add(rbMenuItem);\n\t\tmenu.add(rbMenuItem);\n\n\t\t//a group of check box menu items\n\t\tmenu.addSeparator();\n\t\tcbMenuItem = new JCheckBoxMenuItem(\"A check box menu item\");\n\t\tcbMenuItem.setMnemonic(KeyEvent.VK_C);\n\t\tmenu.add(cbMenuItem);\n\n\t\tcbMenuItem = new JCheckBoxMenuItem(\"Another one\");\n\t\tcbMenuItem.setMnemonic(KeyEvent.VK_H);\n\t\tmenu.add(cbMenuItem);\n\n\t\t//a submenu\n\t\tmenu.addSeparator();\n\t\tsubmenu = new JMenu(\"A submenu\");\n\t\tsubmenu.setMnemonic(KeyEvent.VK_S);\n\n\t\tmenuItem = new JMenuItem(\"An item in the submenu\");\n\t\tmenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t KeyEvent.VK_2, ActionEvent.ALT_MASK));\n\t\tsubmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(\"Another item\");\n\t\tsubmenu.add(menuItem);\n\t\tmenu.add(submenu);\n\n\t\t//Build second menu in the menu bar.\n\t\tmenu = new JMenu(\"Another Menu\");\n\t\tmenu.setMnemonic(KeyEvent.VK_N);\n\t\tmenu.getAccessibleContext().setAccessibleDescription(\n\t\t \"This menu does nothing\");\n\t\tmenuBar.add(menu);\n\t}", "private MenuManager() {\r\n\r\n\t\t\tmenubar = new Menu(shell, SWT.BAR);\r\n\t\t\tshell.setMenuBar(menubar);\r\n\t\t}", "private void buildMenuBar(){\n //Create the manu bar\n menuBar = new JMenuBar();\n \n //Create the file and run menus\n buildFileMenu();\n buildViewMenu();\n \n //Add the file and run menus to the menu bar\n menuBar.add(fileMenu);\n menuBar.add(viewMenu);\n \n //Set the window's menu bar\n setJMenuBar(menuBar);\n }", "public void initializeMenuBarLocalization() {\n\t\tmenuSettings.setText(bundle.getString(\"mVSettings\"));\n\t\tmenuItemPreferences.setText(bundle.getString(\"mVPreferences\"));\n\t\tuserSettings.setText(bundle.getString(\"mVUsersettings\"));\n\t\tloginoption.setText(bundle.getString(\"mVLogin\"));\n\t\tmenuHelp.setText(bundle.getString(\"mVHelp\"));\n\t\tmenuItemAbout.setText(bundle.getString(\"mVAbout\"));\n\t\tmenuItemUserguide.setText(bundle.getString(\"mVUserguide\"));\n\t\tmenuLanguage.setText(bundle.getString(\"mVLanguage\"));\n\t}", "public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}", "public JMenuBar initBar() {\n\t\treturn null;\n\t}", "private void startMenuBar() no topo\n {\n //Inicializa a barra de menus\n JMenuBar menuBar = new JMenuBar();\n JMenu menuFile = new JMenu(\"File\");\n JMenu menuProgram = new JMenu(\"Program\");\n JMenuItem fileOpen = new JMenuItem(\"Open\");\n fileOpen.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e)\n {\n setFileName();\n }\n });\n menuFile.add(fileOpen);\n \n JMenuItem programClose = new JMenuItem(\"Close\");\n programClose.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e)\n {\n System.exit(0);\n }\n });\n menuProgram.add(programClose);\n \n menuBar.add(menuFile);\n menuBar.add(menuProgram);\n mainFrame.add(menuBar, BorderLayout.PAGE_START);\n }", "private void setupMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t// Build the first menu.\n\t\tJMenu menu = new JMenu(Messages.getString(\"Gui.File\")); //$NON-NLS-1$\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenuBar.add(menu);\n\n\t\t// a group of JMenuItems\n\t\tJMenuItem menuItem = new JMenuItem(openAction);\n\t\tmenu.add(menuItem);\n\n\t\t// menuItem = new JMenuItem(openHttpAction);\n\t\t// menu.add(menuItem);\n\n\t\t/*\n\t\t * menuItem = new JMenuItem(crudAction); menu.add(menuItem);\n\t\t */\n\n\t\tmenuItem = new JMenuItem(showLoggingFrameAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(quitAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuBar.add(menu);\n\n\t\tJMenu optionMenu = new JMenu(Messages.getString(\"Gui.Options\")); //$NON-NLS-1$\n\t\tmenuItem = new JCheckBoxMenuItem(baselineModeAction);\n\t\toptionMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(toggleButtonsAction);\n\t\toptionMenu.add(menuItem);\n\n\t\tmenuBar.add(optionMenu);\n\t\tJMenu buttonMenu = new JMenu(Messages.getString(\"Gui.Buttons\")); //$NON-NLS-1$\n\t\tmenuItem = new JMenuItem(wrongAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(attendingAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(independentAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(verbalAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(modelingAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(noAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuBar.add(buttonMenu);\n\t\tframe.setJMenuBar(menuBar);\n\n\t\tframe.pack();\n\n\t\tframe.setVisible(true);\n\t}", "private void createMenuBar() {\n\t\tmenuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(\"Arquivo\");\n\t\tnewMenuItem = new JMenuItem(\"Novo\");\n\n\t\topenMenuItem = new JMenuItem(\"Abrir arquivo\");\n\t\topenMenuItem.addActionListener(new OpenFileHandler());\n\n\t\tsaveMenuItem = new JMenuItem(\"Salvar arquivo\");\n\t\texportMenuItem = new JMenuItem(\"Exportar\");\n\t\texitMenuItem = new JMenuItem(\"Sair\");\n\n\t\t// fileMenu.add(newMenuItem);\n\t\tfileMenu.add(openMenuItem);\n\t\t// fileMenu.add(saveMenuItem);\n\t\t// fileMenu.add(exportMenuItem);\n\t\t// fileMenu.addSeparator();\n\t\t// fileMenu.add(exitMenuItem);\n\n\t\thelpMenu = new JMenu(\"Ajuda\");\n\t\thelpMenuItem = new JMenuItem(\"Ajuda\");\n\t\taboutMenuItem = new JMenuItem(\"Sobre\");\n\n\t\thelpMenu.add(helpMenuItem);\n\t\thelpMenu.add(aboutMenuItem);\n\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(helpMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}", "private JMenuBar createMenuBar()\r\n {\r\n UIManager.put(\"Menu.selectionBackground\", new Color(0xDA,0xDD,0xED));\r\n UIManager.put(\"MenuItem.selectionForeground\", Color.LIGHT_GRAY);\r\n JMenuBar menuBar = new JMenuBar();\r\n JMenu menu = new JMenu(\"Fil\");\r\n UIManager.put(\"MenuItem.selectionBackground\", menu.getBackground());\r\n menuItemSave = new JMenuItem(\"Lagre\");\r\n UIManager.put(\"MenuItem.selectionBackground\", menuItemSave.getBackground());\r\n menuItemSave.setForeground(Color.LIGHT_GRAY);\r\n menuItemSave.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemSave.setAccelerator(KeyStroke.getKeyStroke('S', Event.CTRL_MASK));\r\n menuItemSave.addActionListener(listener);\r\n menu.add(menuItemSave);\r\n menuItemPrint = new JMenuItem(\"Skriv ut\");\r\n menuItemPrint.setForeground(Color.LIGHT_GRAY);\r\n menuItemPrint.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemPrint.setAccelerator(KeyStroke.getKeyStroke('P', Event.CTRL_MASK));\r\n menuItemPrint.addActionListener(listener);\r\n menu.add(menuItemPrint);\r\n menu.addSeparator();\r\n menuItemLogout = new JMenuItem(\"Logg av\");\r\n menuItemLogout.setForeground(Color.LIGHT_GRAY);\r\n menuItemLogout.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemLogout.addActionListener(listener);\r\n menuItemLogout.setAccelerator(KeyStroke.getKeyStroke('L', Event.CTRL_MASK));\r\n menu.add(menuItemLogout);\r\n UIManager.put(\"MenuItem.selectionBackground\", new Color(0xDA,0xDD,0xED));\r\n UIManager.put(\"MenuItem.selectionForeground\", Color.BLACK);\r\n menuItemClose = new JMenuItem(\"Avslutt\");\r\n menuItemClose.setAccelerator(KeyStroke.getKeyStroke('A', Event.CTRL_MASK));\r\n menuItemClose.addActionListener(listener);\r\n menuBar.add(menu);\r\n menu.add(menuItemClose);\r\n JMenu menu2 = new JMenu(\"Om\");\r\n menuItemAbout = new JMenuItem(\"Om\");\r\n menuItemAbout.setAccelerator(KeyStroke.getKeyStroke('O', Event.CTRL_MASK));\r\n menuItemAbout.addActionListener(listener);\r\n menuItemAbout.setBorder(BorderFactory.createEmptyBorder());\r\n menu2.add(menuItemAbout);\r\n menuBar.add(menu2);\r\n \r\n return menuBar;\r\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 678, 450);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tframe.setJMenuBar(menuBar);\n\t\t\n\t\tmnuAcciones = new JMenu(\"Acciones\");\n\t\tmenuBar.add(mnuAcciones);\n\t\t\n\t\tmnuABMCPersona = new JMenuItem(\"ABMC de Personas\");\n\t\tmnuABMCPersona.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmnuABMCPersonaClick();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(mnuABMCPersona);\n\t\t\n\t\tnuABMCTipoElemento = new JMenuItem(\"ABMC de Tipos de Elemento\");\n\t\tnuABMCTipoElemento.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmnuABMCTipoElementoClick();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuABMCTipoElemento);\n\t\t\n\t\tnuABMCElemento = new JMenuItem(\"ABMC de Elementos\");\n\t\tnuABMCElemento.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tmnuABMCElementoClick();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuABMCElemento);\n\t\t\n\t\tnuAReserva = new JMenuItem(\"Hacer una Reserva\");\n\t\tnuAReserva.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tmnuAReservaClick();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuAReserva);\n\t\t\n\t\tnuCBReserva = new JMenuItem(\"Listado de Reservas\");\n\t\tnuCBReserva.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmnuListadoPersonaClick();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuCBReserva);\n\t\t\n\t\tnuSalir = new JMenuItem(\"Salir\");\n\t\tnuSalir.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsalir();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuSalir);\n\t\tframe.getContentPane().setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tdesktopPane = new JDesktopPane();\n\t\tframe.getContentPane().add(desktopPane, BorderLayout.CENTER);\n\t}", "public void menuSetup(){\r\n menu.add(menuItemSave);\r\n menu.add(menuItemLoad);\r\n menu.add(menuItemRestart);\r\n menuBar.add(menu); \r\n topPanel.add(menuBar);\r\n bottomPanel.add(message);\r\n \r\n this.setLayout(new BorderLayout());\r\n this.add(topPanel, BorderLayout.NORTH);\r\n this.add(middlePanel, BorderLayout.CENTER);\r\n this.add(bottomPanel, BorderLayout.SOUTH);\r\n \r\n }", "private JMenuBar getMbMain() {\n\t\tif (mbMain == null) {\n\t\t\tmbMain = new JMenuBar();\n\t\t\tmbMain.add(getMMain());\n\t\t\tmbMain.add(getMActions());\n\t\t}\n\t\treturn mbMain;\n\t}", "@Override\n\tpublic JMenuBar initBar() {\n\t\treturn null;\n\t}", "private JMenuBar createMenuBar(){\n\n MenuBarHandler menuBarHandler = new MenuBarHandler();\n JMenuBar menuBar = new JMenuBar();\n JMenu application = new JMenu(\"Application\");\n application.setMnemonic(KeyEvent.VK_A);\n JMenu view = new JMenu(\"View\");\n view.setMnemonic(KeyEvent.VK_V);\n JMenu help = new JMenu(\"Help\");\n help.setMnemonic(KeyEvent.VK_H);\n menuBar.add(application);\n menuBar.add(view);\n menuBar.add(help);\n JMenuItem options = new JMenuItem(\"Options\", KeyEvent.VK_O);\n JMenuItem exit = new JMenuItem(\"Exit\", KeyEvent.VK_E);\n application.add(options);\n options.addActionListener(menuBarHandler);\n application.add(exit);\n exit.addActionListener(menuBarHandler);\n JMenuItem toggleFullScreen = new JMenuItem(\"Toggle Full Screen\", KeyEvent.VK_T);\n JMenuItem toggleSideBar = new JMenuItem(\"Toggle Sidebar\", KeyEvent.VK_O);\n view.add(toggleFullScreen);\n toggleFullScreen.addActionListener(menuBarHandler);\n view.add(toggleSideBar);\n toggleSideBar.addActionListener(menuBarHandler);\n JMenuItem about = new JMenuItem(\"About\", KeyEvent.VK_A);\n JMenuItem helpItem = new JMenuItem(\"Help\", KeyEvent.VK_H);\n KeyStroke ctrlS = KeyStroke.getKeyStroke(\"control S\");\n toggleSideBar.setAccelerator(ctrlS);\n help.add(about);\n about.addActionListener(menuBarHandler);\n help.add(helpItem);\n helpItem.addActionListener(menuBarHandler);\n return menuBar;\n }", "private void setUpMenuBar_CompareMenu(){\r\n\t\t// Add the rotate flip menu.\r\n\t\tthis.compareMenu \t\t = new JMenu(\"Compare\");\r\n\t\tthis.compareMenuItem \t\t = new JMenuItem(STR_COMPARE);\r\n\t\t// Add the action listeners for the rotate/flip effects menu.\r\n\t\tthis.compareMenuItem.addActionListener(this);\r\n\t\tthis.compareMenu.add(compareMenuItem);\r\n\t\tthis.menuBar.add(compareMenu);\r\n\r\n\t}", "protected void fillMenuBar(IMenuManager menuBar){\n\t\tIWorkbenchWindow window = getActionBarConfigurer().getWindowConfigurer().getWindow();\n\t\tmenuBar.add(createFileMenu(window));\n\t\tmenuBar.add(createEditMenu());\n\t\tmenuBar.add(ToolsBoxFonctions.createToolBoxMenu(window));\n\t\tmenuBar.add(createHelpMenu(window));\n\t}", "private void makeMenuBar() {\n final int SHORTCUT_MASK =\n Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();\n\n JMenuBar menubar = new JMenuBar();\n setJMenuBar(menubar);\n\n JMenu menu;\n JMenuItem item;\n\n // create the File menu\n menu = new JMenu(\"File\");\n menubar.add(menu);\n\n item = new JMenuItem(\"Quit\");\n item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, SHORTCUT_MASK));\n item.addActionListener(e -> quit());\n menu.add(item);\n\n // create the Help menu\n menu = new JMenu(\"Help\");\n menubar.add(menu);\n\n item = new JMenuItem(\"About TalkBox...\");\n item.addActionListener(e -> showAbout());\n menu.add(item);\n }", "protected void fillMenu(MenuBar menuBar) {\n\t\tMenu fileMenu = new Menu(\"Файл\");\n\t\n\t\tMenuItem loginMenuItem = new MenuItem(\"Сменить пользователя\");\n\t\tloginMenuItem.setOnAction(actionEvent -> main.logout());\n\t\n\t\tMenuItem exitMenuItem = new MenuItem(\"Выход (выключить планшет)\");\n\t\texitMenuItem.setOnAction(actionEvent -> main.requestShutdown());\n\t\texitMenuItem.setAccelerator(KeyCombination.keyCombination(\"Alt+F4\"));\n\t\n\t\n\t\tfileMenu.getItems().addAll( loginMenuItem,\n\t\t\t\tnew SeparatorMenuItem(), exitMenuItem);\n\t\n\t\n\t\n\t\tMenu navMenu = new Menu(\"Навигация\");\n\t\n\t\tMenuItem navHomeMap = new MenuItem(\"На общую карту\");\n\t\t//navHomeMap.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tnavHomeMap.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\tMenu navMaps = new Menu(\"Карты\");\n\t\t//navMaps.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tmain.ml.fillMapsMenu( navMaps, this );\n\t\n\t\tMenuItem navOverview = new MenuItem(\"Обзор\");\n\t\tnavOverview.setOnAction(actionEvent -> setOverviewScale());\n\t\n\t\tnavMenu.getItems().addAll( navHomeMap, navMaps, new SeparatorMenuItem(), navOverview );\n\t\n\t\t\n\t\t\n\t\tMenu dataMenu = new Menu(\"Данные\");\n\t\n\t\tServerUnitType.forEach(t -> {\n\t\t\tMenuItem dataItem = new MenuItem(t.getDisplayName());\n\t\t\tdataItem.setOnAction(actionEvent -> new EntityListWindow(t, main.rc, main.sc));\n\t\n\t\t\tdataMenu.getItems().add(dataItem);\t\t\t\n\t\t});\n\t\t\n\t\t//dataMenu.Menu debugMenu = new Menu(\"Debug\");\n\t\t//MenuItem d1 = new MenuItem(\"На общую карту\");\n\t\t//d1.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\t\n\t\t/*\n\t Menu webMenu = new Menu(\"Web\");\n\t CheckMenuItem htmlMenuItem = new CheckMenuItem(\"HTML\");\n\t htmlMenuItem.setSelected(true);\n\t webMenu.getItems().add(htmlMenuItem);\n\t\n\t CheckMenuItem cssMenuItem = new CheckMenuItem(\"CSS\");\n\t cssMenuItem.setSelected(true);\n\t webMenu.getItems().add(cssMenuItem);\n\t\n\t Menu sqlMenu = new Menu(\"SQL\");\n\t ToggleGroup tGroup = new ToggleGroup();\n\t RadioMenuItem mysqlItem = new RadioMenuItem(\"MySQL\");\n\t mysqlItem.setToggleGroup(tGroup);\n\t\n\t RadioMenuItem oracleItem = new RadioMenuItem(\"Oracle\");\n\t oracleItem.setToggleGroup(tGroup);\n\t oracleItem.setSelected(true);\n\t\n\t sqlMenu.getItems().addAll(mysqlItem, oracleItem,\n\t new SeparatorMenuItem());\n\t\n\t Menu tutorialManeu = new Menu(\"Tutorial\");\n\t tutorialManeu.getItems().addAll(\n\t new CheckMenuItem(\"Java\"),\n\t new CheckMenuItem(\"JavaFX\"),\n\t new CheckMenuItem(\"Swing\"));\n\t\n\t sqlMenu.getItems().add(tutorialManeu);\n\t\t */\n\t\n\t\tMenu aboutMenu = new Menu(\"О системе\");\n\t\n\t\tMenuItem version = new MenuItem(\"Версия\");\n\t\tversion.setOnAction(actionEvent -> showAbout());\n\t\n\t\tMenuItem aboutDz = new MenuItem(\"Digital Zone\");\n\t\taboutDz.setOnAction(actionEvent -> main.getHostServices().showDocument(Defs.HOME_URL));\n\t\n\t\tMenuItem aboutVita = new MenuItem(\"VitaSoft\");\n\t\taboutVita.setOnAction(actionEvent -> main.getHostServices().showDocument(\"vtsft.ru\"));\n\t\n\t\taboutMenu.getItems().addAll( version, new SeparatorMenuItem(), aboutDz, aboutVita );\n\t\n\t\t// --------------- Menu bar\n\t\n\t\t//menuBar.getMenus().addAll(fileMenu, webMenu, sqlMenu);\n\t\tmenuBar.getMenus().addAll(fileMenu, navMenu, dataMenu, aboutMenu );\n\t}", "private MenuBar setupMenu () {\n MenuBar mb = new MenuBar ();\n Menu fileMenu = new Menu (\"File\");\n openXn = makeMenuItem (\"Open Connection\", OPEN_CONNECTION);\n closeXn = makeMenuItem (\"Close Connection\", CLOSE_CONNECTION);\n closeXn.setEnabled (false);\n MenuItem exit = makeMenuItem (\"Exit\", EXIT_APPLICATION);\n fileMenu.add (openXn);\n fileMenu.add (closeXn);\n fileMenu.addSeparator ();\n fileMenu.add (exit);\n\n Menu twMenu = new Menu (\"Tw\");\n getWksp = makeMenuItem (\"Get Workspace\", GET_WORKSPACE);\n getWksp.setEnabled (false);\n twMenu.add (getWksp);\n\n mb.add (fileMenu);\n mb.add (twMenu);\n return mb;\n }", "public void initializeMenuItems() {\n\t\tuserMenuButton = new MenuButton();\n\t\tmenu1 = new MenuItem(bundle.getString(\"mVmenu1\")); //\n\t\tmenu2 = new MenuItem(bundle.getString(\"mVmenu2\")); //\n\t}", "private void buildJMenuBar() {\r\n // create Menu Bar\r\n gameBar = new JMenuBar();\r\n\r\n buildGameMenu();\r\n buildSettingsMenu();\r\n\r\n gameBar.add( gameMenu );\r\n gameBar.add( settingsMenu );\r\n }", "private void setupMenu() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tJMenuItem conn = new JMenuItem(connectAction);\n\t\tJMenuItem exit = new JMenuItem(\"退出\");\n\t\texit.addActionListener(new AbstractAction() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\texit();\n\t\t\t}\n\t\t});\n\t\tJMenu file = new JMenu(\"客户端\");\n\t\tfile.add(conn);\n\t\tmenuBar.add(file);\n\t\tsetJMenuBar(menuBar);\n\t}", "private void createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}", "public void initMenu(){\n\t}", "MenuBar getRootMenuBar();", "public void setMainMenuBar(JMenuBar menuBar) {\n this.menuBar = menuBar;\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}", "public JMenuBar createMenuBar ()\n {\n MenuListener menuListener = new MenuListener ();\n\t //-----------------------------Menu options.--------------------------------------------------------------\n JMenu fileMenu = new JMenu (\"File\");\n JMenu editMenu = new JMenu (\"Edit\");\n JMenu viewMenu = new JMenu (\"View\");\n JMenu colorMenu = new JMenu (\"Colors\");\n JMenu filterMenu = new JMenu (\"Filter\");\n JMenu helpMenu = new JMenu (\"Help\");\n\n //----------------------------Submenu options.-------------------------------------------------------------\n JMenuItem newMenuItem = new JMenuItem (\"New\",new ImageIcon(\"../img/new.gif\"));\n newMenuItem.addActionListener (menuListener);\n newMenuItem.setEnabled (true);\n\n JMenuItem openMenuItem = new JMenuItem (\"Open\",new ImageIcon(\"../img/open.gif\"));\n openMenuItem.addActionListener (menuListener);\n openMenuItem.setEnabled (true);\n\n JMenuItem saveMenuItem = new JMenuItem (\"Save\",new ImageIcon(\"../img/save.gif\"));\n saveMenuItem.addActionListener (menuListener);\n saveMenuItem.setEnabled (true);\n \n JMenuItem exitMenuItem = new JMenuItem (\"Exit\",new ImageIcon(\"../img/close.gif\"));\n exitMenuItem.addActionListener (menuListener);\n exitMenuItem.setEnabled (true);\n \n fileMenu.add (newMenuItem);\n fileMenu.add (openMenuItem);\n fileMenu.add (saveMenuItem);\n fileMenu.add (exitMenuItem);\n\n //---------------------------------------------End of File Menu--------------------------------------------\n JMenuItem undoMenuItem = new JMenuItem (\"Undo\",new ImageIcon(\"../img/undo.gif\"));\n undoMenuItem.addActionListener (menuListener);\n undoMenuItem.setEnabled (true);\n\n JMenuItem redoMenuItem = new JMenuItem (\"Redo\",new ImageIcon(\"../img/redo.gif\"));\n redoMenuItem.addActionListener (menuListener);\n redoMenuItem.setEnabled (true);\n\n JMenuItem clearMenuItem = new JMenuItem (\"Clear All\",new ImageIcon(\"../img/clear.gif\"));\n clearMenuItem.addActionListener (menuListener);\n clearMenuItem.setEnabled (true);\n\n editMenu.add (undoMenuItem);\n editMenu.add (redoMenuItem);\n editMenu.add (clearMenuItem);\n\n //----------------------------------------End of Edit Menu-------------------------------------------------\n JMenuItem toolboxMenuItem = new JMenuItem (\"Tool Box\",new ImageIcon(\"../img/tool.gif\"));\n toolboxMenuItem.addActionListener(menuListener);\n toolboxMenuItem.setEnabled (true);\n\n JMenuItem colorboxMenuItem = new JMenuItem (\"Color Box\",new ImageIcon(\"../img/cbox.gif\"));\n colorboxMenuItem.addActionListener(menuListener);\n colorboxMenuItem.setEnabled (true);\n\n JMenuItem cursorMenuItem = new JMenuItem (\"Cursor Position\",new ImageIcon(\"../img/pos.gif\"));\n cursorMenuItem.addActionListener(menuListener);\n cursorMenuItem.setEnabled (true);\n \n viewMenu.add (toolboxMenuItem);\n viewMenu.add (colorboxMenuItem);\n viewMenu.add (cursorMenuItem);\n\n //--------------------------------------End of View Menu-------------------------------------------------- \n JMenuItem editcolorMenuItem = new JMenuItem (\"Edit Colors\",new ImageIcon(\"../img/color.gif\"));\n editcolorMenuItem.addActionListener(menuListener);\n editcolorMenuItem.setEnabled (true);\n \n colorMenu.add (editcolorMenuItem);\n\n //------------------------------------End of Color Menu--------------------------------------------------- \n JMenuItem brightnessMenuItem = new JMenuItem (\"Brightness\",new ImageIcon(\"../img/bright.gif\"));\n brightnessMenuItem.addActionListener(menuListener);\n brightnessMenuItem.setEnabled (true);\n \n JMenuItem blurMenuItem = new JMenuItem (\"Blur\",new ImageIcon(\"../img/blur.gif\"));\n blurMenuItem.addActionListener(menuListener);\n blurMenuItem.setEnabled (true);\n \n filterMenu.add (brightnessMenuItem);\n filterMenu.add (blurMenuItem);\n\n //--------------------------------------End of Filter Menu------------------------------------------------ \n JMenuItem helpMenuItem = new JMenuItem (\"Help Topics\",new ImageIcon(\"../img/help.gif\"));\n helpMenuItem.addActionListener(menuListener);\n helpMenuItem.setEnabled (true); \n JMenuItem aboutMenuItem = new JMenuItem (\"About Multi Brush\",new ImageIcon(\"../img/license.gif\"));\n aboutMenuItem.addActionListener(menuListener);\n aboutMenuItem.setEnabled (true);\n \n helpMenu.add (helpMenuItem);\n helpMenu.add (aboutMenuItem);\n\n //-----------------------------------------End of Help Menu----------------------------------------------- \t \n JMenuBar menubar = new JMenuBar ();\n menubar.add (fileMenu);\n menubar.add (editMenu);\n menubar.add (viewMenu);\n menubar.add (colorMenu);\n //menubar.add (filterMenu);\n menubar.add (helpMenu);\n\n return menubar;\n }", "private JMenuBar createMenuBar() {\n\t\tJMenuBar jmb = new JMenuBar();\n\t\tImageIcon icon;\n\n\t\t// Create the File menu.\n\t\tJMenu jmFile = new JMenu(\"File\");\n\t\tthis.imageURL = getClass().getResource(\"/icons/folder-open_16.png\");\n\t\ticon = new ImageIcon(imageURL);\n\t\tJMenuItem jmiOpen = new JMenuItem(\"Open\", icon);\n\t\tjmiOpen.addActionListener(event -> tfStatus.setText(\"Menu item: \" + event.getActionCommand()));\n\t\tthis.imageURL = getClass().getResource(\"/icons/save_16.png\");\n\t\ticon = new ImageIcon(imageURL);\n\t\tJMenuItem jmiSave = new JMenuItem(\"Save\", icon);\n\t\tjmiSave.addActionListener(event -> tfStatus.setText(\"Menu item: \" + event.getActionCommand()));\n\t\tthis.imageURL = getClass().getResource(\"/icons/print_16.png\");\n\t\ticon = new ImageIcon(imageURL);\n\t\tJMenuItem jmiPrint = new JMenuItem(\"Print\", icon);\n\t\tjmiPrint.addActionListener(event -> tfStatus.setText(\"Menu item: \" + event.getActionCommand()));\n\t\tJMenuItem jmiExit = new JMenuItem(\"Exit\");\n\t\tjmiExit.addActionListener(event -> System.exit(0));\n\t\tjmFile.add(jmiOpen);\n\t\tjmFile.add(jmiSave);\n\t\tjmFile.addSeparator();\n\t\tjmFile.add(jmiPrint);\n\t\tjmFile.addSeparator();\n\t\tjmFile.add(jmiExit);\n\t\tjmb.add(jmFile);\n\n\t\t// Create the Options menu.\n\t\tJMenu jmOptions = new JMenu(\"Options\");\n\t\t// Create the Colors submenu.\n\t\tJMenu jmColors = new JMenu(\"Colors\");\n\t\tJRadioButtonMenuItem jmiBlue = new JRadioButtonMenuItem(blueAction);\n\t\tJRadioButtonMenuItem jmiRed = new JRadioButtonMenuItem(redAction);\n\t\tJRadioButtonMenuItem jmiYellow = new JRadioButtonMenuItem(yellowAction);\n\t\tjmColors.add(jmiBlue);\n\t\tjmColors.add(jmiRed);\n\t\tjmColors.add(jmiYellow);\n\t\tjmOptions.add(jmColors);\n\t\tButtonGroup bg = new ButtonGroup();\n\t\tbg.add(jmiBlue);\n\t\tbg.add(jmiRed);\n\t\tbg.add(jmiYellow);\n\t\tjmOptions.addSeparator();\n\t\tJCheckBoxMenuItem jmiSettings = new JCheckBoxMenuItem(\"Settings\");\n\t\tjmiSettings.setSelected(true);\n\t\tjmiSettings.addActionListener(event -> tfStatus.setText(\"Menu item: \" + event.getActionCommand()));\n\t\tjmOptions.add(jmiSettings);\n\t\tjmb.add(jmOptions);\n\t\treturn jmb;\n\t}", "private JMenuBar createMenuBar()\n\t{\n\t\tJMenuBar menBar = new JMenuBar();\n\t\tJMenu men = new JMenu();\n\t\tmen.setText(\"Menu\");\n\t\tJMenuItem menSettings = new JMenuItem();\n\t\tmenSettings.setText(\"Settings\");\n\t\tmenSettings.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e)\n\t\t{\n\t\t\tsettingsWindow.setVisible(true);\n\t\t}});\n\t\tmen.add(menSettings);\n\t\tmenBar.add(men);\n\t\treturn menBar;\n\t}", "private void setUpMenuBar_FileMenu(){\r\n\t\t// Add the file menu.\r\n\t\tthis.fileMenu = new JMenu(STR_FILE);\r\n\t\tthis.openMenuItem = new JMenuItem(STR_OPEN);\r\n\t\tthis.openMenuItem2 = new JMenuItem(STR_OPEN2);\r\n\t\tthis.resetMenuItem = new JMenuItem(STR_RESET);\r\n\t\tthis.saveMenuItem = new JMenuItem(STR_SAVE);\r\n\t\tthis.saveAsMenuItem = new JMenuItem(STR_SAVEAS);\r\n\t\tthis.exitMenuItem = new JMenuItem(STR_EXIT);\r\n\t\t\r\n\t\t// Add the action listeners for the file menu.\r\n\t\tthis.openMenuItem.addActionListener(this);\r\n\t\tthis.openMenuItem2.addActionListener(this);\r\n\t\tthis.resetMenuItem.addActionListener(this);\r\n\t\tthis.saveMenuItem.addActionListener(this);\r\n\t\tthis.saveAsMenuItem.addActionListener(this);\r\n\t\tthis.exitMenuItem.addActionListener(this);\r\n\t\t\r\n\t\t// Add the menu items to the file menu.\r\n\t\tthis.fileMenu.add(openMenuItem);\r\n\t\tthis.fileMenu.add(openMenuItem2);\r\n\t\tthis.fileMenu.add(resetMenuItem);\r\n\t\tthis.fileMenu.addSeparator();\r\n\t\tthis.fileMenu.add(saveMenuItem);\r\n\t\tthis.fileMenu.add(saveAsMenuItem);\r\n\t\tthis.fileMenu.addSeparator();\r\n\t\tthis.fileMenu.add(exitMenuItem);\r\n\t\tthis.menuBar.add(fileMenu);\r\n\t}", "public MainMenu() {\n initComponents();\n }", "public MainMenu() {\n initComponents();\n }", "public MainMenu() {\n initComponents();\n }", "private JMenuBar createMenuBar() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tmenuBar.add(createFileMenu());\r\n\t\tmenuBar.add(createExamplesMenu());\r\n\t\tmenuBar.add(createEditVariableMenu());\r\n\t\tmenuBar.add(createAnimationMenu());\r\n\t\treturn (menuBar);\r\n\t}", "private JMenuBar getMenubar() {\r\n\t\tif (menubar == null) {\r\n\t\t\tmenubar = new JMenuBar();\t\t\r\n\t\t\tmenubar.add(getMnuFile());\r\n\t\t\tmenubar.add(getMnuView());\r\n\t\t\tmenubar.add(getMnuBookmarks());\r\n\t\t}\r\n\t\treturn menubar;\r\n\t}", "public MainMenu() {\n initComponents();\n formDashboardHeaderLabelId.setVisible(false);\n formDashboardHeaderLabelNik.setVisible(false);\n }", "private void initialize() {\r\n //this.setVisible(true);\r\n \r\n\t // added pre-set popup menu here\r\n// this.add(getPopupFindMenu());\r\n this.add(getPopupDeleteMenu());\r\n this.add(getPopupPurgeMenu());\r\n\t}", "public Menu() { //Menu pannel constructor\n\t\tmenuBar = new JMenuBar();\n\t\tmenu = new JMenu(\"Menu\");\n\t\tabout = new JMenu(\"About\");\n\t\tabout.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Ragnarock Web Browser 2017\\nIvan Mykolenko\\u00AE\", \"About\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\thistory = new JMenu(\"History\");\n\t\thistory.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"history\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"History\");\n\t\t\t\tlayer.show(userViewPort, \"History\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 2;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tbookmarks = new JMenu(\"Bookmarks\");\n\t\tbookmarks.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"bookmarks\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"Bookmarks\");\n\t\t\t\tlayer.show(userViewPort, \"Bookmarks\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 3;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tsettingsMenuItem = new JMenuItem(\"Settings\", KeyEvent.VK_X);\n\t\tsettingsMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcreateSettings();\n\t\t\t\tsettings.setVisible(true);\n\t\t\t}\n\t\t});\n\t\texitMenuItem = new JMenuItem(\"Exit\");\n\t\texitMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tbackButton = new JButton(\"Back\");\n\t\tremoveButton = new JButton(\"Remove\");\n\t\tmenu.add(settingsMenuItem);\n\t\tmenu.add(exitMenuItem);\n\t\tmenuBar.add(menu);\n\t\tmenuBar.add(history);\n\t\tmenuBar.add(bookmarks);\n\t\tmenuBar.add(about);\n\t\tmenuBar.add(Box.createHorizontalGlue()); // Changing backButton's alignment to right\n\t\tsettings = new JDialog();\n\t\tadd(menuBar);\n\t\tsaveButton = new JButton(\"Save\");\n\t\tclearHistory = new JButton(\"Clear History\");\n\t\tclearBookmarks = new JButton(\"Clear Bookmarks\");\n\t\tbuttonsPanel = new JPanel();\n\t\tpanel = new JPanel();\n\t\turlField = new JTextField(15);\n\t\tedit = new JLabel(\"Edit Homepage:\");\n\t\tviewMode = 1;\n\t\tlistModel = new DefaultListModel<String>();\n\t\tlist = new JList<String>(listModel);\n\t\tlist.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);\n\t\tlist.setLayoutOrientation(JList.VERTICAL);\n\t}", "public MainMenu() {\n super();\n }", "public ChessMenuBar() {\n String[] menuCategories = {\"File\", \"Options\", \"Help\"};\n String[] menuItemLists =\n {\"New game/restart,Exit\", \"Toggle graveyard,Toggle game log\",\n \"About\"};\n for (int i = 0; i < menuCategories.length; i++) {\n JMenu currMenu = new JMenu(menuCategories[i]);\n String[] currMenuItemList = menuItemLists[i].split(\",\");\n for (int j = 0; j < currMenuItemList.length; j++) {\n JMenuItem currItem = new JMenuItem(currMenuItemList[j]);\n currItem.addActionListener(new MenuListener());\n currMenu.add(currItem);\n }\n this.add(currMenu);\n }\n }", "@Override\n\tpublic MenuBar createMenuBar() {\n\t\tLightVisualThemeMenuBar lightVisualThemeMenuBar = new LightVisualThemeMenuBar();\n\t\treturn lightVisualThemeMenuBar;\n\t}", "private MenuBar getMenuBar() {\n MenuBar menuBar = new MenuBar();\n // setup File menu\n Menu fileMenu = new Menu(\"File\");\n fileMenu.getItems().addAll(\n getMenuItem(\"New\", event -> startGame()),\n getMenuItem(\"Quit\", event -> quitGame())\n );\n\n // setup Level menu\n Menu levelMenu = new Menu(\"Level\");\n\n // for radio menu items, ensures only\n // one is selected at a time.\n ToggleGroup group = new ToggleGroup();\n\n levelMenu.getItems().addAll(\n getRadioMenuItem(\n \"Beginner - 9x9\",\n true,\n group,\n event -> setGameLevel(GameLevel.BEGINNER)\n ),\n\n getRadioMenuItem(\n \"Intermediate - 16x16\",\n false,\n group,\n event -> setGameLevel(GameLevel.INTERMEDIATE)\n ),\n\n getRadioMenuItem(\n \"Expert - 24x24\",\n false,\n group,\n event -> setGameLevel(GameLevel.EXPERT))\n );\n\n menuBar.getMenus().addAll(fileMenu, levelMenu);\n\n return menuBar;\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}", "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}", "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}", "public Menus() {\n initComponents();\n }", "private void buildMenu() {\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n\n JMenu fileMenu = new JMenu(\"File\");\n fileMenu.addMenuListener(this);\n\n JMenuItem openItem = new JMenuItem(\"Open\");\n openItem.setEnabled(false);\n JMenuItem newItem = new JMenuItem(\"New\");\n newItem.setEnabled(false);\n saveItem = new JMenuItem(\"Save\");\n saveItem.setEnabled(false);\n saveAsItem = new JMenuItem(\"Save As\");\n saveAsItem.setEnabled(false);\n reloadCalItem = new JMenuItem(RELOAD_CAL);\n exitItem = new JMenuItem(EXIT);\n\n mbar.add(makeMenu(fileMenu, new Object[]{newItem, openItem, null,\n reloadCalItem, null,\n saveItem, saveAsItem, null, exitItem}, this));\n\n JMenu viewMenu = new JMenu(\"View\");\n mbar.add(viewMenu);\n JMenuItem columnItem = new JMenuItem(COLUMNS);\n columnItem.addActionListener(this);\n JMenuItem logItem = new JMenuItem(LOG);\n logItem.addActionListener(this);\n JMenu satMenu = new JMenu(\"Satellite Image\");\n JMenuItem irItem = new JMenuItem(INFRA_RED);\n irItem.addActionListener(this);\n JMenuItem wvItem = new JMenuItem(WATER_VAPOUR);\n wvItem.addActionListener(this);\n satMenu.add(irItem);\n satMenu.add(wvItem);\n viewMenu.add(columnItem);\n viewMenu.add(logItem);\n viewMenu.add(satMenu);\n\n observability = new JCheckBoxMenuItem(\"Observability\", true);\n observability.setToolTipText(\"Check that the source is observable.\");\n remaining = new JCheckBoxMenuItem(\"Remaining\", true);\n remaining.setToolTipText(\n \"Check that the MSB has repeats remaining to be observed.\");\n allocation = new JCheckBoxMenuItem(\"Allocation\", true);\n allocation.setToolTipText(\n \"Check that the project still has sufficient time allocated.\");\n\n String ZOA = System.getProperty(\"ZOA\", \"true\");\n boolean tickZOA = true;\n if (\"false\".equalsIgnoreCase(ZOA)) {\n tickZOA = false;\n }\n\n zoneOfAvoidance = new JCheckBoxMenuItem(\"Zone of Avoidance\", tickZOA);\n localQuerytool.setZoneOfAvoidanceConstraint(!tickZOA);\n\n disableAll = new JCheckBoxMenuItem(\"Disable All\", false);\n JMenuItem cutItem = new JMenuItem(\"Cut\",\n new ImageIcon(ClassLoader.getSystemResource(\"cut.gif\")));\n cutItem.setEnabled(false);\n JMenuItem copyItem = new JMenuItem(\"Copy\",\n new ImageIcon(ClassLoader.getSystemResource(\"copy.gif\")));\n copyItem.setEnabled(false);\n JMenuItem pasteItem = new JMenuItem(\"Paste\",\n new ImageIcon(ClassLoader.getSystemResource(\"paste.gif\")));\n pasteItem.setEnabled(false);\n\n mbar.add(makeMenu(\"Edit\",\n new Object[]{\n cutItem,\n copyItem,\n pasteItem,\n null,\n makeMenu(\"Constraints\", new Object[]{observability,\n remaining, allocation, zoneOfAvoidance, null,\n disableAll}, this)}, this));\n\n mbar.add(SampClient.getInstance().buildMenu(this, sorter, table));\n\n JMenu helpMenu = new JMenu(\"Help\");\n helpMenu.setMnemonic('H');\n\n mbar.add(makeMenu(helpMenu, new Object[]{new JMenuItem(INDEX, 'I'),\n new JMenuItem(ABOUT, 'A')}, this));\n\n menuBuilt = true;\n }", "@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}", "public Menus( Main mainApp ) {\n this(); // call the default constructor, which must always be called first\n this.mainApp = mainApp; // save the reference to the Main application\n }", "private JMenuBar createMenuBar() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\t\n\t\tJMenu fileMenu = new JMenu(\"File\");\n\t\tJMenu helpMenu = new JMenu(\"Help\");\n\t\t\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(helpMenu);\n\t\t\n\t\tfileMenu.setMnemonic(KeyEvent.VK_F);\n\t\thelpMenu.setMnemonic(KeyEvent.VK_H);\n\n\t\tJMenuItem exitItem =\n\t\t\t\tcreateMenuItem(fileMenu, \"Exit\", KeyEvent.VK_X, \"ctrl X\", \"Exits the program\");\n\t\texitItem.addActionListener((e) -> {\n\t\t\tthis.dispose();\n\t\t\tSystem.exit(0);\n\t\t});\n\t\t\n\t\tJMenuItem aboutItem =\n\t\t\t\tcreateMenuItem(helpMenu, \"About File Encryptor\", -1, null, \"Shows information about this program\");\n\t\taboutItem.addActionListener((e) -> {\n\t\t\tshowHelp();\n\t\t});\n\t\t\n\t\treturn menuBar;\n\t}", "private void constructMenus()\n\t{\n\t\tthis.fileMenu = new JMenu(\"File\");\n\t\tthis.editMenu = new JMenu(\"Edit\");\n\t\tthis.caseMenu = new JMenu(\"Case\");\n\t\tthis.imageMenu = new JMenu(\"Image\");\n\t\tthis.fileMenu.add(this.saveImageMenuItem);\n\t\tthis.fileMenu.addSeparator();\n\t\tthis.fileMenu.add(this.quitMenuItem);\n\t\tthis.editMenu.add(this.undoMenuItem);\n\t\tthis.editMenu.add(this.redoMenuItem);\n\t\tthis.caseMenu.add(this.removeImageMenuItem);\n\t\tthis.imageMenu.add(this.antiAliasMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.brightenMenuItem);\n\t\tthis.imageMenu.add(this.darkenMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.grayscaleMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.resizeMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.cropMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.rotate90MenuItem);\n\t\tthis.imageMenu.add(this.rotate180MenuItem);\n\t\tthis.imageMenu.add(this.rotate270MenuItem);\n\t}", "public MainMenuPanel() {\n\t\tinitComponents();\n\t}", "private JMenuBar createMenubar() {\n\t\t\tJFrame error = new JFrame();\n\t\t\tJMenuBar menubar = new JMenuBar(); //creates new menu bar\n\t\t\tJMenu mnuFile = new JMenu(\"File\"); //creates file option\n\t\t\tmnuFile.setMnemonic(KeyEvent.VK_F);\n\t\t\tJMenuItem mniFileExit = new JMenuItem(\"Exit\"); //creates exit button\n\t\t\tmniFileExit.setMnemonic(KeyEvent.VK_E);\n\t\t\tmniFileExit.setToolTipText(\"Exit application\"); //sets tool tip\n\t\t\tmniFileExit.addActionListener(new ActionListener() {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent event) { //when clicked\n\t\t\t\t\n\t\t\t\t System.exit(0); } //exit program\n\t\t\t});\n\t\t\t\n\t\t\t//Reset StartUp Location\n\t\t\tJMenuItem reset = new JMenuItem(\"Reset Current\");\n\t\t\treset.setMnemonic(KeyEvent.VK_R);\n\t\t\treset.addActionListener(new ActionListener() {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent event) {\n\t\t\t\t JFrame frame = new JFrame();\n\t\t\t\t String txt = JOptionPane.showInputDialog(frame, \"Enter the city name of your new current location:\"); //prompts user for their current location\n\t\t\t\t\tArrayList<location> simLoc = dataBase.search(txt);\n\t\t\t\t\tif (simLoc == null) JOptionPane.showMessageDialog(frame, \"'\" + txt + \"' not found.\");\n\t\t\t\t\telse if (simLoc.size() == 1){\n\t\t\t\t\t\tlocation searchedLoc = simLoc.get(0);\n\t\t\t\t\t\tapp.setCurrentLocation(searchedLoc);\n\t\t\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\t\t\trefreshPanels();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tString [] possibilities = new String[simLoc.size()];\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int i = 0; i < simLoc.size(); i ++){\n\t\t\t\t\t\t\tpossibilities[i] = i + 1 + \". \" + simLoc.get(i).getName() + \", \" + simLoc.get(i).getCountryCode() + \" Lat: \" \n\t\t\t\t\t\t\t\t\t+ simLoc.get(i).getLatitude() + \" Long: \" + simLoc.get(i).getLongitude();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tString response = (String) JOptionPane.showInputDialog(frame, \"Which '\" + txt + \"' did you mean?\", \"Search Location\", \n\t\t\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, null, possibilities, \"Titan\");\n\t\t\t\t\t\n\t\t\t\t\t\tif (response != null) {\n\t\t\t\t\t\t\t\tlocation searchedLoc = simLoc.get(Integer.parseInt(response.substring(0, response.indexOf('.'))) - 1);\n\t\t\t\t\t\t\t\tapp.setCurrentLocation(searchedLoc);\n\t\t\t\t\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\t\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\t\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\t\t\t\t\trefreshPanels();\n\t\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t \t\n\t\t\t});\n\t\t\t\n\t\t\tJMenuItem switchTo = new JMenuItem(\"Switch to Current\");\n\t\t\tswitchTo.setMnemonic(KeyEvent.VK_S);\n\t\t\tswitchTo.addActionListener(new ActionListener() {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent event) {\n\t\t\t\t app.setVisibleLocation(app.getCurrentLocation());\n\t\t\t\t refreshPanels();\n\t\t\t }\n\t\t\t\t \n\t\t\t });\n\t\t\t\n\t\t\t//Refresh button\n\t\t\tJMenuItem refresh = new JMenuItem(\"Refresh\");\n\t\t\trefresh.setMnemonic(KeyEvent.VK_F);\n\t\t\tupdateRefreshTime();\n\t\t\trefresh.addActionListener(new ActionListener() {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent event) {\t\n\t\t\t\t refreshPanels(); \n\t\t\t \t}\n\t\t\t});\n\t\t\tmnuFile.add(switchTo);\n\t\t\tmnuFile.add(reset);\n\t\t\tmnuFile.add(refresh);\n\t\t\tmnuFile.add(mniFileExit); //adds it to the menubar\n\t\t\tmenubar.add(mnuFile);\n\t\t\t\n\t\t\t//oF/oC check box\n\t\t\tJCheckBox degree = new JCheckBox();\n\t\t\tdegree.addActionListener(new ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent event){\n\t\t\t\t\tif(((JCheckBox) event.getSource()).isSelected()){\n\t\t\t\t\t\tapp.setUnits(\"imperial\");\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tapp.setUnits(\"metric\");\n\t\t\t\t\t}\n\t\t\t\t\trefreshPanels();\n\t\t\t\t}\n\t\t\t});\n\t\t\tmenubar.add(degree);\n\t\t\tJLabel degLabel = new JLabel(\"oF\");\n\t\t\tmenubar.add(degLabel);\n\t\t\tmenubar.add(new JLabel(\" \"));\n\t\t\t\n\t\t\t//Locations -> MyLocations\n\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\tpopulateMyLocationsBox();\n\t\t\tmenubar.add(locBar);\n\t\t\t\t\t\t\n\t\t\t//Search text box\n\t\t\tJTextField txtBar = new JTextField(\"Search Location\");\n\t\t\ttxtBar.addActionListener(new ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent event){\n\t\t\t\t\tsearchBoxUsed(((JTextField) event.getSource()).getText());\n\t\t\t\t}\n\t\t\t});\n\t\t\tmenubar.add(txtBar);\n\t\t\t\t\n\t\t\t\n\t\t\treturn menubar;\n\t\t}", "public void generateMenu(){\n\t\tmenuBar = new JMenuBar();\n\n\t\tJMenu file = new JMenu(\"File\");\n\t\tJMenu tools = new JMenu(\"Tools\");\n\t\tJMenu help = new JMenu(\"Help\");\n\n\t\tJMenuItem open = new JMenuItem(\"Open \");\n\t\tJMenuItem save = new JMenuItem(\"Save \");\n\t\tJMenuItem exit = new JMenuItem(\"Exit \");\n\t\tJMenuItem preferences = new JMenuItem(\"Preferences \");\n\t\tJMenuItem about = new JMenuItem(\"About \");\n\n\n\t\tfile.add(open);\n\t\tfile.add(save);\n\t\tfile.addSeparator();\n\t\tfile.add(exit);\n\t\ttools.add(preferences);\n\t\thelp.add(about);\n\n\t\tmenuBar.add(file);\n\t\tmenuBar.add(tools);\n\t\tmenuBar.add(help);\n\t}", "MenuBarController (DrawingCanvas c, MenuBarView m){\r\n\t\tcanvas = c;\r\n\t\tmenubarview = m;\t\r\n\t}", "private void setMenuBarMnemonics()\n {\n if (!OSUtil.IS_MAC)\n {\n // Menus\n if (this.menuFile.getText().length() > 0)\n this.menuFile.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile\").charAt(0));\n if (this.menuProfiles.getText().length() > 0)\n this.menuProfiles.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuProfiles\").charAt(0));\n if (this.menuHelp.getText().length() > 0)\n this.menuHelp.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp\").charAt(0));\n // File sub menus\n if (this.menuFile_Parameters.getText().length() > 0)\n this.menuFile_Parameters.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile_Parameters\").charAt(0));\n if (this.menuFile_Quit.getText().length() > 0)\n this.menuFile_Quit.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile_Quit\").charAt(0));\n // Help sub menus\n if (this.menuHelp_Update.getText().length() > 0)\n this.menuHelp_Update.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_Update\").charAt(0));\n if (this.menuHelp_Doc.getText().length() > 0)\n this.menuHelp_Doc.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_Doc\").charAt(0));\n if (this.menuHelp_FAQ.getText().length() > 0)\n this.menuHelp_FAQ.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_FAQ\").charAt(0));\n if (this.menuHelp_About.getText().length() > 0)\n this.menuHelp_About.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_About\").charAt(0));\n }\n }", "private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\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 }", "public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\n\t\t\r\n\t\treturnToStart = new JButton(\"Main Menu\");\r\n\t\treturnToStart.setBounds(900, 900, 0, 0);\r\n\t\treturnToStart.setBackground(Color.BLACK);\r\n\t\treturnToStart.setForeground(Color.WHITE);\r\n\t\treturnToStart.setVisible(false);\r\n\t\treturnToStart.addActionListener(this);\r\n\t\t\r\n\t\t//add(menubackground);\r\n\t\tadd(returnToGame);\r\n\t\tadd(returnToStart);\r\n\t}", "private JMenuBar createbar(){\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t//Add a JMenu\n\t\tJMenu c = new JMenu(\"Create\");\n\t\tJMenu m = new JMenu(\"Manipulate\"); \n\t\tJMenu o = new JMenu(\"Other\");\n\n\t\tmenuBar.add(c);\n\t\tmenuBar.add(m);\n\t\tmenuBar.add(o);\n\n\t\t//Create menu\n\t\tJMenuItem cPyramid = new JMenuItem(\"Pyramid\");\n\t\tJMenuItem cSquare = new JMenuItem(\"Square\");\n\t\tJMenuItem cStar = new JMenuItem(\"Star\");\n\t\tJMenuItem cSphere = new JMenuItem(\"Sphere\");\n\t\tJMenuItem cCube = new JMenuItem(\"Cube\");\n\t\tJMenuItem cLight = new JMenuItem(\"Light\");\n\n\t\tc.add(cPyramid);\n\t\tc.add(cSquare);\n\t\tc.add(cStar);\n\t\tc.add(cSphere);\n\t\tc.add(cCube);\n\t\tc.add(cLight);\n\t\t\n\n\t\t//Manipulate menu\n\t\tJMenuItem mModify = new JMenuItem(\"Modify\");\n\t\tJMenuItem mDelete = new JMenuItem(\"Delete\");\n\n\t\tm.add(mModify);\n\t\tm.add(mDelete);\n\n\t\tJMenuItem oDeleteAll = new JMenuItem(\"Delete All (lights remain but will be overwritten)\"); \n\t\tJMenuItem oPrint = new JMenuItem(\"Print Structure\");\n\n\t\to.add(oPrint);\n\t\to.add(oDeleteAll);\n\n\n\t\tcPyramid.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Pyramid, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\n\t\t});\n\n\t\tcSquare.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Square, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcStar.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Star, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcSphere.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Sphere, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\t\t\n\t\tcCube.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Cube, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcLight.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Light, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tmModify.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfor (Figure_deployment_type fig: draw.figurelist) {\n\t\t\t\t\tif (fig.getId()==draw.picked_figure){\n\t\t\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, fig.type, draw.picked_figure);\n\t\t\t\t\t\tif (cdialog.getAnswer()!=null){\n\t\t\t\t\t\t\tfig.modify(cdialog.getModify());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tmDelete.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tint n =-1;\n\t\t\t\tfor (int i = 0; i < draw.figurelist.size(); i++) {\n\t\t\t\t\tif(draw.figurelist.get(i).getId()==draw.picked_figure)\n\t\t\t\t\t\tn=i;\n\t\t\t\t}\n\t\t\t\tif (n!=-1)\n\t\t\t\tdraw.figurelist.remove(n);\n\t\t\t}\n\t\t});\n\n\t\toDeleteAll.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdraw.figurelist.clear();\n\t\t\t}\n\t\t});\n\n\t\toPrint.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nArrayList<Figure_deployment_type> : {\");\n\t\t\t\tfor (Figure_deployment_type fig : draw.figurelist) {\n\t\t\t\t\tSystem.out.print(\"[ \");\n\t\t\t\t\tSystem.out.print(fig.toString());\n\t\t\t\t\tSystem.out.println(\" ]\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"}\");\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\treturn menuBar;\n\t}", "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 JMenuBar getMenuBar() {\n\t\tif (menuBar == null) {\n\t\t\tmenuBar = new JMenuBar();\n\t\t\t\n\t\t\tString commandKey; // for making keyboard accelerators for menu commands\n\t\t\tif (System.getProperty(\"mrj.version\") == null)\n\t\t\t\tcommandKey = \"control \"; // command key for non-Mac OS\n\t\t\telse\n\t\t\t\tcommandKey = \"meta \"; // command key for Mac OS\n\t\t\t\n\t\t\tJMenu fileMenu = new JMenu(\"File\");\n\t\t\tmenuBar.add(fileMenu);\n\t\t\t\n\t\t\tJMenuItem saveItem = new JMenuItem(\"Save...\");\n\t\t\tsaveItem.setAccelerator(KeyStroke.getKeyStroke(commandKey + \"S\"));\n\t\t\tsaveItem.addActionListener(menuHandler);\n\t\t\tfileMenu.add(saveItem);\n\t\t\t\n\t\t\tJMenuItem openItem = new JMenuItem(\"Open...\");\n\t\t\topenItem.setAccelerator(KeyStroke.getKeyStroke(commandKey + \"O\"));\n\t\t\topenItem.addActionListener(menuHandler);\n\t\t\tfileMenu.add(openItem);\n\t\t\t\n\t\t\tfileMenu.addSeparator();\n\t\t\t\n\t\t\tJMenuItem saveImageItem = new JMenuItem(\"Save Image...\");\n\t\t\tsaveImageItem.setAccelerator(KeyStroke.getKeyStroke(commandKey + \"shift S\"));\n\t\t\tsaveImageItem.addActionListener(menuHandler);\n\t\t\tfileMenu.add(saveImageItem);\n\t\t\t\n\t\t\tJMenu editMenu = new JMenu(\"Edit\");\n\t\t\tmenuBar.add(editMenu);\n\t\t\tundoMenuItem.addActionListener(menuHandler); \n\t\t\tundoMenuItem.setAccelerator(KeyStroke.getKeyStroke(commandKey + \"Z\"));\n\t\t\teditMenu.add(undoMenuItem);\n\t\t\teditMenu.addSeparator();\n\t\t\tJMenuItem clearItem = new JMenuItem(\"Clear\");\n\t\t\tclearItem.addActionListener(menuHandler);\n\t\t\teditMenu.add(clearItem);\n\t\t\t\n\t\t\tJMenu optionsMenu = new JMenu(\"Options\");\n\t\t\tmenuBar.add(optionsMenu);\n\t\t\tJMenuItem colorItem = new JMenuItem(\"Set Text Color...\");\n\t\t\tcolorItem.setAccelerator(KeyStroke.getKeyStroke(commandKey + \"T\"));\n\t\t\tcolorItem.addActionListener(menuHandler);\n\t\t\toptionsMenu.add(colorItem);\n\t\t\tJMenuItem bgColorItem = new JMenuItem(\"Set Background Color...\");\n\t\t\tbgColorItem.addActionListener(menuHandler);\n\t\t\toptionsMenu.add(bgColorItem);\n\t\t\t\n\t\t}\n\t\treturn menuBar;\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 }", "public JMenuBar getMainMenuBar() {\n return menuBar;\n }", "private JMenu getMMain() {\n\t\tif (mMain == null) {\n\t\t\tmMain = new JMenu();\n\t\t\tmMain.setText(\"Dosya\");\n\t\t\tmMain.add(getMiConfigure());\n\t\t\tmMain.add(getMiExit());\n\t\t}\n\t\treturn mMain;\n\t}", "public void initPlayerMenu() {\n Font f = new Font(\"Helvetica\", Font.BOLD, 16);\n\n menuPanel = new JPanel();\n menuPanel.setPreferredSize(new Dimension(buttonWidth, buttonHeight));\n menuPanel.setLayout(null);\n\n menuBar = new JMenuBar();\n menuBar.setPreferredSize(new Dimension(buttonWidth, buttonHeight));\n menuBar.setBounds(0, 0, buttonWidth, buttonHeight);\n menuBar.setLayout(null);\n\n playerMenu = new JMenu();\n playerMenu.setText(\"Players\");\n playerMenu.setFont(f);\n playerMenu.setBounds(0, 0, buttonWidth, buttonHeight);\n playerMenu.setBackground(new Color(0xeaf1f7));\n playerMenu.setHorizontalTextPosition(SwingConstants.CENTER);\n playerMenu.setOpaque(true);\n playerMenu.setBorder(BorderFactory.createBevelBorder(0));\n\n menuBar.add(playerMenu);\n menuPanel.add(menuBar);\n }", "public JMenuBar createMenuBar() {\n\t\tJMenuBar menuBar = new JMenuBar(); \n\t\t\n\t\t//Build the color Menu\n\t\tJMenu menu = new JMenu (\"Pick Colors\");\n\t\t //menu.setMnemonic(KeyEvent.VK_A);\n\t menu.getAccessibleContext().setAccessibleDescription(\n\t \"The only menu in this program that has menu items\");\n\t menuBar.add(menu);\n\t \n\t \n\t //add a color option to the menu -Yellow\n\t JMenuItem Yellow = new JMenuItem (\"Yellow\");\n\t Yellow.getAccessibleContext().setAccessibleDescription(\"Color1\");\n\t menu.add(Yellow);\n\n\t //add a color option to the menu- Blue\n\t JMenuItem Blue = new JMenuItem (\"Blue\");\n\t Blue.getAccessibleContext().setAccessibleDescription(\"Color2\");\n\t menu.add(Blue);\n\t \n\t //add a color option to the menu - Green\n\t JMenuItem Green = new JMenuItem (\"Green\");\n\t Green.getAccessibleContext().setAccessibleDescription(\"Color3\");\n\t menu.add(Green);\n\t \n\n\t //Build second menu in the menu bar.\n\t menu = new JMenu(\"Another Menu\");\n\t // menu.setMnemonic(KeyEvent.VK_N);\n\t menu.getAccessibleContext().setAccessibleDescription(\"This menu does nothing\");\n\t menuBar.add(menu);\n\t \n\t return menuBar; \n\t}", "private void initialize( )\n {\n this.setSize( 300, 200 );\n this.setLayout( new BorderLayout( ) );\n this.setBorder( BorderFactory.createTitledBorder( null, \"GnericMenu\", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null ) );\n this.add( getJScrollPane( ), BorderLayout.CENTER );\n\n itemAddMenuItem.addActionListener( this );\n itemDelCategory.addActionListener( this );\n popupmenuCategory.add( itemAddMenuItem );\n popupmenuCategory.add( itemDelCategory );\n\n itemDel.addActionListener( this );\n popupmenuItem.add( itemDel );\n\n itemAddCategory.addActionListener( this );\n popupmenuMenu.add( itemAddCategory );\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 void init() {\n menus.values().forEach(ToolbarSubMenuMenu::init);\n }", "public void init() {\n\t\tMenu menu = new Menu();\n\t\tmenu.register();\n\n\t\t// Application.getInstance().getGUILog().showMessage(\"Show a popup the proper\n\t\t// way !\");\n\n\t\t// final ActionsConfiguratorsManager manager =\n\t\t// ActionsConfiguratorsManager.getInstance();\n\n\t\t// final MDAction action = new ExampleAction();\n\t\t// Adding action to main menu\n\t\t// manager.addMainMenuConfigurator(new MainMenuConfigurator(action));\n\t\t// Adding action to main toolbar\n\t\t// manager.addMainToolbarConfigurator(new MainToolbarConfigurator(action));\n\n\t\t// pluginDir = getDescriptor().getPluginDirectory().getPath();\n\n\t\t// Creating submenu in the MagicDraw main menu\n\t\t// ActionsConfiguratorsManager manager =\n\t\t// ActionsConfiguratorsManager.getInstance();\n\t\t// manager.addMainMenuConfigurator(new\n\t\t// MainMenuConfigurator(getSubmenuActions()));\n\n\t\t/**\n\t\t * @Todo: load project options (@see myplugin.generator.options.ProjectOptions)\n\t\t * from ProjectOptions.xml and take ejb generator options\n\t\t */\n\n\t\t// for test purpose only:\n\t\t// GeneratorOptions ejbOptions = new GeneratorOptions(\"c:/temp\", \"ejbclass\",\n\t\t// \"templates\", \"{0}.java\", true, \"ejb\");\n\t\t// ProjectOptions.getProjectOptions().getGeneratorOptions().put(\"EJBGenerator\",\n\t\t// ejbOptions);\n\n\t\t// ejbOptions.setTemplateDir(pluginDir + File.separator +\n\t\t// ejbOptions.getTemplateDir()); //apsolutna putanja\n\t}", "private void buildMenu() {\r\n\t\tJMenuBar mainmenu = new JMenuBar();\r\n\t\tsetJMenuBar(mainmenu);\r\n\r\n\t\tui.fileMenu = new JMenu(\"File\");\r\n\t\tui.editMenu = new JMenu(\"Edit\");\r\n\t\tui.viewMenu = new JMenu(\"View\");\r\n\t\tui.helpMenu = new JMenu(\"Help\");\r\n\t\t\r\n\t\tui.fileNew = new JMenuItem(\"New...\");\r\n\t\tui.fileOpen = new JMenuItem(\"Open...\");\r\n\t\tui.fileImport = new JMenuItem(\"Import...\");\r\n\t\tui.fileSave = new JMenuItem(\"Save\");\r\n\t\tui.fileSaveAs = new JMenuItem(\"Save as...\");\r\n\t\tui.fileExit = new JMenuItem(\"Exit\");\r\n\r\n\t\tui.fileOpen.setAccelerator(KeyStroke.getKeyStroke('O', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.fileSave.setAccelerator(KeyStroke.getKeyStroke('S', InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.fileImport.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doImport(); } });\r\n\t\tui.fileExit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dispose(); doExit(); } });\r\n\t\t\r\n\t\tui.fileOpen.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoLoad();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.fileSave.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoSave();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.fileSaveAs.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoSaveAs();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.editUndo = new JMenuItem(\"Undo\");\r\n\t\tui.editUndo.setEnabled(undoManager.canUndo()); \r\n\t\t\r\n\t\tui.editRedo = new JMenuItem(\"Redo\");\r\n\t\tui.editRedo.setEnabled(undoManager.canRedo()); \r\n\t\t\r\n\t\t\r\n\t\tui.editCut = new JMenuItem(\"Cut\");\r\n\t\tui.editCopy = new JMenuItem(\"Copy\");\r\n\t\tui.editPaste = new JMenuItem(\"Paste\");\r\n\t\t\r\n\t\tui.editCut.addActionListener(new Act() { @Override public void act() { doCut(true, true); } });\r\n\t\tui.editCopy.addActionListener(new Act() { @Override public void act() { doCopy(true, true); } });\r\n\t\tui.editPaste.addActionListener(new Act() { @Override public void act() { doPaste(true, true); } });\r\n\t\t\r\n\t\tui.editPlaceMode = new JCheckBoxMenuItem(\"Placement mode\");\r\n\t\t\r\n\t\tui.editDeleteBuilding = new JMenuItem(\"Delete building\");\r\n\t\tui.editDeleteSurface = new JMenuItem(\"Delete surface\");\r\n\t\tui.editDeleteBoth = new JMenuItem(\"Delete both\");\r\n\t\t\r\n\t\tui.editClearBuildings = new JMenuItem(\"Clear buildings\");\r\n\t\tui.editClearSurface = new JMenuItem(\"Clear surface\");\r\n\r\n\t\tui.editUndo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doUndo(); } });\r\n\t\tui.editRedo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doRedo(); } });\r\n\t\tui.editClearBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doClearBuildings(true); } });\r\n\t\tui.editClearSurface.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doClearSurfaces(true); } });\r\n\t\t\r\n\r\n\t\tui.editUndo.setAccelerator(KeyStroke.getKeyStroke('Z', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editRedo.setAccelerator(KeyStroke.getKeyStroke('Y', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editCut.setAccelerator(KeyStroke.getKeyStroke('X', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editCopy.setAccelerator(KeyStroke.getKeyStroke('C', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editPaste.setAccelerator(KeyStroke.getKeyStroke('V', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editPlaceMode.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0));\r\n\t\t\r\n\t\tui.editDeleteBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));\r\n\t\tui.editDeleteSurface.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editDeleteBoth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\t\r\n\t\tui.editDeleteBuilding.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteBuilding(); } });\r\n\t\tui.editDeleteSurface.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteSurface(); } });\r\n\t\tui.editDeleteBoth.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteBoth(); } });\r\n\t\tui.editPlaceMode.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doPlaceMode(ui.editPlaceMode.isSelected()); } });\r\n\t\t\r\n\t\tui.editPlaceRoads = new JMenu(\"Place roads\");\r\n\t\t\r\n\t\tui.editResize = new JMenuItem(\"Resize map\");\r\n\t\tui.editCleanup = new JMenuItem(\"Remove outbound objects\");\r\n\t\t\r\n\t\tui.editResize.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoResize();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.editCleanup.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoCleanup();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.editCutBuilding = new JMenuItem(\"Cut: building\");\r\n\t\tui.editCutSurface = new JMenuItem(\"Cut: surface\");\r\n\t\tui.editPasteBuilding = new JMenuItem(\"Paste: building\");\r\n\t\tui.editPasteSurface = new JMenuItem(\"Paste: surface\");\r\n\t\tui.editCopyBuilding = new JMenuItem(\"Copy: building\");\r\n\t\tui.editCopySurface = new JMenuItem(\"Copy: surface\");\r\n\t\t\r\n\t\tui.editCutBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\tui.editCopyBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\tui.editPasteBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\t\r\n\t\tui.editCutBuilding.addActionListener(new Act() { @Override public void act() { doCut(false, true); } });\r\n\t\tui.editCutSurface.addActionListener(new Act() { @Override public void act() { doCut(true, false); } });\r\n\t\tui.editCopyBuilding.addActionListener(new Act() { @Override public void act() { doCopy(false, true); } });\r\n\t\tui.editCopySurface.addActionListener(new Act() { @Override public void act() { doCopy(true, false); } });\r\n\t\tui.editPasteBuilding.addActionListener(new Act() { @Override public void act() { doPaste(false, true); } });\r\n\t\tui.editPasteSurface.addActionListener(new Act() { @Override public void act() { doPaste(true, false); } });\r\n\t\t\r\n\t\tui.viewZoomIn = new JMenuItem(\"Zoom in\");\r\n\t\tui.viewZoomOut = new JMenuItem(\"Zoom out\");\r\n\t\tui.viewZoomNormal = new JMenuItem(\"Zoom normal\");\r\n\t\tui.viewBrighter = new JMenuItem(\"Daylight (1.0)\");\r\n\t\tui.viewDarker = new JMenuItem(\"Night (0.5)\");\r\n\t\tui.viewMoreLight = new JMenuItem(\"More light (+0.05)\");\r\n\t\tui.viewLessLight = new JMenuItem(\"Less light (-0.05)\");\r\n\t\t\r\n\t\tui.viewShowBuildings = new JCheckBoxMenuItem(\"Show/hide buildings\", renderer.showBuildings);\r\n\t\tui.viewShowBuildings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewSymbolicBuildings = new JCheckBoxMenuItem(\"Minimap rendering mode\", renderer.minimapMode);\r\n\t\tui.viewSymbolicBuildings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewTextBackgrounds = new JCheckBoxMenuItem(\"Show/hide text background boxes\", renderer.textBackgrounds);\r\n\t\tui.viewTextBackgrounds.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewTextBackgrounds.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleTextBackgrounds(); } });\r\n\t\t\r\n\t\tui.viewZoomIn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomIn(); } });\r\n\t\tui.viewZoomOut.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomOut(); } });\r\n\t\tui.viewZoomNormal.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomNormal(); } });\r\n\t\tui.viewShowBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleBuildings(); } });\r\n\t\tui.viewSymbolicBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleMinimap(); } });\r\n\t\t\r\n\t\tui.viewBrighter.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doBright(); } });\r\n\t\tui.viewDarker.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDark(); } });\r\n\t\tui.viewMoreLight.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doMoreLight(); } });\r\n\t\tui.viewLessLight.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doLessLight(); } });\r\n\t\t\r\n\t\tui.viewZoomIn.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD9, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewZoomOut.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD3, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewZoomNormal.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD0, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewMoreLight.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD8, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewLessLight.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD2, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewBrighter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD7, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewDarker.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD1, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewStandardFonts = new JCheckBoxMenuItem(\"Use standard fonts\", TextRenderer.USE_STANDARD_FONTS);\r\n\t\t\r\n\t\tui.viewStandardFonts.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoStandardFonts();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.viewPlacementHints = new JCheckBoxMenuItem(\"View placement hints\", renderer.placementHints);\r\n\t\tui.viewPlacementHints.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoViewPlacementHints();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.helpOnline = new JMenuItem(\"Online wiki...\");\r\n\t\tui.helpOnline.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdoHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.helpAbout = new JMenuItem(\"About...\");\r\n\t\tui.helpAbout.setEnabled(false); // TODO implement\r\n\t\t\r\n\t\tui.languageMenu = new JMenu(\"Language\");\r\n\t\t\r\n\t\tui.languageEn = new JRadioButtonMenuItem(\"English\", true);\r\n\t\tui.languageEn.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tsetLabels(\"en\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.languageHu = new JRadioButtonMenuItem(\"Hungarian\", false);\r\n\t\tui.languageHu.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tsetLabels(\"hu\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tButtonGroup bg = new ButtonGroup();\r\n\t\tbg.add(ui.languageEn);\r\n\t\tbg.add(ui.languageHu);\r\n\t\t\r\n\t\tui.fileRecent = new JMenu(\"Recent\");\r\n\t\tui.clearRecent = new JMenuItem(\"Clear recent\");\r\n\t\tui.clearRecent.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoClearRecent();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddAll(ui.fileRecent, ui.clearRecent);\r\n\t\t\r\n\t\taddAll(mainmenu, ui.fileMenu, ui.editMenu, ui.viewMenu, ui.languageMenu, ui.helpMenu);\r\n\t\taddAll(ui.fileMenu, ui.fileNew, null, ui.fileOpen, ui.fileRecent, ui.fileImport, null, ui.fileSave, ui.fileSaveAs, null, ui.fileExit);\r\n\t\taddAll(ui.editMenu, ui.editUndo, ui.editRedo, null, \r\n\t\t\t\tui.editCut, ui.editCopy, ui.editPaste, null, \r\n\t\t\t\tui.editCutBuilding, ui.editCopyBuilding, ui.editPasteBuilding, null, \r\n\t\t\t\tui.editCutSurface, ui.editCopySurface, ui.editPasteSurface, null, \r\n\t\t\t\tui.editPlaceMode, null, ui.editDeleteBuilding, ui.editDeleteSurface, ui.editDeleteBoth, null, \r\n\t\t\t\tui.editClearBuildings, ui.editClearSurface, null, ui.editPlaceRoads, null, ui.editResize, ui.editCleanup);\r\n\t\taddAll(ui.viewMenu, ui.viewZoomIn, ui.viewZoomOut, ui.viewZoomNormal, null, \r\n\t\t\t\tui.viewBrighter, ui.viewDarker, ui.viewMoreLight, ui.viewLessLight, null, \r\n\t\t\t\tui.viewShowBuildings, ui.viewSymbolicBuildings, ui.viewTextBackgrounds, ui.viewStandardFonts, ui.viewPlacementHints);\r\n\t\taddAll(ui.helpMenu, ui.helpOnline, null, ui.helpAbout);\r\n\t\t\r\n\t\taddAll(ui.languageMenu, ui.languageEn, ui.languageHu);\r\n\t\t\r\n\t\tui.fileNew.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdoNew();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.toolbar = new JToolBar(\"Tools\");\r\n\t\tContainer c = getContentPane();\r\n\t\tc.add(ui.toolbar, BorderLayout.PAGE_START);\r\n\r\n\t\tui.toolbarCut = createFor(\"res/Cut24.gif\", \"Cut\", ui.editCut, false);\r\n\t\tui.toolbarCopy = createFor(\"res/Copy24.gif\", \"Copy\", ui.editCopy, false);\r\n\t\tui.toolbarPaste = createFor(\"res/Paste24.gif\", \"Paste\", ui.editPaste, false);\r\n\t\tui.toolbarRemove = createFor(\"res/Remove24.gif\", \"Remove\", ui.editDeleteBuilding, false);\r\n\t\tui.toolbarUndo = createFor(\"res/Undo24.gif\", \"Undo\", ui.editUndo, false);\r\n\t\tui.toolbarRedo = createFor(\"res/Redo24.gif\", \"Redo\", ui.editRedo, false);\r\n\t\tui.toolbarPlacementMode = createFor(\"res/Down24.gif\", \"Placement mode\", ui.editPlaceMode, true);\r\n\r\n\t\tui.toolbarUndo.setEnabled(false);\r\n\t\tui.toolbarRedo.setEnabled(false);\r\n\t\t\r\n\t\tui.toolbarNew = createFor(\"res/New24.gif\", \"New\", ui.fileNew, false);\r\n\t\tui.toolbarOpen = createFor(\"res/Open24.gif\", \"Open\", ui.fileOpen, false);\r\n\t\tui.toolbarSave = createFor(\"res/Save24.gif\", \"Save\", ui.fileSave, false);\r\n\t\tui.toolbarImport = createFor(\"res/Import24.gif\", \"Import\", ui.fileImport, false);\r\n\t\tui.toolbarSaveAs = createFor(\"res/SaveAs24.gif\", \"Save as\", ui.fileSaveAs, false);\r\n\t\tui.toolbarZoomNormal = createFor(\"res/Zoom24.gif\", \"Zoom normal\", ui.viewZoomNormal, false);\r\n\t\tui.toolbarZoomIn = createFor(\"res/ZoomIn24.gif\", \"Zoom in\", ui.viewZoomIn, false);\r\n\t\tui.toolbarZoomOut = createFor(\"res/ZoomOut24.gif\", \"Zoom out\", ui.viewZoomOut, false);\r\n\t\tui.toolbarBrighter = createFor(\"res/TipOfTheDay24.gif\", \"Daylight\", ui.viewBrighter, false);\r\n\t\tui.toolbarDarker = createFor(\"res/TipOfTheDayDark24.gif\", \"Night\", ui.viewDarker, false);\r\n\t\tui.toolbarHelp = createFor(\"res/Help24.gif\", \"Help\", ui.helpOnline, false);\r\n\r\n\t\t\r\n\t\tui.toolbar.add(ui.toolbarNew);\r\n\t\tui.toolbar.add(ui.toolbarOpen);\r\n\t\tui.toolbar.add(ui.toolbarSave);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarImport);\r\n\t\tui.toolbar.add(ui.toolbarSaveAs);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarCut);\r\n\t\tui.toolbar.add(ui.toolbarCopy);\r\n\t\tui.toolbar.add(ui.toolbarPaste);\r\n\t\t\r\n\t\tui.toolbar.add(ui.toolbarRemove);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarUndo);\r\n\t\tui.toolbar.add(ui.toolbarRedo);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarPlacementMode);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarZoomNormal);\r\n\t\tui.toolbar.add(ui.toolbarZoomIn);\r\n\t\tui.toolbar.add(ui.toolbarZoomOut);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarBrighter);\r\n\t\tui.toolbar.add(ui.toolbarDarker);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarHelp);\r\n\t\t\r\n\t}", "public Menu() {\n mainMenuScene = createMainMenuScene();\n mainMenu();\n }", "public JMenuBar createMenuBar() {\n JMenuBar menubar = new JMenuBar();\n menuFlows = new JMenu(\"Flows\");\n menubar.add(menuFlows);\n JMenuItem quitMenuItem = new JMenuItem(\"Quit\");\n\tquitMenuItem.addActionListener(new ActionListener() {\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t System.out.println(\"Quitting\");\n\t\t frame.dispose();\n\t\t System.exit(0);\n\t\t}\n\t });\n\tmenuFlows.add(quitMenuItem);\n return menubar;\n }", "private static void mainMenuLines(){\n setMenuLines(\"\",4,6,7,8,9,10,11,12,13,14,15,16,17,18,19);\n setMenuLines(\"Welcome to Ben's CMR program.\",1);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"help\" + ANSI_RESET + \" for a list of valid commands!\",20);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"exit\" + ANSI_RESET + \" to close the application!\",21);\n }", "protected void initialize() {\n\t\tthis.initializeFileMenu();\n\t\tthis.initializeEditMenu();\n\t\tthis.initializeNavigationMenu();\n\t\tthis.initializeHelpMenu();\n\t}", "public void makeMenuBar(final List<Action> theToolActions, final DrawingPanel thePanel) {\r\n add(fileMenu(thePanel));\r\n add(optionMenu(thePanel));\r\n add(toolsMenu(theToolActions));\r\n add(helpMenu());\r\n }", "private void construireMenuBar() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tthis.setJMenuBar(menuBar);\r\n\t\t\r\n\t\tJMenu menuFichier = new JMenu(\"Fichier\");\r\n\t\tmenuBar.add(menuFichier);\r\n\t\t\r\n\t\tJMenuItem itemCharger = new JMenuItem(\"Charger\", new ImageIcon(this.getClass().getResource(\"/images/charger.png\")));\r\n\t\tmenuFichier.add(itemCharger);\r\n\t\titemCharger.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemCharger.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tJFileChooser fc = new JFileChooser();\r\n\t\t\t\tfc.setDialogTitle(\"Sélectionnez le circuit à charger\");\r\n\t\t\t\tint returnVal = fc.showOpenDialog(EditeurCircuit.this);\r\n\t\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t\tFile file = fc.getSelectedFile();\r\n\t\t\t\t\tCircuit loadedTrack = (Circuit)Memento.objLoading(file);\r\n\t\t\t\t\tfor(IElement elem : loadedTrack) {\r\n\t\t\t\t\t\telem.setEditeurCircuit(EditeurCircuit.this);\r\n\t\t\t\t\t\tCircuit.getInstance().addElement(elem);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tCircuit.getInstance().estValide();\r\n\t\t\t\t\tEditeurCircuit.this.paint(EditeurCircuit.this.getGraphics());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJMenuItem itemSauvegarder = new JMenuItem(\"Sauvegarder\", new ImageIcon(this.getClass().getResource(\"/images/disquette.png\")));\r\n\t\tmenuFichier.add(itemSauvegarder);\r\n\t\titemSauvegarder.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemSauvegarder.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif(Circuit.getInstance().estValide()) {\r\n\t\t\t\t\tJFileChooser fc = new JFileChooser();\r\n\t\t\t\t\tfc.setDialogTitle(\"Sélectionnez le fichier de destination\");\r\n\t\t\t\t\tint returnVal = fc.showSaveDialog(EditeurCircuit.this);\r\n\t\t\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t\t\tFile file = fc.getSelectedFile();\r\n\t\t\t\t\t\tint returnConfirm = JFileChooser.APPROVE_OPTION;\r\n\t\t\t\t\t\tif(file.exists()) {\r\n\t\t\t\t\t\t\tString message = \"Le fichier \"+file.getName()+\" existe déjà : voulez-vous le remplacer ?\";\r\n\t\t\t\t\t\t\treturnConfirm = JOptionPane.showConfirmDialog(EditeurCircuit.this, message, \"Fichier existant\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(returnConfirm == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t\t\t\tnew Memento(Circuit.getInstance(),file);\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\telse {\r\n\t\t\t\t\tString messageErreur;\r\n\t\t\t\t\tif(Circuit.getInstance().getElementDepart() == null) {\r\n\t\t\t\t\t\tmessageErreur = \"Le circuit doit comporter un élément de départ.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tmessageErreur = \"Le circuit doit être fermé.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tJOptionPane.showMessageDialog(EditeurCircuit.this,messageErreur,\"Erreur de sauvegarde\",JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmenuFichier.addSeparator();\r\n\t\t\r\n\t\tJMenuItem itemQuitter = new JMenuItem(\"Quitter\", new ImageIcon(this.getClass().getResource(\"/images/quitter.png\")));\r\n\t\tmenuFichier.add(itemQuitter);\r\n\t\titemQuitter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemQuitter.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEditeurCircuit.this.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJMenu menuEdition = new JMenu(\"Edition\");\r\n\t\tmenuBar.add(menuEdition);\r\n\t\t\r\n\t\tJMenuItem itemChangerTailleGrille = new JMenuItem(\"Changer la taille de la grille\", new ImageIcon(this.getClass().getResource(\"/images/resize.png\")));\r\n\t\tmenuEdition.add(itemChangerTailleGrille);\r\n\t\titemChangerTailleGrille.setAccelerator( KeyStroke.getKeyStroke(KeyEvent.VK_N,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemChangerTailleGrille.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEditeurCircuit.this.dispose();\r\n\t\t\t\tnew MenuEditeurCircuit();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJMenuItem itemNettoyerGrille = new JMenuItem(\"Nettoyer la grille\", new ImageIcon(this.getClass().getResource(\"/images/clear.png\")));\r\n\t\tmenuEdition.add(itemNettoyerGrille);\r\n\t\titemNettoyerGrille.setAccelerator( KeyStroke.getKeyStroke(KeyEvent.VK_C,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemNettoyerGrille.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEditeurCircuit.this.construireGrilleParDefaut();\r\n\t\t\t\tEditeurCircuit.this.repaint();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }", "private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}", "private void createMenus() {\r\n\t\t// File menu\r\n\t\tmenuFile = new JMenu(Constants.C_FILE_MENU_TITLE);\r\n\t\tmenuBar.add(menuFile);\r\n\t\t\r\n\t\tmenuItemExit = new JMenuItem(Constants.C_FILE_ITEM_EXIT_TITLE);\r\n\t\tmenuItemExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tactionOnClicExit();\t\t// Action triggered when the Exit item is clicked.\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuFile.add(menuItemExit);\r\n\t\t\r\n\t\t// Help menu\r\n\t\tmenuHelp = new JMenu(Constants.C_HELP_MENU_TITLE);\r\n\t\tmenuBar.add(menuHelp);\r\n\t\t\r\n\t\tmenuItemHelp = new JMenuItem(Constants.C_HELP_ITEM_HELP_TITLE);\r\n\t\tmenuItemHelp.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemHelp);\r\n\t\t\r\n\t\tmenuItemAbout = new JMenuItem(Constants.C_HELP_ITEM_ABOUT_TITLE);\r\n\t\tmenuItemAbout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicAbout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemAbout);\r\n\t\t\r\n\t\tmenuItemReferences = new JMenuItem(Constants.C_HELP_ITEM_REFERENCES_TITLE);\r\n\t\tmenuItemReferences.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicReferences();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemReferences);\r\n\t}", "public MenuPrincipal() {\n initComponents();\n \n }", "protected void initializeNavigationMenu() {\n\t\tfinal JMenu navigationMenu = new JMenu(\"Navigation\");\n\t\tthis.add(navigationMenu);\n\t\t// Revert to Picked\n\t\tfinal JMenuItem revertPickedItem = new JMenuItem();\n\t\trevertPickedItem.setAction(this.commands\n\t\t\t\t.findById(GUICmdGraphRevert.DEFAULT_ID));\n\t\trevertPickedItem.setAccelerator(KeyStroke.getKeyStroke('R',\n\t\t\t\tInputEvent.ALT_DOWN_MASK));\n\t\tnavigationMenu.add(revertPickedItem);\n\t}", "@FXML\n private void initialize() {\n \tassert getMainMenu() != null : \"fx:id=\\\"mainMenu\\\" was not injected: check your FXML file 'RootLayout.fxml'.\";\n \tmessages = Messages.getMessages();\n \tMenu settingsMenu = new Menu(messages.getString(\"menu_settings\"));\n \tMenu menuLanguage = new Menu(messages.getString(\"menu_language\"));\n \t\n \tfinal ToggleGroup groupLanguage = new ToggleGroup();\n \tfinal Entry<String, Locale>[] languages = new Entry [] {\n \t\t\tnew SimpleEntry<String, Locale>(\"English\", Messages.enLocale),\n \t\t\tnew SimpleEntry<String, Locale>(\"Slovak\", Messages.skLocale)\n \t};\n \tfor (Entry<String, Locale> language : languages) {\n \t RadioMenuItem itemEffect = new RadioMenuItem(language.getKey());\n \t itemEffect.setSelected((language.getValue()).equals(messages.getLocale()));\n \t itemEffect.setOnAction(handleLanguage(language.getValue()));\n \t itemEffect.setToggleGroup(groupLanguage);\n \t menuLanguage.getItems().add(itemEffect);\n \t}\n \t\n \tsettingsMenu.getItems().add(menuLanguage);\n \tsettingsMenu.getItems().add(new SeparatorMenuItem());\n \t\n \tMenuItem aboutItem = new MenuItem(messages.getString(\"menu_about\"));\n \taboutItem.setOnAction(handleAbout());\n\n \tsettingsMenu.getItems().add(aboutItem);\n \tgetMainMenu().getMenus().add(settingsMenu);\n \n }", "private void initRootMenuCustomers() {\n\t\tthis.menuBar = new MenuBar();\n\n\t\t// create entries for the menu bar\n\t\tMenu menuFile = new Menu(\"Datei\");\n\t\tMenu menuEdit = new Menu(\"Bearbeiten\");\n\t\tMenu menuCreate = new Menu(\"Erstellen\");\n\t\tMenu menuHelp = new Menu(\"Hilfe\");\n\n\t\t// create entries for menuFile\n\t\t// TODO: setOnAction handling\n\t\tMenuItem save = new MenuItem(\"Kundendatei in Datei speichern\");\n\t\tMenuItem saveas = new MenuItem(\"Kundendatei Speichern unter...\");\n\t\tMenuItem load = new MenuItem(\"Kundendatei Laden...\");\n\t\tMenuItem exit = new MenuItem(\"Beenden\");\n\t\texit.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tmenuFile.getItems().addAll(save, saveas, load, new SeparatorMenuItem(), exit);\n\n\t\t// TODO: setOnAction handling\n\t\tMenuItem newCustomer = new MenuItem(\"Neuen Kunden anlegen\");\n\t\tnewCustomer.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tshowNewCustomerView(false, null);\n\t\t\t}\n\t\t});\n\n\t\t// TODO: Implement this\n\t\tMenuItem edit = new MenuItem(\"Kundendaten bearbeiten\");\n\t\tedit.setOnAction(new EventHandler<ActionEvent>(){\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent t){\n\t\t\t\tif (overviewCtrl.getActCustomer() != null){\n\t\t\t\t\tshowNewCustomerView(true, overviewCtrl.getActCustomer());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tMenuItem delete = new MenuItem(\"Kundendaten löschen\");\n\t\tdelete.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tif (overviewCtrl.getActCustomer() != null) {\n\t\t\t\t\tdeleteCustomer(overviewCtrl.getActCustomer());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tmenuEdit.getItems().addAll(newCustomer, edit, delete);\n\n\t\t// create entries for menuCreate\n\t\t// TODO: setOnAction handling\n\t\tMenuItem invoice = new MenuItem(\"Rechnung\");\n\t\tinvoice.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tif (GUIMain.this.overviewCtrl.getActCustomer() == null) {\n\t\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\t\talert.setTitle(\"Fehler\");\n\t\t\t\t\talert.setHeaderText(\"Kein Kunde gewählt\");\n\t\t\t\t\talert.setContentText(\"Bitte wählen sie vor dem Erstellen einer Rechnung einen Kunden aus, \"\n\t\t\t\t\t\t\t+ \"an welchen die Rechnung gestellt werden soll.\");\n\t\t\t\t\talert.showAndWait();\n\t\t\t\t} else {\n\t\t\t\t\tshowNewInvoiceView();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// TODO: Implement this\n\t\tMenuItem offer = new MenuItem(\"Angebot\");\n\n\t\t// TODO: Implement this\n\t\tMenuItem reminder = new MenuItem(\"Zahlungserinnerung\");\n\n\t\tmenuCreate.getItems().addAll(invoice, offer, reminder);\n\n\t\t// create entries for menuHelp\n\t\t// TODO: setOnAction handling\n\t\tMenuItem help = new MenuItem(\"Hilfe\");\n\t\tMenuItem about = new MenuItem(\"Über\");\n\t\tmenuHelp.getItems().addAll(help, about);\n\n\t\tmenuBar.getMenus().addAll(menuFile, menuEdit, menuCreate, menuHelp);\n\n\t\tthis.root.setTop(menuBar);\n\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 }" ]
[ "0.8545372", "0.83951116", "0.8260656", "0.8166428", "0.8152818", "0.8070325", "0.8006906", "0.7929792", "0.79161924", "0.7907496", "0.78825736", "0.78205115", "0.7800248", "0.7694537", "0.76273406", "0.75461435", "0.7489126", "0.74726075", "0.74687463", "0.7462105", "0.73892385", "0.73760486", "0.737027", "0.73515874", "0.7344862", "0.7320664", "0.7317442", "0.7312538", "0.7290038", "0.7285358", "0.7262765", "0.7236581", "0.7233331", "0.7211686", "0.72056663", "0.7186101", "0.715598", "0.71376073", "0.71297634", "0.7104223", "0.710192", "0.71014655", "0.7071537", "0.70658296", "0.7064587", "0.7064587", "0.7064587", "0.70378923", "0.6992855", "0.69833136", "0.6971749", "0.6958259", "0.6954607", "0.6954309", "0.69538146", "0.69520247", "0.693014", "0.69016457", "0.68998104", "0.6899151", "0.6896101", "0.6888711", "0.6876807", "0.6870494", "0.6869761", "0.6868202", "0.6859634", "0.6850348", "0.68474525", "0.6844825", "0.68173903", "0.6814991", "0.6807701", "0.67986363", "0.6786889", "0.6782691", "0.6775144", "0.67701656", "0.67623115", "0.674254", "0.67406106", "0.67372453", "0.6734816", "0.6733659", "0.67329454", "0.6719582", "0.6702225", "0.6686899", "0.66612196", "0.6660582", "0.6657514", "0.66473854", "0.6644372", "0.66413796", "0.66330934", "0.6625095", "0.66214955", "0.6620221", "0.66181195", "0.66171867" ]
0.73822814
21
This method initializes paneDisplay
public JPanel getPaneDisplay() { if (paneDisplay == null) { paneDisplay = new JPanel(); paneDisplay.setLayout(new CardLayout()); paneDisplay.setName("paneDisplay"); paneDisplay.add(getWorkbench(), getWorkbench().getName()); } return paneDisplay; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initPane() {\n\t\tContainer localContainer = getContentPane();\n\t\tlocalContainer.setLayout(new BorderLayout());\n\t\t\n\t\tsplitpane_left_top.setBorder(BorderFactory.createTitledBorder(\"Training Data\"));\n\t\tsplitpane_left_bottom.setBorder(BorderFactory.createTitledBorder(\"Tree View\"));\n\t\tsplitpane_left.setDividerLocation(400);\n\t\tsplitpane_left.setLastDividerLocation(0);\n\t\tsplitpane_left.setOneTouchExpandable(true);\n\t\tsplitpane_right.setBorder(BorderFactory.createTitledBorder(\"Classifer Output\"));\n\t\tsplitpane_main.setDividerLocation(500);\n\t\tsplitpane_main.setLastDividerLocation(0);\n\t\tsplitpane_main.setOneTouchExpandable(true);\n\t\tlocalContainer.add(splitpane_main, \"Center\");\n\t\tlocalContainer.add(statusPanel,BorderLayout.SOUTH);\n\t}", "public void init()\n {\n buildUI(getContentPane());\n }", "public void initialize() {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(548, 372));\n this.add(getTitlePane(), new com.ulcjava.base.application.GridBagConstraints(0, 0, 3, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getXpertIvyPane(), new com.ulcjava.base.application.GridBagConstraints(0, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getLicensePane(), new com.ulcjava.base.application.GridBagConstraints(0, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getDatabasePane(), new com.ulcjava.base.application.GridBagConstraints(0, 3, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getJavaPane(), new com.ulcjava.base.application.GridBagConstraints(0, 4, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n }", "public void initialPanes()\r\n\t{\n\t\t\t\tlmg.setLayout(null);\r\n\t\t\t\tlmg.setBounds(0, 0, 1280, 720);\r\n\t\t\t\t\r\n\t\t//adding child panes\r\n\t\t\t\t//World background pane\r\n\t\t\t\t\tlmg.add(wB, new Integer(0));\r\n\t\t\t\t//World pane\r\n\t\t\t\t\tlmg.add(w, new Integer(1));\r\n\t\t\t\t\t\r\n\t\t//DisplayPanel adds the layered pane which holds all child pane\r\n\t\t\t\tadd(lmg);\r\n\t}", "private void initLayoutComponents()\n {\n viewPaneWrapper = new JPanel(new CardLayout());\n viewPane = new JTabbedPane();\n crawlPane = new JPanel(new BorderLayout());\n transitionPane = new JPanel();\n searchPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n resultsPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n }", "public void initView() {\n JPanel pane= new JPanel();\n panel = new JPanel();\n this.getFile(pane);\n JScrollPane scp = new JScrollPane(pane);\n scp.setPreferredSize(new Dimension(500, 280));\n scp.setVisible(true);\n enter.setPreferredSize(new Dimension(100, 50));\n enter.setVisible(true);\n enter.setActionCommand(\"enter\");\n enter.addActionListener(this);\n send.setPreferredSize(new Dimension(80, 50));\n send.setVisible(true);\n send.setActionCommand(\"sendOptions\");\n send.addActionListener(this);\n send.setEnabled(true);\n back.setVisible(true);\n back.setActionCommand(\"back\");\n back.addActionListener(this);\n back.setPreferredSize(new Dimension(80, 50));\n \n panel.add(scp);\n panel.add(send);\n panel.add(enter);\n panel.add(back);\n Launch.frame.add(panel);\n }", "private void initPane(Container pane){\n\n\t\tif(!(pane.getLayout() instanceof BorderLayout)){\n\t\t\tpane.add(new JLabel(\"Container doesn't use BorderLayout!\"));\n\t\t\treturn;\n\t\t}\n\n\t\tpane.setBackground(Color.DARK_GRAY);\n\n\t\tif(!DEVELOPMENT_MODE){\n\t\t\t// Transparent 16 x 16 pixel cursor image\n\t\t\tBufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);\n\t\t\t// Create a new blank cursor\n\t\t\tCursor blankCursor = Toolkit.getDefaultToolkit().createCustomCursor(cursorImg, new Point(0, 0), \"blank cursor\");\n\t\t\t// Set the blank cursor to the JFrame\n\t\t\tpane.setCursor(blankCursor);\n\t\t}\n\n//\t\tWebcam webcam = Webcam.getDefault();\n//\t\twebcam.setViewSize(WebcamResolution.QVGA.getSize());\n\n//\t\twebcamPanel = new WebcamPanel(webcam);\n//\t\twebcamPanel.setFPSDisplayed(true);\n//\t\twebcamPanel.setDisplayDebugInfo(true);\n//\t\twebcamPanel.setImageSizeDisplayed(true);\n//\t\twebcamPanel.setFPSLimit(FRAMERATE);\n//\n//\t\tpane.add(webcamPanel);\n//\n//\t\twebcamPanel.add(new JLabel(\"Hello world!\"));\n\n\t\tvideoContainer = new JLabel((ImageIcon)null); // Will be initialised later\n\t\tvideoContainer.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tvideoContainer.setFont(FONT);\n\t\tvideoContainer.setForeground(new Color(0xff6655));\n\t\tvideoContainer.setText(\"Camera error!\");\n\n\t\tpane.add(videoContainer);\n\n\t}", "private void initialiseUI()\n { \n // The actual data go in this component.\n String defaultRootElement = \"icr:regionSetData\";\n JPanel contentPanel = initialiseContentPanel(defaultRootElement);\n pane = new JScrollPane(contentPanel);\n \n panelLayout = new GroupLayout(this);\n\t\tthis.setLayout(panelLayout);\n\t\tthis.setBackground(DAOConstants.BG_COLOUR);\n\n\t\tpanelLayout.setAutoCreateContainerGaps(true);\n\n panelLayout.setHorizontalGroup(\n\t\t\tpanelLayout.createParallelGroup()\n\t\t\t.addComponent(pane, 10, 520, 540)\n );\n\n panelLayout.setVerticalGroup(\n\t\t\tpanelLayout.createSequentialGroup()\n .addComponent(pane, 10, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)\n );\n }", "private void initialize() {\r\n this.setSize(new Dimension(666, 723));\r\n this.setContentPane(getJPanel());\r\n\t\t\t\r\n\t}", "public void displayTestPane() {\n mainWindow.setContent(new TestPane());\n console = null;\n }", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "private void setupPanel()\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tqueryButton = new JButton(\"query\");\n\t\tthis.add(queryButton);\n\t\tthis.add(displayPane);\n\t\tdisplayArea = new JTextArea(10,30);\n\t\tadd(displayArea);\n\t\t\n\t\t\n\t}", "private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}", "public void initCon() {\n\t\t\n\t\t//ImageIcon icon = new ImageIcon(this.getClass().getResource(\"lib/data/icon/log.png\"));\n\t\t//txtArea.setLineWrap(true);\n\t\ttxtArea = new JTextArea(16,70);\n\t\t//txtArea.setLineWrap(true);\n\t\tJTabbedPane tPane = new JTabbedPane();\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane(txtArea); \n\t\t\n\t\t\n\t\tJPanel top = new JPanel();\n\t\tJPanel center = new JPanel();\n\t\t\n\t\tbottom = new JPanel();\n\t\tColor color = UIManager.getColor ( \"Panel.background\" );\n\t\t\n\t\ttop.add( scrollPane );\n\t\ttPane.addTab(\"Console\", top);\n\t\t\n\t\t\n\t\t//set colors\n\t\treadout.setBackground(color);\n\t\ttop.setBackground(color);\n\t\tcenter.setBackground(color);\n\t\tbottom.setBackground(color);\n\t\t//.setOpaque(true);\n\t\t\n\t\tbottom.setLayout(new GridLayout(1,2));\n\t\tbottom.add(readout);\n\t\tcenter.setLayout(new GridLayout(2,1));\n\t\tadd(center, BorderLayout.CENTER);\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\tadd(tPane, BorderLayout.NORTH);\n\t}", "private void initBaseLayout()\n {\n add(viewPaneWrapper, BorderLayout.CENTER);\n \n currentLayoutView = VIEW_PANE;\n currentSearchView = SEARCH_PANE_VIEW;\n showMainView(VIEW_PANE);\n showSearchView(currentSearchView);\n }", "private void initComponents() {\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n }", "void init() {\n setVisible(true);\n\n }", "private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }", "private void setupDisplay() {\n sizeFirstField_.setText(Double.toString(af_.SIZE_FIRST));\n numFirstField_.setText(Double.toString(af_.NUM_FIRST));\n sizeSecondField_.setText(Double.toString(af_.SIZE_SECOND));\n numSecondField_.setText(Double.toString(af_.NUM_SECOND));\n cropSizeField_.setText(Double.toString(af_.CROP_SIZE));\n thresField_.setText(Double.toString(af_.THRES));\n channelField1_.setText(af_.CHANNEL1);\n channelField2_.setText(af_.CHANNEL2);\n }", "public void init() {\n setLayout(new BorderLayout());\n }", "public Display() {\n initComponents();\n }", "private void initialize() {\r\n this.setSize(new Dimension(374, 288));\r\n this.setContentPane(getJPanel());\r\n this.setResizable(false);\r\n this.setModal(true);\r\n this.setTitle(\"颜色选择面板\");\r\n addJPanel();\r\n\t}", "public PaneOrganizer() {\n\t\t\n\t\t_root = new BorderPane();\n\t\t_game = new Game(_root);\n\t\tthis.setupButton();\n\t\t\n\t}", "private void initComponents() {\n\n scenePanel = new javax.swing.JPanel();\n\n setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.PAGE_AXIS));\n\n scenePanel.setLayout(new javax.swing.BoxLayout(scenePanel, javax.swing.BoxLayout.LINE_AXIS));\n add(scenePanel);\n }", "public ReportPane() {\n initComponents();\n }", "public NavigatorPane() {\n _initNewLayer(_symbolLayer);\n _rebuildLayerArray();\n }", "private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}", "private void initView() {\r\n\t\tviewerGraz.refresh(true);\r\n\t\tviewerGraz.refresh(true);\r\n\t\tviewerKapfenberg.refresh(true);\r\n\t\tviewerLeoben.refresh(true);\r\n\t\tviewerMariazell.refresh(true);\r\n\t\tviewerWien.refresh(true);\r\n\t}", "private void initialize() {\n\t\tthis.setSize(629, 270);\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setPreferredSize(new Dimension(629, 270));\n\t\tthis.setMinimumSize(new Dimension(629, 270));\n\t\tthis.setMaximumSize(new Dimension(629, 270));\n\t\tthis.add(getJSplitPane2(), BorderLayout.CENTER);\n\t}", "private void initializePanels() {\n queueInfoPanel.setBackground(new Color(236, 125, 51));\n queueButtonsPanel.setBackground(new Color(93, 118, 161));\n createLabelForPanel(queueInfoPanel);\n createButtonsForPanel(queueButtonsPanel);\n }", "private void initUI() {\n\t\tStage stage = Stage.createStage();\n\n\t\tControl formPanel = buildFormTestTab();\n\n\t\tControl cellPanel = buildCellTestTab();\n\t\t\n\t\tTabPanel tabbedPane = new TabPanel();\n\t\ttabbedPane.add(\"Form Test\", formPanel);\n\t\ttabbedPane.add(\"Cell Layout Test\", cellPanel);\n\n\t\tstage.setContent(tabbedPane);\n\t}", "private void initializePresentation() {\r\n viewRankingAttemptFX = new ViewRankingAttemptFX(this);\r\n viewRankingPlayerFX = new ViewRankingPlayerFX(this);\r\n viewLoginFX = new ViewLoginFX(this);\r\n viewRegisterFX = new ViewRegisterFX(this);\r\n viewProblemListFX = new ViewProblemListFX(this);\r\n viewLoginFX = new ViewLoginFX(this);\r\n viewRegisterFX = new ViewRegisterFX(this);\r\n viewMenuFX = new ViewMenuFX(this);\r\n viewSettingsFX = new ViewSettingsFX(this);\r\n viewGenerateFX = new ViewGenerateFX(this);\r\n viewAttemptFX = new ViewAttemptFX(this);\r\n viewAttemptListFX = new ViewAttemptListFX(this);\r\n\r\n viewsFX.add(viewLoginFX);\r\n viewsFX.add(viewRankingAttemptFX);\r\n viewsFX.add(viewRankingPlayerFX);\r\n viewsFX.add(viewRegisterFX);\r\n viewsFX.add(viewProblemListFX);\r\n viewsFX.add(viewMenuFX);\r\n viewsFX.add(viewSettingsFX);\r\n viewsFX.add(viewGenerateFX);\r\n viewsFX.add(viewAttemptFX);\r\n viewsFX.add(viewAttemptListFX);\r\n\r\n }", "private void initialize()\n\t{\n\t\tthis.setModal(true);\t\t\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(450,400);\n\t\tScreenResolution.centerComponent(this);\n\t}", "private void initialize() {\r\n\t\tthis.setSize(392, 496);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"Informações\");\r\n\t}", "private void initialize() {\n this.setSize(300, 200);\n this.setContentPane(getJContentPane());\n this.pack();\n }", "private void initialize() {\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(810, 600);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\t\tthis.setModal(true);\n\t\tthis.setResizable(false);\n\t\tthis.setName(\"FramePrincipalLR\");\n\t\tthis.setTitle(\"CR - Lista de Regalos\");\n\t\tthis.setLocale(new java.util.Locale(\"es\", \"VE\", \"\"));\n\t\tthis.setUndecorated(false);\n\t}", "public MainContentPane() {\r\n\t\tsuper();\r\n\r\n\t\t// Add design-time configured components.\r\n\t\tinitComponents();\r\n\t}", "private void initProcess(){\n this.getScPanelFriends().getViewport().setOpaque(false);\n this.getScPanelTopics().getViewport().setOpaque(false);\n this.getCenterPanel().setSize(0,0);\n this.getEastPanel().setSize(1700,800);\n //Administrador inhabilitado por defecto hasta implementación\n this.getBtnAdmin().setEnabled(false);\n this.getMenuOption().setLocationRelativeTo(this);\n }", "@Override\n\tpublic void setPane() {\n\t\tNewRecordPane RecListPane = new NewRecordPane();\n\t\trootPane = new HomePane(new MainLeftPane(),RecListPane);\n\t}", "@Override\n\tpublic void setPane() {\n\t\tNewSchedulePane SchListPane = new NewSchedulePane();\n\t\trootPane = new HomePane(new MainLeftPane(),SchListPane);\n\t}", "private void initPanel() {\n\t\tthis.panel = new JPanel();\n\t\tthis.panel.setBounds(5, 5, 130, 20);\n\t\tthis.panel.setLayout(null); \n\n\t}", "private void initComponents() {\n\t\tfiltersPanel = new FiltersPanel(mainView);\n\t\tdetailsPanel = new DetailsPanel();\n\t\t\n\t\tthis.setStylePrimaryName(\"variantdisplay\");\n\t\tthis.addWest(filtersPanel, 240);\n\n\t\tvarTable = new VarTable(this, colModel);\n\n\t\t\n\t\t//details panel listens to variant selection events generated by the varTable\n\t\tvarTable.addVariantSelectionListener(detailsPanel); \n\t\tvarManager.addListener(this);\n\t\tcolModel.addListener(this);\n\t\tfiltersPanel.addListener(this);\n\t\t\n\t\tthis.addSouth(detailsPanel, 300.0);\n\t\tthis.add(varTable);\n\t}", "private void setupLayout()\n {\n Container contentPane;\n\n setSize(300, 300); \n\n contentPane = getContentPane();\n\n // Layout this PINPadWindow\n }", "private void initialize() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setSize(300, 200);\n\t\tthis.add(getJScrollPane(), java.awt.BorderLayout.CENTER);\n\t}", "private void createUI() {\n\t\tthis.rootPane = new TetrisRootPane(true);\n\t\tthis.controller = new TetrisController(this, rootPane, getWorkingDirectory());\n\t\tthis.listener = new TetrisActionListener(controller, this, rootPane);\n\t\t\n\t\trootPane.setActionListener(listener);\n\t\trootPane.setGameComponents(controller.getGameComponent(), controller.getPreviewComponent());\n\t\trootPane.initialize();\n\t\t\n\t\tPanelBorder border = controller.getPlayer().getPanel().getPanelBorder(\"Tetris v\" + controller.getVersion());\n\t\tborder.setRoundedCorners(true);\n\t\tJPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));\n\t\tpanel.setBackground(getBackgroundColor(border.getLineColor()));\n\t\tpanel.setBorder(border);\n\t\tpanel.setPreferredSize(new Dimension(564, 551));\n\t\tpanel.add(rootPane);\n\t\trootPane.addPanelBorder(border, panel);\n\t\t\n\t\tthis.setContentPane(panel);\n\t\tthis.setSize(564, 550);\n\t\t\n\t\tcontroller.initializeUI();\n\t}", "public void initComponents() {\n\t\taddButton = new JButton(addFlightText);\n\t\tdelayButton = new JButton(delayFlightText);\n\t\tquitButton = new JButton(quitText);\n\t\t// TODO: Add button instanciations for other operations\n\n\t\t// Initialize display area\n\t\tdisplayArea = new JTextArea(LINE_COUNT, LINE_SIZE);\n\t\tdisplayArea.setEditable(false);\n\t\tscrollPane = new JScrollPane(displayArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,\n\t\t\t\tJScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t}", "private void initMainComponents() {\n\t\tsetBackground(Color.RED);\n\t\tsetTitle(\"TABL\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 974, 842);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(new Color(100, 149, 237));\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\t\n\t\tcontentPane.setVisible(true);\n\t\tcontentPane.setLayout(null);\n\t\t\n\t\t\n\t\tlayeredPane = new JLayeredPane();\n\t\tlayeredPane.setBounds(10, 40, 941, 757);\n\t\tcontentPane.add(layeredPane);\n\t\t\n\t\tsetForeground(Color.BLACK);\n\t\tsetIconImage(Toolkit.getDefaultToolkit().getImage(AdminManageUsers.class.getResource(\"/resources/Logo.PNG\")));\n\n\t}", "private void init() {\n setLayout(new BorderLayout());\n setBackground(ProgramPresets.COLOR_BACKGROUND);\n add(getTitlePanel(), BorderLayout.NORTH);\n add(getTextPanel(), BorderLayout.CENTER);\n add(getLinkPanel(), BorderLayout.SOUTH);\n }", "public void showPane(){\n\t\tpane.draw();\n\t}", "private void initialize() {\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\tthis.setBounds(new Rectangle(0, 0, 393, 177));\r\n\t\tthis.add(getBasePanel(), BorderLayout.CENTER);\r\n\r\n\t}", "public void initialize(){\t\t\n\n\t\tsetBounds(100, 100, 900, 620);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(SystemColor.control);\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tcontentPane.setLayout(null);\n\t\tsetLayout(null);\n\n\t\t//build the image of the board for toggling the active squares\n\t\t//buildBoardImage();\n\n\t\tboardView = new BoardView(new Color(20,200,160), model, 1, app);\n\t\tboardView.builderInitialize(app);\n\t\tboardView.setSize(408, 440);\n\t\tboardView.setLocation(39, 158);\n\t\tadd(boardView);\n\n\t\tcomboBox = new JComboBox<String>();\n\t\tcomboBox.setModel(new DefaultComboBoxModel<String>(new String[] {\"Puzzle\", \"Lightning\", \"Theme\"}));\n\t\tcomboBox.setToolTipText(\"\");\n\t\tcomboBox.setMaximumRowCount(3);\n\t\tcomboBox.setBounds(593, 158, 97, 26);\n\t\tcomboBox.addItemListener(this);\n\t\tthis.add(comboBox, \"ComboBox\");\n\n\t\tJLabel lblTitle = new JLabel(\"LetterCraze: Builder\");\n\t\tlblTitle.setFont(new Font(\"Impact\", Font.BOLD | Font.ITALIC, 40));\n\t\tlblTitle.setBounds(39, 11, 522, 109);\n\t\tadd(lblTitle);\n\n\t\tpnlLevelSwitch = new JPanel();\n\t\tpnlLevelSwitch.setName(\"pnlLevelSwitch\");\n\t\tpnlLevelSwitch.setBounds(479, 192, 379, 362);\n\t\tpnlLevelSwitch.setLayout(new CardLayout());\n\t\tadd(pnlLevelSwitch);\n\n\t\tJPanel pnlPuzzle = new BuilderPuzzlePanelView(labelFont);\n\t\tpnlLevelSwitch.add(pnlPuzzle, \"Puzzle\");\n\t\tpnlPuzzle.setBackground(new Color(102,255,102));\n\t\tpnlPuzzle.setLayout(null);\n\n\t\tJPanel pnlLightning = new BuilderLightningPanelView();\n\t\tpnlLightning.setBackground(Color.ORANGE);\n\t\tpnlLevelSwitch.add(pnlLightning, \"Lightning\");\n\t\tpnlLightning.setLayout(null);\n\n\n\t\tJPanel pnlTheme = new BuilderThemePanelView(labelFont);\n\t\tpnlTheme.setBackground(Color.PINK);\n\t\tpnlLevelSwitch.add(pnlTheme, \"Theme\");\n\t\tpnlTheme.setLayout(null);\n\n\t\tcontentPane.setVisible(true);\n\t\tcontentPane.repaint();\n\t\tJButton btnReset = new JButton(\"Reset Level\");\n\t\tbtnReset.addMouseListener(new ResetBoardSquaresController(this, model));\n\t\tbtnReset.setBounds(39, 118, 107, 29);\n\t\tadd(btnReset);\n\n\t\tJButton btnSaveLevel = new JButton(\"Save And Exit\");\n\t\tbtnSaveLevel.setBounds(156, 118, 111, 29);\n\t\tbtnSaveLevel.addMouseListener(new SaveLevelController(this, cardLayoutPanel, model));\n\t\t//btnSaveLevel.addMouseListener(new ExitWithoutSavingController(this, cardLayoutPanel, model));\n\t\tadd(btnSaveLevel);\n\n\t\tJLabel lblLevelType = new JLabel(\"Level Type\");\n\t\tlblLevelType.setFont(labelFont);\n\t\tlblLevelType.setBounds(491, 158, 92, 26);\n\t\tadd(lblLevelType);\n\n\t\tJButton btnCloseWithoutSaving = new JButton(\"Close Without Saving\");\n\t\t//TODO replace with close builder controller\n\t\tbtnCloseWithoutSaving.addMouseListener(new ExitWithoutSavingController(this, cardLayoutPanel, model));\n\t\tbtnCloseWithoutSaving.setBounds(273, 118, 174, 29);\n\t\tadd(btnCloseWithoutSaving);\n\t\t\n\t\tJButton btnPreviewLevel = new JButton(\"Show Me The Money!\");\n\t\tbtnPreviewLevel.addMouseListener(new PreviewLevelController(this, model, cardLayoutPanel));\n\t\tbtnPreviewLevel.setBounds(491, 118, 199, 29);\n\t\tadd(btnPreviewLevel);\n\t\trepaint();\n\t}", "private void init(){\r\n\t\tsetLayout(new FlowLayout());\r\n\t\tsetPreferredSize(new Dimension(40,40));\r\n\t\tsetVisible(true);\r\n\t}", "protected void setupUI() {\n\t\t\n\t\tcontentPane = new JPanel();\n\t\tlayerLayout = new CardLayout();\n\t\tcontentPane.setLayout(layerLayout);\n\t\tControlAgendaViewPanel agendaViewPanel = new ControlAgendaViewPanel(layerLayout,contentPane);\n\t\tagendaPanelFactory = new AgendaPanelFactory();\n\t\tdayView = agendaPanelFactory.getAgendaView(ActiveView.DAY_VIEW);\n\t\tweekView = agendaPanelFactory.getAgendaView(ActiveView.WEEK_VIEW);\n\t\tmonthView = agendaPanelFactory.getAgendaView(ActiveView.MONTH_VIEW);\n\t\t\n\t\tcontentPane.add(dayView,ActiveView.DAY_VIEW.name());\n\t\tcontentPane.add(weekView,ActiveView.WEEK_VIEW.name());\n\t\tcontentPane.add(monthView,ActiveView.MONTH_VIEW.name());\n\t\n\t\tJSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,agendaViewPanel, contentPane);\n\t\tthis.setContentPane(splitPane);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\t\n\t\t//MENU\n\t\tJMenu file, edit, help, view;\n\t\t\n\t\t//ITEM DE MENU\n\t\tJMenuItem load, quit, save;\n\t\tJMenuItem display, about;\n\t\tJMenuItem month, week, day;\n\t\t\n\t\t/* File Menu */\n\t\t/** EX4 : MENU : UTILISER L'AIDE FOURNIE DANS LE TP**/\n\t\t//Classe pour les listener des parties non implémentés\n\t\tclass MsgError implements ActionListener {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tJOptionPane.showMessageDialog(null, ApplicationSession.instance().getString(\"info\"), \"info\", JOptionPane.INFORMATION_MESSAGE, null);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t//Menu File\t\n\t\tfile = new JMenu(ApplicationSession.instance().getString(\"file\"));\n\t\t\n\t\tmenuBar.add(file);\n\t\tfile.setMnemonic(KeyEvent.VK_A);\n\t\tfile.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(file);\n\t\t\n\n\t\t//a group of JMenuItems\n\t\tload = new JMenuItem(ApplicationSession.instance().getString(\"load\"),KeyEvent.VK_T);\n\t\tload.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tload.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(load);\n\t\tload.addActionListener(new MsgError());\n\t\t\n\t\tquit = new JMenuItem(ApplicationSession.instance().getString(\"quit\"),KeyEvent.VK_T);\n\t\tquit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tquit.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(quit);\n\t\t\n\t\t//LISTENER QUIT\n\t\tquit.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\t//message box yes/no pour le bouton quitter\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsave = new JMenuItem(new String(ApplicationSession.instance().getString(\"save\")),KeyEvent.VK_T);\n\t\tsave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tsave.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(save);\n\t\tsave.addActionListener(new MsgError());\n\t\t\n\t\t\n\t//Menu Edit \n\t\tedit = new JMenu(new String(ApplicationSession.instance().getString(\"edit\")));\n\t\t\n\t\tmenuBar.add(edit);\n\t\tedit.setMnemonic(KeyEvent.VK_A);\n\t\tedit.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\t\n\t\t//Sous menu View\n\t\t\n\t\tview = new JMenu(new String(ApplicationSession.instance().getString(\"view\")));\n\t\tview.setMnemonic(KeyEvent.VK_A);\n\t\tview.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tedit.add(view);\n\t\t\n\t\tmonth = new JMenuItem(new String(ApplicationSession.instance().getString(\"month\")),KeyEvent.VK_T);\n\t\tmonth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmonth.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(month);\n\t\t\t\t\n\t\tweek = new JMenuItem(new String(ApplicationSession.instance().getString(\"week\")),KeyEvent.VK_T);\n\t\tweek.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tweek.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(week);\n\t\t\n\t\tday = new JMenuItem(new String(ApplicationSession.instance().getString(\"day\")),KeyEvent.VK_T);\n\t\tday.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tday.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(day);\n\t\t\n\t\t//LISTENER VIEW\n\t\t\n\t\t\n\t\tmonth.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.last(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tweek.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\tlayerLayout.next(contentPane);\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t});\n\t\tday.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\n\t//Menu Help\n\t\thelp = new JMenu(new String(ApplicationSession.instance().getString(\"help\")));\n\t\t\n\t\tmenuBar.add(help);\n\t\thelp.setMnemonic(KeyEvent.VK_A);\n\t\thelp.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(help);\n\t\t\n\t\tdisplay = new JMenuItem(new String(ApplicationSession.instance().getString(\"display\")),KeyEvent.VK_T);\n\t\tdisplay.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tdisplay.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(display);\n\t\tdisplay.addActionListener(new MsgError());\n\t\t\n\t\tabout = new JMenuItem(new String(ApplicationSession.instance().getString(\"about\")),KeyEvent.VK_T);\n\t\tabout.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tabout.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(about);\n\t\tabout.addActionListener(new MsgError());\n\t\t\n\t\t\n\n\t\tthis.setJMenuBar(menuBar);\n\t\tthis.pack();\n\t\tlayerLayout.next(contentPane);\n\t}", "private void initialize() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setSize(300,200);\n\t\tthis.add(getJPanel(), java.awt.BorderLayout.CENTER);\n\t\tthis.add(getJPanel1(), java.awt.BorderLayout.SOUTH);\n\t}", "private void init() {\n List<Contructor> list = servisContructor.getAllContructors();\n for (Contructor prod : list) {\n contructor.add(new ContructorViewer(prod));\n }\n\n Label label = new Label(\"Catalog Contructors\");\n label.setLayoutX(140);\n label.setLayoutY(20);\n label.setStyle(\"-fx-font-size:20px\");\n\n initTable();\n table.setLayoutX(120);\n table.setLayoutY(60);\n table.setStyle(\"-fx-font-size:16px\");\n\n GridPane control = new ControlPanel(this, 2).getPanel();\n control.setLayoutX(120);\n control.setLayoutY(300);\n\n panel.setAlignment(Pos.CENTER);\n panel.add(label, 0, 0);\n panel.add(table, 0, 1);\n panel.add(control, 0, 2);\n }", "private void initializePanels()\r\n\t{\r\n\t\tthis.subscribersPanel = new SubscribersPanel(DIMENSIONS);\r\n\t\tthis.consolePanel = new ConsolePanel(DIMENSIONS);\r\n\r\n\t\tthis.parametersPanel = new ParametersPanel(DIMENSIONS);\r\n\t\tthis.parametersPanel.setSize(DIMENSIONS);\r\n\r\n\t\tthis.mainPanel = new MainPanel(parametersPanel, this);\r\n\t\tthis.mainPanel.setSize(DIMENSIONS);\r\n\r\n\t\tshowParametersPanel();\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1000, 700);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tframeContent = new JPanel();\n\t\tframe.getContentPane().add(frameContent);\n\t\tframeContent.setBounds(10, 10, 700, 640);\n\t\tframeContent.setLayout(null);\n\t\t\n\t\tinfoPane = new JPanel();\n\t\tframe.getContentPane().add(infoPane);\n\t\tinfoPane.setBounds(710, 10, 300, 640);\n\t\tinfoPane.setLayout(null);\n\t}", "@Override\n public void initialize(RenderManager rm, ViewPort vp) {\n reshape(vp, vp.getCamera().getWidth(), vp.getCamera().getHeight());\n viewPort.setOutputFrameBuffer(fb);\n guiViewPort.setClearFlags(true, true, true);\n\n guiNode.attachChild(display1);\n guiNode.attachChild(display2);\n guiNode.attachChild(display3);\n guiNode.attachChild(display4);\n guiNode.updateGeometricState();\n }", "private void init() {\n this.currentStatus = false;\n\n // Instantiate both the left & the right panels.\n leftPanel = new LeftListPanel();\n rightPanel = new RightListPanel();\n // Initialize the splitPane with left & right panels.\n splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPanel, rightPanel);\n\n }", "private void initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(300, 200);\n this.setPreferredSize(new java.awt.Dimension(450, 116));\n this.add(getListPanel(), java.awt.BorderLayout.CENTER);\n this.add(getButtonPanel(), java.awt.BorderLayout.SOUTH);\n }", "@Override\n public void initialize() {\n sectionsPanel.removeAll();\n \n section1 = new ProgressReportSectionSettingPanel(this);\n section2 = new ProgressReportSectionSettingPanel(this);\n section3 = new ProgressReportSectionSettingPanel(this);\n section4 = new ProgressReportSectionSettingPanel(this);\n addSectionElement(0,section1);\n addSectionElement(1,section2);\n addSectionElement(2,section3);\n addSectionElement(3,section4);\n \n refresh();\n }", "public AStationPane() {\n }", "public Container createContentPane()\r\n\t{\r\n\t\t//add items to lvl choice\r\n\t\tfor(int g=1; g<21; g++)\r\n\t\t{\r\n\t\t\tcharLvlChoice.addItem(String.valueOf(g));\r\n\t\t}\r\n\r\n\t\t//add stuff to panels\r\n\t\tinputsPanel.setLayout(new GridLayout(2,2,3,3));\r\n\t\tdisplayPanel.setLayout(new GridLayout(1,1,8,8));\r\n\t\tinputsPanel.add(runButton);\r\n\t\tinputsPanel.add(clearButton);\r\n\t\t\ttimesPanel.add(timesLabel);\r\n\t\t\ttimesPanel.add(runTimesField);\r\n\t\tinputsPanel.add(timesPanel);\r\n\t\t\tlevelPanel.add(levelLabel);\r\n\t\t\tlevelPanel.add(charLvlChoice);\r\n\t\tinputsPanel.add(levelPanel);\r\n\t\t\trunTimesField.setText(\"1\");\r\n\t\tdisplay.setEditable(false);\r\n\r\n\t\trunButton.addActionListener(this);\r\n\t\tclearButton.addActionListener(this);\r\n\r\n\t\tdisplay.setBackground(Color.black);\r\n\t\tdisplay.setForeground(Color.white);\r\n\r\n\t\tsetTabsAndStyles(display);\r\n\t\tdisplay = addTextToTextPane();\r\n\t\t\tJScrollPane scrollPane = new JScrollPane(display);\r\n\t\t\t\tscrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\t\t\tscrollPane.setPreferredSize(new Dimension(500, 200));\r\n\t\tdisplayPanel.add(scrollPane);\r\n\r\n\t\t//create Container and set attributes\r\n\t\tContainer c = getContentPane();\r\n\t\t\tc.setLayout(new BorderLayout());\r\n\t\t\tc.add(inputsPanel, BorderLayout.NORTH);\r\n\t\t\tc.add(displayPanel, BorderLayout.CENTER);\r\n\r\n\t\treturn c;\r\n\t}", "private void $$$setupUI$$$() {\n\t\tpanel_overview = new JPanel();\n\t\tpanel_overview.setLayout(new BorderLayout(0, 0));\n\t\twebView = new WebbrowserPanel();\n\t\tpanel_overview.add(webView, BorderLayout.CENTER);\n\t}", "public void initialize(){\n\n //load Settings\n settings = new Settings(settingsFile);\n if (settings.isExcludeCupboard()){\n cupboardCheckBox.setSelected(true);\n }\n\n //The first pane to see when the program starts is the meals Browse pane\n mealsBtnClicked();\n\n //set up focus and out of focus styling for all the Panes\n styleIngredientBrowsePane();\n styleIngredientAddPane();\n styleMealAddPane();\n styleMealBrowsePane();\n stylePlanShoppingListPane();\n stylePlanWeeklyPlanner();\n stylePlanCupboard();\n\n //setup the Ingredients Browse Pane\n setupBrowseIngredientsPane();\n\n //setup up the main menu hoover button effects\n setupHoverMainMenuButtons();\n\n //setup the meal Add Pane\n MealAddPaneSetUp();\n\n //setup the meal Browse Pane\n mealBrowsePaneSetup();\n\n //setup up the meal planner weekly pane\n weeklyPlannerSetup();\n\n //setup the planner shopping list pane\n plannerShoppingListSetup();\n\n //setup the planner cupboard pane\n plannerCupboardSetup();\n\n //Load the meals from the database\n loadMeals();\n\n //set up the focus styling for the minimise and exit buttons\n setupWindowButtons();\n\n //when the program loads, load the shopping list and meal planner from previous usage\n loadShoppingList();\n loadMealPlanner();\n\n //Set up the information boxes instance for ingredient pane, meal pane and planner pane\n plannerBox = new InformationBox(PlannerPlanPane, plannerColor, plannerColorDark,\n \"images/icons8_planner_96px_Black.png\");\n mealBox = new InformationBox(MealsBrowsePane, mealColor, mealColorDark,\n \"images/icons8_cutlery_96px_Black.png\");\n ingredientBox = new InformationBox(IngredientsBrowsePane, ingredientColor, ingredientColorDark,\n \"images/icons8_apple_96px_Black.png\");\n\n }", "private void createLayout () {\n \t\n \tBorderPane border = new BorderPane();\n \t\n \t\n \t tabPane = new TabPane();\n ArrayList <ScrollPane> tabs = new ArrayList <ScrollPane>();\n \t\n //create column 1 - need to refactor this and make more generic\n TilePane col1 = new TilePane();\n \tcol1.setPrefColumns(2);\n \tcol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol1.setAlignment(Pos.TOP_LEFT);\n \tcol1.getChildren().addAll(createElements ());\n \tScrollPane scrollCol1 = new ScrollPane(col1);\n \ttabs.add(scrollCol1);\n \t\n \tTilePane col2 = new TilePane();\n \tcol2.setPrefColumns(2);\n \tcol2.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol2.setAlignment(Pos.TOP_LEFT);\n \tcol2.getChildren().addAll(createElements ());\n \tScrollPane scrollCol2 = new ScrollPane(col2);\n \ttabs.add(scrollCol2);\n \t\n \t\n \t\n for (int i = 0; i < tabs.size(); i++) {\n Tab tab = new Tab();\n String tabLabel = \"Col-\" + i;\n tab.setText(tabLabel);\n keywordsList.put(tabLabel, new ArrayList <String>());\n \n tab.setContent(tabs.get(i));\n tabPane.getTabs().add(tab);\n }\n \t\n \t\n \t\n \t\n \t\n \t\n //System.out.println(controller.getScene());\n border.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n border.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n ToolBar toolbar = createtoolBar();\n toolbar.setPrefHeight(50);\n \n border.setTop(toolbar);\n\t\t\n\n\t scrollCol1.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n\t scrollCol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n border.setCenter(tabPane);\n\t Group root = (Group)this.getRoot();\n root.getChildren().add(border);\n\t}", "private void initialize() {\r\n\t\tthis.setSize(733, 427);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"jProxyChecker\");\r\n\t}", "public void initTextPane()\r\n {\r\n\t setResultsFont();\r\n\t ResultsTextPane.setBorder(null);\r\n\r\n // Scroller.\r\n \tJScrollPane ResultsScrollPane = new JScrollPane();\r\n \tJViewport ResultsViewport = ResultsScrollPane.getViewport();\r\n \tResultsViewport.add(ResultsTextPane);\r\n\r\n \tJPanel ResultsPanel = new JPanel();\r\n \tResultsPanel.setLayout(new BorderLayout());\r\n \tResultsPanel.add(\"Center\", ResultsScrollPane);\r\n\r\n \tgetContentPane().add(\"Center\", ResultsPanel);\r\n }", "public void initUI() {\n\t\tadd(board);\r\n\t\t//Set if frame is resizable by user\r\n\t\tsetResizable(false);\r\n\t\t//call pack method to fit the \r\n\t\t//preferred size and layout of subcomponents\r\n\t\t//***important head might not work correctly with collision of bottom and right borders\r\n\t\tpack();\r\n\t\t//set title for frame\r\n\t\tsetTitle(\"Snake\");\r\n\t\t//set location on screen(null centers it)\r\n\t\tsetLocationRelativeTo(null);\r\n\t\t//set default for close button of frame\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initialize() {\n\t\tthis.setSize(430, 280);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setUndecorated(true);\n\t\tthis.setModal(true);\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setTitle(\"Datos del Invitado\");\n\t\tthis.addComponentListener(this);\n\t}", "private void init() {\n initComponents();\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(calendarPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(calendarPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));\n setVisible(true);\n setLocationRelativeTo(null);\n }", "private void initComponent() {\r\n\t\t//Initialize variables to empty objects\r\n\t\tcard = new CardLayout();\r\n\t\tcardText = new CardLayout();\r\n\t\tslidePane = new JPanel();\r\n\t\ttextPane = new JPanel();\r\n\t\ttextPane.setBackground(Color.BLUE);\r\n\t\ttextPane.setBounds(5, 470, 790, 50);\r\n\t\ttextPane.setVisible(true);\r\n\t\tbuttonPane = new JPanel();\r\n\t\tbtnPrev = new JButton();\r\n\t\tbtnNext = new JButton();\r\n\t\tlblSlide = new JLabel();\r\n\t\tlblTextArea = new JLabel();\r\n\r\n\t\t//Setup frame attributes\r\n\t\tsetSize(800, 600);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetTitle(\"Top 5 Destinations SlideShow\");\r\n\t\tgetContentPane().setLayout(new BorderLayout(10, 50));\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t//Setting the layouts for the panels\r\n\t\tslidePane.setLayout(card);\r\n\t\ttextPane.setLayout(cardText);\r\n\t\t\r\n\t\t//logic to add each of the slides and text\r\n\t\tfor (int i = 1; i <= 5; i++) {\r\n\t\t\tlblSlide = new JLabel();\r\n\t\t\tlblTextArea = new JLabel();\r\n\t\t\tlblSlide.setText(getResizeIcon(i));\r\n\t\t\tlblTextArea.setText(getTextDescription(i));\r\n\t\t\tslidePane.add(lblSlide, \"card\" + i);\r\n\t\t\ttextPane.add(lblTextArea, \"cardText\" + i);\r\n\t\t}\r\n\r\n\t\tgetContentPane().add(slidePane, BorderLayout.CENTER);\r\n\t\tgetContentPane().add(textPane, BorderLayout.SOUTH);\r\n\r\n\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 10));\r\n\r\n\t\tbtnPrev.setText(\"Previous\");\r\n\t\tbtnPrev.addActionListener(new ActionListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tgoPrevious();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPane.add(btnPrev);\r\n\r\n\t\tbtnNext.setText(\"Next\");\r\n\t\tbtnNext.addActionListener(new ActionListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tgoNext();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPane.add(btnNext);\r\n\r\n\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\r\n\t}", "@Override\n\t\tpublic void setPane(JPanel pane) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void setPane() {\n\t\tNewTaskPane textListPane = new NewTaskPane();\n\t\trootPane = new HomePane(new MainLeftPane(),textListPane);\t\t\n\t}", "private void initComponents() {\n\t\tstage = new Stage();\n\t\tHBox root = new HBox();\n\t\troot.setPadding(new Insets(10));\n\t\troot.setAlignment(Pos.CENTER);\n\t\tlabel = new Label(\" \");\n\t\tlabel.setPrefWidth(144);\n\t\tlabel.setFont(new Font(\"Arial\", 80.0));\n\t\tlabel.setAlignment(Pos.CENTER);\n\t\troot.getChildren().add(label);\n\t\tScene scene = new Scene(root);\n\t\tstage.setScene(scene);\n\t\tstage.setTitle(\"Count Guest\");\n\t\tstage.sizeToScene();\n\t}", "private void initilize()\n\t{\n\t\tdimXNet = project.getNoC().getNumRotX();\n\t\tdimYNet = project.getNoC().getNumRotY();\n\t\t\n\t\taddProperties();\n\t\taddComponents();\n\t\tsetVisible(true);\n\t}", "public void initModule(){\n SplitPane pane = new SplitPane();\n VBox module = (VBox) loader.getNamespace().get(\"vbox_grapher\");\n ScrollPane module_parent = (ScrollPane) loader.getNamespace().get(\"vbox_grapher_parent\");\n\n //bug solution (set resizable with parent):\n module_parent.setFitToHeight(true);\n module_parent.setFitToWidth(true);\n\n //clear(module);\n createGraphes(-1, module);\n }", "private void init() {\n\n\t\tthis.setResizable(false);\n\t\tthis.setSize(575, 155);\n\t\tthis.setLocationRelativeTo(null);\n\t\tthis.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\n\n\t\tJPanel panNom = addPannelName();\n\t\tJPanel panPass = addPannelPassword();\n\t\tJPanel panTopic = addPannelTopic();\n\n\t\tJPanel content = new JPanel();\n\t\tcontent.add(panNom);\n\t\tcontent.add(panPass);\n\t\tcontent.add(panTopic);\n\n\t\tJPanel control = new JPanel();\n\n\t\tJButton okButton = addOKButtonTopic();\n\t\tJButton cancelButton = addCancelButton();\n\n\t\tcontrol.add(okButton);\n\t\tcontrol.add(cancelButton);\n\n\t\tthis.getContentPane().add(content, BorderLayout.NORTH);\n\t\tthis.getContentPane().add(control, BorderLayout.SOUTH);\n\t}", "TabbelPane() {\r\n\t\t\tpanelDB = new JPanelCluster(\"mine\", new EventFromDb());\r\n\t\t\tpanelFile = new JPanelCluster(\"store from file\", new EventFromFile());\r\n\t\t\tImageIcon icon = new ImageIcon(\"database.png\");\r\n\t\t\tImage image = icon.getImage();\r\n\t\t\tImage newimage = image.getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH);\r\n\t\t\ticon.setImage(newimage);\r\n\t\t\tschermata.addTab(\"DB\", icon, panelDB);\r\n\t\t\ticon = new ImageIcon(\"file.png\");\r\n\t\t\timage = icon.getImage();\r\n\t\t\tnewimage = image.getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH);\r\n\t\t\ticon.setImage(newimage);\r\n\t\t\tschermata.addTab(\"file\", icon, panelFile);\r\n\t\t\tsetVisible(true);\r\n\t\t}", "private void init() {\n\t\tcontentPane=getContentPane();\n\t\ttopPanel= new JPanel();\n\t\tcontentPane.setLayout(new BorderLayout());\n\t\tlabel = new JLabel(\"Username\");\n\t\ttextfield = new JTextField(\"Type Username\", 15);\n\t\ttextfield.addActionListener(aListener);\n\t\tconnectButton = new JButton(\"Connect to Server\");\n\t\tconnectButton.addActionListener(aListener);\n\t\ttopPanel.setLayout(new FlowLayout());\n\t\tlabel.setVerticalAlignment(FlowLayout.LEFT);\n\t\ttopPanel.add(label);\n\t\ttopPanel.add(textfield);\n\t\ttopPanel.add(connectButton);\n\t\tsetSize(600, 600);\n\t\tcontentPane.add(topPanel, BorderLayout.NORTH);\n\t\tsetVisible(true);\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\t\tthis.addWindowListener(framListener);\n\t}", "public void InitializeComponents(){\n\n\n screen = new JPanel();\n screen.setLayout(null);\n screen.setBackground(Color.BLUE);\n this.getContentPane().add(screen);\n ScreenComps();\n\n }", "private void initialize() {\n\t\tSystem.setProperty(\"sun.java2d.uiScale\", \"1.0\");\n\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(new Color(47, 79, 79));\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\t\n\n\t\tpanellHome =new Home_Panel();\n\t\tpanellHome.setBounds(0, 0, 733, 494);\t\n\t\t\n\t\tpanelAnimalInsertion =new AnimalInsertion_Panel();\n\t\tpanelAnimalInsertion.setBounds(0, 0, 733, 494);\n\t\t\n\t\tpanelAvailableAnimals=new AvailableAnimals_Panel();\n\t\tpanelAvailableAnimals.setBounds(0, 0, 791, 585);\n\n\t\tpanelAdoptionHistory=new AdoptionHistory_Panel();\n\t\tpanelAdoptionHistory.setBounds(0, 0, 733, 535);\n\n\t\tpanelAdoptionStatistics=new AdoptionStatistics_Panel();\n\t\tpanelAdoptionStatistics.setBounds(0, 0, 733, 535);\n\t\t\n\t\tpanelProffesionalServices=new ProffesionalServices_Panel();\n\t\tpanelProffesionalServices.setBounds(0, 0, 733, 535);\n\t\t\n\t\t\n\t\tJPanel panelMenu = new JPanel();\n\t\tpanelMenu.setBackground(new Color(0, 128, 128));\n\t\tpanelMenu.setBounds(0, 0, 218, 585);\n\t\tframe.getContentPane().add(panelMenu);\n\t\tpanelMenu.setLayout(null);\n\t\t\n\t\tJPanel paneHome = new JPanel();\n\t\tpaneHome.addMouseListener(new PanelButtonMouseAdapter(paneHome)\n\t{\n\t\t\t\n\t\t\tpublic void mouseClicked(MouseEvent e) \n\t\t\t{\n\n\t\t\t\tmenuClicked(panellHome);\n\n\t\t\t}\n\t\t\t\t\n\t});\n\t\tpaneHome.setBackground(new Color(0, 139, 139));\n\t\tpaneHome.setBounds(0, 131, 214, 37);\n\t\tpanelMenu.add(paneHome);\n\t\tpaneHome.setLayout(null);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Home\");\n\t\tlblNewLabel.setForeground(new Color(255, 255, 255));\n\t\tlblNewLabel.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\tlblNewLabel.setBounds(78, 12, 45, 13);\n\t\tpaneHome.add(lblNewLabel);\n\t\t\n\t\t\n\t\tJPanel paneAvailableAnimals = new JPanel();\n\t\tpaneAvailableAnimals.addMouseListener(new PanelButtonMouseAdapter(paneAvailableAnimals)\n\t\t{\n\t\t\t\n\t\t\tpublic void mouseClicked(MouseEvent e) \n\t\t\t{\n\t\t\t\t\n\t\t\t\tmenuClicked(panelAvailableAnimals);\n\t\t\t\t\n\n\t\t\t}\n\t\t\t\t\n\t});\n\t\t\n\t\tpaneAvailableAnimals.setBackground(new Color(0, 139, 139));\n\t\tpaneAvailableAnimals.setBounds(0, 169, 214, 37);\n\t\tpanelMenu.add(paneAvailableAnimals);\n\t\tpaneAvailableAnimals.setLayout(null);\n\t\t\n\t\tJLabel lblAvailableAnimals = new JLabel(\"Available Animals\");\n\t\tlblAvailableAnimals.setForeground(new Color(255, 255, 255));\n\t\tlblAvailableAnimals.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\tlblAvailableAnimals.setBounds(38, 6, 132, 27);\n\t\tpaneAvailableAnimals.add(lblAvailableAnimals);\n\t\t\n\t\tJPanel paneAnimalInsertion = new JPanel();\n\t\tpaneAnimalInsertion.addMouseListener(new PanelButtonMouseAdapter(paneAnimalInsertion)\n{\n\t\t\t\n\t\t\tpublic void mouseClicked(MouseEvent e) \n\t\t\t{\n\t\t\t\t\n\t\t\t\tmenuClicked(panelAnimalInsertion);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\t\n\t});\n\t\tpaneAnimalInsertion.setBackground(new Color(0, 139, 139));\n\t\tpaneAnimalInsertion.setBounds(0, 205, 214, 37);\n\t\tpanelMenu.add(paneAnimalInsertion);\n\t\tpaneAnimalInsertion.setLayout(null);\n\t\t\n\t\tJLabel lblAnimalInsertion = new JLabel(\"Animal Insertion\");\n\t\tlblAnimalInsertion.setForeground(new Color(255, 255, 255));\n\t\tlblAnimalInsertion.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\tlblAnimalInsertion.setBounds(38, 10, 142, 17);\n\t\tpaneAnimalInsertion.add(lblAnimalInsertion);\n\t\t\n\t\tJPanel paneAdoptionHistory = new JPanel();\n\t\tpaneAdoptionHistory.addMouseListener(new PanelButtonMouseAdapter(paneAdoptionHistory)\n\t\t\t\t{\n\t\t\tpublic void mouseClicked(MouseEvent e) \n\t\t\t{\n\t\t\t\tmenuClicked(panelAdoptionHistory);\n\n\t\t\t}\n\t\t\t\t\n\t});\n\t\tpaneAdoptionHistory.setBackground(new Color(0, 139, 139));\n\t\tpaneAdoptionHistory.setBounds(0, 241, 214, 37);\n\t\tpanelMenu.add(paneAdoptionHistory);\n\t\tpaneAdoptionHistory.setLayout(null);\n\t\t\n\t\tJLabel lblAdoptionsHistory = new JLabel(\"Adoption's History\");\n\t\tlblAdoptionsHistory.setForeground(new Color(255, 255, 255));\n\t\tlblAdoptionsHistory.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\tlblAdoptionsHistory.setBounds(38, 7, 129, 27);\n\t\tpaneAdoptionHistory.add(lblAdoptionsHistory);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"\");\n\t\tlblNewLabel_1.setIcon(new ImageIcon(image));\n\t\tlblNewLabel_1.setBounds(60, 10, 125, 111);\n\t\tpanelMenu.add(lblNewLabel_1);\n\t\t\n\t\tJPanel paneAdoptionStatistics = new JPanel();\n\t\tpaneAdoptionStatistics.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tmenuClicked(panelAdoptionStatistics);\n\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tpaneAdoptionStatistics.setLayout(null);\n\t\tpaneAdoptionStatistics.setBackground(new Color(0, 139, 139));\n\t\tpaneAdoptionStatistics.setBounds(0, 277, 214, 37);\n\t\tpanelMenu.add(paneAdoptionStatistics);\n\t\t\n\t\tJLabel lblAdoptionsStatistics = new JLabel(\"Adoption's Statistics\");\n\t\tlblAdoptionsStatistics.setForeground(Color.WHITE);\n\t\tlblAdoptionsStatistics.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\tlblAdoptionsStatistics.setBounds(22, 3, 166, 27);\n\t\tpaneAdoptionStatistics.add(lblAdoptionsStatistics);\n\t\t\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Shir Bata\");\n\t\tlblNewLabel_2.setForeground(Color.WHITE);\n\t\tlblNewLabel_2.setBounds(28, 516, 64, 23);\n\t\tpanelMenu.add(lblNewLabel_2);\n\t\t\n\t\tJLabel lblKoralBukra = new JLabel(\"Koral Bukra\");\n\t\tlblKoralBukra.setForeground(Color.WHITE);\n\t\tlblKoralBukra.setBounds(112, 516, 106, 23);\n\t\tpanelMenu.add(lblKoralBukra);\n\t\t\n\t\tJLabel lblMotiBarshazky = new JLabel(\"Moti Barshazky\");\n\t\tlblMotiBarshazky.setForeground(Color.WHITE);\n\t\tlblMotiBarshazky.setBounds(109, 536, 109, 23);\n\t\tpanelMenu.add(lblMotiBarshazky);\n\t\t\n\t\tJLabel lblTomerCarmel = new JLabel(\"Tomer Carmel\");\n\t\tlblTomerCarmel.setForeground(Color.WHITE);\n\t\tlblTomerCarmel.setBounds(18, 536, 106, 23);\n\t\tpanelMenu.add(lblTomerCarmel);\n\t\t\n\t\tJPanel paneProffessionalServices = new JPanel();\n\t\tpaneProffessionalServices.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tmenuClicked(panelProffesionalServices);\n\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tpaneProffessionalServices.setLayout(null);\n\t\tpaneProffessionalServices.setBackground(new Color(0, 139, 139));\n\t\tpaneProffessionalServices.setBounds(0, 315, 214, 37);\n\t\tpanelMenu.add(paneProffessionalServices);\n\t\t\n\t\tJLabel lblProffessionalServices = new JLabel(\"Proffessional Services\");\n\t\tlblProffessionalServices.setForeground(Color.WHITE);\n\t\tlblProffessionalServices.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\tlblProffessionalServices.setBounds(22, 3, 166, 27);\n\t\tpaneProffessionalServices.add(lblProffessionalServices);\n\t\t\n\t\t\n\t\n\t\t\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(new Color(47, 79, 79));\n\t\tpanel.setBounds(219, 0, 791, 585);\n\t\tframe.getContentPane().add(panel);\n\t\tpanel.setLayout(null);\n\t\tframe.setBounds(100, 100, 1024, 622);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tpanel.add(panelAnimalInsertion);\n\t\tpanel.add(panelAvailableAnimals);\n\t\tpanel.add(panellHome);\n\t\tpanel.add(panelAdoptionHistory);\n\t\tpanel.add(panelAdoptionStatistics);\n\t\tpanel.add(panelProffesionalServices);\n\t\t\n\t\t\n\t\t\n\t\tHome_Panel home_Panel = new Home_Panel();\n\t\thome_Panel.setBounds(0, 0, 733, 494);\n\t\tpanel.add(home_Panel);\n\t\tmenuClicked(panellHome);\n\n\t\t\n\t}", "private void $$$setupUI$$$() {\n panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootTabControl = new JTabbedPane();\n panel1.add(rootTabControl, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n }", "private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}", "private void setupLayout() {\r\n\t\tgetContentPane().add(panel);\r\n\t}", "private void initialize() {\n layout = new HorizontalLayout();\n\n workspaceTabs = new TabSheet();\n\n WorkspacePanel panel = new WorkspacePanel(\"Workspace 1\");\n workspaceTabs.addTab(panel).setCaption(\"Workspace 1\");\n DropHandler dropHandler = searchMenu.createDropHandler(panel.getBaseLayout());\n panel.setDropHandler(dropHandler);\n\n layout.addComponent(workspaceTabs);\n\n setContent(layout);\n }", "private void initialize() {\n\t\tthis.setSize(300, 300);\n\t\tthis.setIconifiable(true);\n\t\tthis.setClosable(true);\n\t\tthis.setTitle(\"Sobre\");\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setFrameIcon(new ImageIcon(\"images/16x16/info16x16.gif\"));\n\t}", "void initView();", "private void initialize() {\n\t\tthis.setBounds(100, 100, 950, 740);\n\t\tthis.setLayout(null);\n\n\t\n\t}", "@Override\n\tpublic void init() {\n\t\tsetMainWindow(new Window(\"Module Demo Application\", tabs));\n\t\ttabs.setSizeFull();\n\t}", "public GUI()\n {\n initComponents();\n setSize(xSize, ySize);\n figures = new PFigure[numFigs];\n }", "private void initializeSplitPane() {\n\t\tthis.splitPane = new JSplitPane();\n\t\tthis.splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);\n\t\tthis.splitPane.setDividerLocation(this.screenDimensions.height / 2);\n\t\tthis.getContentPane().add(this.splitPane, BorderLayout.CENTER);\n\t}", "private void initiateInternal() {\n\n //define adaptation listener\n this.addComponentListener(new ComponentAdapter() {\n @Override\n public void componentResized(ComponentEvent e) {\n adapt(e);\n }\n });\n\n //solve problem with unloading of internal components\n setExtendedState(ICONIFIED | MAXIMIZED_BOTH);\n //the set visible must be the last thing called \n pack();\n setExtendedState(MAXIMIZED_BOTH);\n setVisible(true);\n }", "protected void createContents() {\n\t\tMonitor primary = this.getDisplay().getPrimaryMonitor();\n\t\tRectangle bounds = primary.getBounds();\n\t\tRectangle rect = getBounds();\n\t\tint x = bounds.x + (bounds.width - rect.width) / 2;\n\t\tint y = bounds.y + (bounds.height - rect.height) / 2;\n\t\tsetLocation(x, y);\n\t}", "private void initComponents() {\n\t\t\tpreviewLabel = new JLabel();\n\t\t\tpreview2Label = new JLabel();\n\t\t\tdescLabel = new JLabel();\n\n\t\t\t//======== this ========\n\t\t\tsetLayout(new MigLayout(\n\t\t\t\t\"insets 0,hidemode 3\",\n\t\t\t\t// columns\n\t\t\t\t\"[left]\",\n\t\t\t\t// rows\n\t\t\t\t\"[]0\" +\n\t\t\t\t\"[]\"));\n\n\t\t\t//---- previewLabel ----\n\t\t\tpreviewLabel.setText(\"preview\");\n\t\t\tadd(previewLabel, \"cell 0 0\");\n\t\t\tadd(preview2Label, \"cell 0 0\");\n\n\t\t\t//---- descLabel ----\n\t\t\tdescLabel.setText(\"description\");\n\t\t\tdescLabel.putClientProperty(\"FlatLaf.styleClass\", \"small\");\n\t\t\tdescLabel.setEnabled(false);\n\t\t\tadd(descLabel, \"cell 0 1\");\n\t\t\t// JFormDesigner - End of component initialization //GEN-END:initComponents\n\t\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "final void initViewer()\n {\n if (viewer.getViewContext().getStartInStandaloneWindow() == true)\n {\n \n JFrame frame=null; \n // JFrame\n {\n frame = new JFrame();\n frame.setSize(new Dimension(800, 600));\n GuiSettings.placeToCenter(frame);\n }\n\n if (viewer.haveOwnScrollPane() == false)\n {\n // embed viewer in scrollPane \n JScrollPane scrollPane = new JScrollPane();\n scrollPane.setViewportView(viewer.getViewComponent());\n frame.add(scrollPane);\n }\n else\n {\n frame.add(viewer.getViewComponent());\n }\n \n // Viewer\n // viewer.setFrame(frame); \n viewer.initViewer();\n \n ViewerFrameListener listener = new ViewerFrameListener(frame,this);\n frame.addWindowListener(listener);\n frame.addComponentListener(listener); \n \n frame.pack();\n\n frame.setVisible(true);\n // viewer.setFrame(frame); \n }\n else\n {\n viewer.initViewer();\n }\n }", "public void setUpView() {\n\n\n\t\t//Make the components\n\t\tinputAnswer = new Button(\"Submit\");\n\t\tbegin\t\t= new Button(\"Begin level \" + gameLevel);\n\t\tblueButt\t= new Button();\n\t\tredButt = new Button();\n\t\tgreenButt = new Button();\n\t\tyellowButt = new Button();\n\t\tclear = new Button(\"Clear\");\n\t\tguessArea = new TextArea();\n\t\ttopPan = new Panel();\n\t\tinstructLab = new Label(\"Welcome to the great guessing game. Try and finish it, its fun honest!\");\n\t\treset = new Button(\"Start again?\");\n\t\tpointsLab = new Label(\"Points: \" + points);\n\t\t\n\t\t//Change the font\n\t\tFont font = new Font(\"Verdana\", Font.BOLD, 18);\n\t\tinstructLab.setFont(font);\n\t\t\n\t\t//Add the label to the top panel\n\t\ttopPan.add(instructLab);\n\t\t\n\t\t//Set layout\n\t\tsetLayout(new MigLayout());\n\t\n\t\t//Set the size of the components\n\t\tblueButt.setPreferredSize (new Dimension(60, 50));\n\t\tredButt.setPreferredSize (new Dimension(60, 50));\n\t\tgreenButt.setPreferredSize (new Dimension(60, 50));\n\t\tyellowButt.setPreferredSize(new Dimension(60, 50));\n\t\tguessArea.setPreferredSize (new Dimension(50, 10));\n\t\tpointsLab.setPreferredSize (new Dimension(100, 30));\n\t\t\n\t\t//Turn the submit button of until there is something to submit\n\t\tinputAnswer.setEnabled(false);\n\n\t\t//Set the button colour\n\t\tblueButt.setBackground (Color.blue);\n\t\tredButt.setBackground (Color.red);\n\t\tgreenButt.setBackground (Color.green);\n\t\tyellowButt.setBackground(Color.yellow);\n\t\t\n\t\t//Hide the reset button until it is needed\n\t\treset.setVisible(false);\n\n\t\t//Add the components to the applet\n\t\tadd(topPan, \"wrap\");\n\t\tadd(redButt, \"cell 0 1\");\n\t\tadd(blueButt, \"cell 0 1\");\t\t\n\t\tadd(greenButt, \"cell 0 1\");\n\t\tadd(yellowButt, \"cell 0 1\");\n\t\tadd(begin, \"wrap\");\n\t\tadd(guessArea, \"wrap\");\n\t\tadd(inputAnswer,\"split 2\");\t\n\t\tadd(clear, \"gap left 340, cell 0 2, wrap\");\n\t\tadd(reset, \t\t\"wrap\");\n\t\tadd(pointsLab);\n\n\n\n\t\t//If the status bar is present show the user there level\n\t\tshowStatus(\"You are on level: \" + gameLevel);\n\n\n\t\t//Set the size of the applet\n\t\tsetSize(new Dimension(1000, 1000));\n\n\t}", "private void initView() {\n\n }" ]
[ "0.7276061", "0.72158104", "0.71223956", "0.7091398", "0.70594424", "0.70009315", "0.6993265", "0.6966734", "0.6888398", "0.6868152", "0.68462855", "0.68222684", "0.6759598", "0.6742377", "0.67335975", "0.6719584", "0.67133635", "0.66787475", "0.66360474", "0.6624894", "0.6621718", "0.6615719", "0.6611345", "0.6579194", "0.65755373", "0.65730214", "0.65611434", "0.6546261", "0.6538236", "0.6534133", "0.6527515", "0.65263295", "0.6520298", "0.65194726", "0.65101045", "0.65039766", "0.65024894", "0.6500188", "0.6488873", "0.64787143", "0.6462539", "0.6459526", "0.64551145", "0.64500755", "0.6449532", "0.64478564", "0.64365804", "0.64313364", "0.64306974", "0.64276534", "0.6427195", "0.6425703", "0.64193296", "0.64122576", "0.64051336", "0.6396798", "0.63927066", "0.63917303", "0.63724536", "0.6359678", "0.63551533", "0.6353717", "0.6344979", "0.63352805", "0.6330745", "0.63148093", "0.6311605", "0.6298881", "0.6291107", "0.6283598", "0.6281622", "0.62789994", "0.62777716", "0.62621695", "0.62605506", "0.6257164", "0.62570035", "0.6252601", "0.6251839", "0.62481594", "0.624626", "0.6244413", "0.62443715", "0.6237823", "0.6236054", "0.6234456", "0.62280756", "0.6226528", "0.6225685", "0.6219667", "0.6219641", "0.6214401", "0.6212486", "0.6212323", "0.6210457", "0.62078446", "0.62071794", "0.62071794", "0.619959", "0.619957", "0.6197545" ]
0.0
-1
Produces the cross product of the first stage candidates to generate the 2nd Stage potential candidates.
private void crossProduct() { BaseCandidateElement[] it = o.inputObject.firstStageCandidates.values().toArray(new BaseCandidateElement[0]); // logger.info(Arrays.toString(it)); for (int i = 0; i < it.length; i++) { for (int j = i + 1; j < it.length; j++) { if (PrecisConfigProperties.HIERARCHY_DIMS_ENABLED && hierarchyDimsNegation.checkIfBelongToSameHierarchyGroup(it[i], it[j])) continue; if (it[i].xor(it[j]).cardinality() == 4) { BitSet b = it[i].or(it[j]); o.inputObject.addCandidate(b); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Classification composition(Classification stage1, Classification stage2, ClassificationModel model) {\n Classification composedClassification = ClassificationFactory.eINSTANCE.createClassification();\n\n List<ClassifiedFeature> allClassifiedFeaturesOfStage1 = getAllClassifiedFeaturesOfView(stage1, model);\n List<ClassifiedFeature> allClassifiedFeaturesOfStage2 = getAllClassifiedFeaturesOfView(stage1, model);\n // TODO:Wie View-Gruppen aus den Classifications zuordnen?\n\n composedClassification.getViewgroups().addAll(stage1.getViewgroups());\n composedClassification.getViewgroups().addAll(stage2.getViewgroups());\n\n HashMap<Feature, Set<ClassifiedFeature>> featureToClassifications = new HashMap<Feature, Set<ClassifiedFeature>>();\n\n for (ClassifiedFeature c : allClassifiedFeaturesOfStage1) {\n if (!featureToClassifications.containsKey(c.getFeature())) {\n HashSet<ClassifiedFeature> listOfFeatures = new HashSet<ClassifiedFeature>();\n listOfFeatures.add(c);\n featureToClassifications.put(c.getFeature(), listOfFeatures);\n } else\n featureToClassifications.get(c.getFeature()).add(c);\n }\n\n for (ClassifiedFeature c : allClassifiedFeaturesOfStage2) {\n if (!featureToClassifications.containsKey(c.getFeature())) {\n HashSet<ClassifiedFeature> listOfFeatures = new HashSet<ClassifiedFeature>();\n listOfFeatures.add(c);\n featureToClassifications.put(c.getFeature(), listOfFeatures);\n } else\n featureToClassifications.get(c.getFeature()).add(c);\n }\n\n for (Feature f : featureToClassifications.keySet()) {\n Set<ClassifiedFeature> classifications = featureToClassifications.get(f);\n addClassifiedFeature(composedClassification, composeSetOfClassifiedFeatures(classifications), model);\n }\n\n return composedClassification;\n }", "public Vector genCandidate(int k) {\n\t\tVector<String> tempCandidateList = new Vector<String>();\n\t\tVector<String> temp_v = new Vector<String>();\n\t\tint length;\n\t\tString candidate1 = new String();\n\t\tString candidate2 = new String();\n\t\tString newCandidate = new String();\n\t\t// 1 itemset\n\t\tif( 1 == k ) {\n\t\t\tfor(int i = 1; i<=NUM; i++) {\n\t\t\t\ttempCandidateList.addElement(Integer.toString(i));\n\t\t\t}\n\t\t}\n\t\t// >=2\n\t\telse {\n\t\t\ttemp_v = (Vector)largeItemset.get(k-2); //-2, not 1\n\t\t\tlength = temp_v.size();\n\t\t\tfor(int j = 0; j<length; j++) {\n\t\t\t\t// get 1 itemset element\n\t\t\t\tcandidate1 = temp_v.get(j);\n\t\t\t\t// newCandidate = new String();\n\t\t\t\tfor(int jj=j+1; jj<length; jj++) {\n\t\t\t\t\tcandidate2 = temp_v.get(jj);\n\t\t\t\t\tnewCandidate = new String();\n\t\t\t\t\t// attention: if k == 2, no rule, just join\n\t\t\t\t\tif( 2 == k) {\n\t\t\t\t\t\tnewCandidate = candidate1.concat(\" \");\n\t\t\t\t\t\tnewCandidate = newCandidate.concat(candidate2);\n\t\t\t\t\t\ttempCandidateList.addElement(newCandidate.trim());\n\t\t\t\t\t}\n\t\t\t\t\telse { //only first k-2 element same ->downward closure property!\n\t\t\t\t\t\tString s1, s2;\n\t\t\t\t\t\tboolean same = true;\n\t\t\t\t\t\tfor(int pos = 1; pos<k-1; pos++) {\n\t\t\t\t\t\t\ts1 = getItemAt(candidate1, pos);\n\t\t\t\t\t\t\ts2 = getItemAt(candidate2, pos);\n\t\t\t\t\t\t\tif(s1.compareToIgnoreCase(s2) != 0) {\n\t\t\t\t\t\t\t\tsame = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tnewCandidate = newCandidate.concat(\" \");\n\t\t\t\t\t\t\t\tnewCandidate = newCandidate.concat(s1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// a legal C(k+1) element we've got\n\t\t\t\t\t\tif(same) {\n\t\t\t\t\t\t\ts1 = getItemAt(candidate1, k-1);\n\t\t\t\t\t\t\ts2 = getItemAt(candidate2, k-1);\n\t\t\t\t\t\t\tnewCandidate = newCandidate.concat(\" \");\n\t\t\t\t\t\t\tnewCandidate = newCandidate.concat(s1);\n\t\t\t\t\t\t\tnewCandidate = newCandidate.concat(\" \");\n\t\t\t\t\t\t\tnewCandidate = newCandidate.concat(s2);\n\t\t\t\t\t\t\ttempCandidateList.addElement(newCandidate.trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\treturn tempCandidateList;\n\t}", "public List<List<Integer>> combinationSum2(int[] candidates, int target) {\n Arrays.sort(candidates);\n List<List<Integer>> result = new ArrayList<>();\n List<Integer> current = new ArrayList<>();\n dfs2(candidates ,target, 0 ,0, current , result);\n return result;\n }", "private Vector step(){\n// System.out.println();\n// System.out.println(generationCount);\n// System.out.println(\"The Population is:\");\n// System.out.println(population);\n \n //DETERMINE WHO SURVIVES INTO NEXT GENERATION\n Vector nextGeneration = surviveType.run(population, fitnessArray);\n\n //DO THE CROSSOVER PROCESS\n //WHILE THE NEXT GENERATION ISN'T FULL\n while (nextGeneration.size() < (populationSize - randGenes)){\n //FIND PARENTS\n Gene parentOne, parentTwo;\n do {\n Gene[] parents = selectType.run(population, fitnessArray);\n parentOne = parents[0];\n parentTwo = parents[1];\n } while (selectPairs && (! closeEnough(parentOne, parentTwo)));\n //ADD CHILDREN\n Gene[] kids = crossType.children(parentOne, parentTwo);\n\n nextGeneration.add(kids[0]);\n if (nextGeneration.size() < (populationSize - randGenes)){\n nextGeneration.add(kids[1]);\n }\n }\n //ADD RANDOM GENES TO THE POPULATION\n while (nextGeneration.size() < populationSize){\n nextGeneration.add(initializer.createRandomGene(fitnessFunction, minRadius, maxRadius));\n }\n //MUTATE THE NEXT GENERATION\n for (int j = 0; j < populationSize; j++){\n if (Math.random() < mutationProb){\n nextGeneration.set(j, mutationType.run((Gene) nextGeneration.get(j)));\n }\n }\n\n //COMPUTE FITNESSES AND RELOCATE IF NECESSARY\n Gene bestGene = (Gene) nextGeneration.get(0);\n int bestX = 0;\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n while (relocationType.move(bannedList, next)){\n Gene newGene = initializer.createRandomGene(fitnessFunction, minRadius, maxRadius);\n next = newGene;\n nextGeneration.set(x, next);\n }\n fitnessArray[x] = next.getFitness();\n\n //FOR THE PURPOSES OF UPDATING THE BANNED LIST\n if (next.getFitness() > bestGene.getFitness()){\n bestGene = next;\n bestX = x;\n }\n } //End for (int x = 0;...\n\n Arrays.sort(fitnessArray);\n\n //UPDATE THE BANNED LIST BY ADDING THE BEST GENE IN THE NEXT GENERATION IF IT'S ABOVE minAccepted AND CONTAINS MORE THAN minPoints POINTS\n if (useList){\n if ((generationCount >= firstAdd) &&\n (solutionCounter >= countNum) &&\n (bestGene.getFitness() >= minAccepted) &&\n (bestGene.getCount() >= minPoints)){\n solutionCounter = 0;\n// System.out.println(bestGene);\n Gene bestClone = new Gene (bestGene.getMajorAxisRadius(), //THIS KLUDGE IS DONE B/C .clone() IS\n bestGene.getMinorAxisRadius(), //PROTECTED, AND I CAN'T UNPROTECT IT.\n bestGene.getX(), //I USE A CLONED GENE TO PREVENT A MUTATION\n bestGene.getY(), //IN THE NEXT GENERATION FROM ALTERING bannedList\n bestGene.getOrientation(),\n bestGene.getFunction());\n bannedList = relocationType.updateBannedList(bannedList, bestClone);\n\n\n //IF NECESSARY, UPDATE THE SOLUTION LIST BY ADDING ALL CLUSTERS WITH MORE THAN minPoints POINTS AND A FITNESS OF AT LEAST minAccepted\n if (returnAllSolutions){\n for (int i = 0; i < populationSize; i++){\n Gene next = (Gene) nextGeneration.get(i);\n if ((next.getFitness() >= minAccepted) && (next.getCount() >= minPoints)){\n solutionList.add(next);\n }\n }//End for (int i = 0...\n } else {\n solutionList = bannedList;\n } //End if (returnAllSolutions){...}else{\n } //End if (generationCount > 4...\n } //End if (useList){\n\n generationCount = generationCount + 1;\n solutionCounter = solutionCounter + 1;\n\n //IF AVOIDING CONVERGENCE, AND IT HAS CONVERGED, START OVER WITH RANDOM GENES\n\n double bestFitness = bestGene.getFitness();\n double medianFitness = roundToHundredths((double) fitnessArray[(int) Math.floor(populationSize / 2)]);\n\n// System.out.println(bestFitness);\n// System.out.println(medianFitness);\n\n if ((antiConvergence) &&\n ((bestFitness - medianFitness) < (0.01 * bestFitness)) &&\n (generationCount > firstAdd)){\n nextGeneration = initializer.getGenes(populationSize, fitnessFunction, minRadius, maxRadius);\n// System.out.println(\"EXPLODED CONVERGENCE!\");\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n fitnessArray[x] = next.getFitness();\n }\n Arrays.sort(fitnessArray);\n }\n\n return nextGeneration;\n }", "private float[] crossProduct(float[] v1, float[] v2) {\n float[] result = new float[3];\n result[0] = v1[1] * v2[2] - v2[1] * v1[2];\n result[1] = v1[2] * v2[0] - v2[2] * v1[0];\n result[2] = v1[0] * v2[1] - v2[0] * v1[1];\n return result;\n }", "private void startStageTwo() {\n\t\tCollections\n\t\t\t\t.addAll(this.starterDigits, 6, 21, 1, 30, 13, 64, 38, 46, 56);\n\t\tCollections.addAll(this.starterButtons, button02, button14, button23,\n\t\t\t\tbutton26, button30, button37, button44, button71, button73);\n\t\tthis.initializeStarterButtons();\n\t}", "long solve2() {\n\n\t\tfinal long Z = in.nextLong();\n\t\tint p2 = find_prime_index_at_most_n((int) Math.sqrt(Z) + 1) + 1;\n\t\tint p1 = p2 - 1;\n\t\t// out.printf(\"---> primes[%d] = %d\\n\", p2, primes[p2]);\n\t\tlong product = 0;\n\t\twhile (true) {\n\t\t\tlong tmp = primes[p1] * primes[p2];\n\n\t\t\tif (tmp <= Z) {\n\t\t\t\tproduct = tmp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t--p1;\n\t\t\t--p2;\n\t\t}\n\t\treturn product;\n\t}", "static int combination(int num1,int num2){\n\t return (fact(num1)/(fact(num2)*fact(num1-num2)));\n\t}", "private List<BigInteger> mergeCandidates(int[][] candidatePartitions){\n\t\tSet<BigInteger> mergePartitions = new HashSet<BigInteger>();\n\t\tdoMerge(mergePartitions, candidatePartitions, BigInteger.valueOf(0), 0);\n\t\treturn new ArrayList<BigInteger>(mergePartitions);\n\t}", "private BDD build_X() {\n\t\tBDD res = factory.makeOne();\n\n\t\tfor(int i = 0; i < this.dimension; i++){\n\t\t\tfor(int j = 0; j < this.dimension; j++){\n\t\t\t\tres.andWith(board[i][j].copy());\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}", "private float crossProduct(Vec2 X, Vec2 Y, Vec2 Z)\n {\n float x1 = Z.x - X.x;\n float y1 = Z.y - X.y;\n float x2 = Y.x - X.x;\n float y2 = Y.y - X.y;\n\n return x1*y2 - x2*y1;\n }", "private Candidate constructCandidate(final ActivationContext currentContext) {\n assert currentContext.getNumberOfClasses() == 3;\n // currentContext has a trace:\n // [C_0, s_0, C_1, s_1, C_2]\n // We now find possible \"piblings\", i.e. siblings of its parent.\n // For that, we invoke findExtensions on the prefix\n // [C_0]\n Map<Integer, ActivationContext> piblings = findExtensions(currentContext.getClass(0));\n\n // Also, we find possible siblings. For that, we invoke findExtensions\n // on the prefix\n // [C_0, s_0, C_1]\n Map<Integer, ActivationContext> siblings = findExtensions(currentContext.getClass(0),\n currentContext.getChildIndex(0), currentContext.getClass(1));\n\n // We now construct a super-instruction candidate, i.e.\n // a tree of height 2. The root of the tree is C_0 (its Java type is unknown).\n Candidate candidate = new Candidate(currentContext.getClass(0), \"?\");\n // Now, we add the children of C_0, i.e. the siblings of C_1 and C_1 itself.\n for (int piblingSlot : piblings.keySet()) {\n if (piblingSlot == currentContext.getChildIndex(0)) {\n // This is C_1. We add it to the candidate and proceed\n // with adding the siblings of C_2 and C_2 itself.\n Candidate.AstNode child =\n candidate.getRoot().setChild(piblingSlot, currentContext.getClass(1), \"?\");\n for (int siblingSlot : siblings.keySet()) {\n if (siblingSlot == currentContext.getChildIndex(1)) {\n // Add C_2\n child.setChild(siblingSlot,\n currentContext.getClass(2),\n currentContext.getJavaType());\n } else {\n // Add a sibling of C_2\n ActivationContext sibling = siblings.get(siblingSlot);\n child.setChild(siblingSlot,\n sibling.getClass(2),\n sibling.getJavaType());\n }\n }\n } else {\n ActivationContext pibling = piblings.get(piblingSlot);\n // Add a sibling of C_1.\n assert pibling.getNumberOfClasses() == 2;\n candidate.getRoot().setChild(piblingSlot,\n pibling.getClass(1),\n pibling.getJavaType());\n }\n }\n // The score of the super-instruction candidate corresponds to the number\n // of activations of the current context.\n candidate.setScore(contexts.get(currentContext));\n return candidate;\n }", "public void MultipointCrossoverDNF (TableVar Variables) {\r\n int i, j, mom, dad, xpoint1, xpoint2;\r\n\r\n // We cross the two better individuals (the first ones)\r\n mom = 0; // Better individual\r\n dad = 1; // Second individual\r\n\r\n // Copy the individuals to cross\r\n for (i=0; i<Variables.getNVars(); i++) {\r\n for (j=0; j<=Variables.getNLabelVar(i); j++) {\r\n Des.setCromElemGene(0, i, j, Inter.getCromElemGene(mom,i, j));\r\n Des.setCromElemGene (1, i, j, Inter.getCromElemGene(dad,i, j));\r\n }\r\n }\r\n\r\n // Generation of the two points for the crossover\r\n xpoint1 = Randomize.Randint (0,(Variables.getNVars()-1));\r\n if (xpoint1!=Variables.getNVars()-1)\r\n xpoint2 = Randomize.Randint ((xpoint1+1),(Variables.getNVars()-1));\r\n else\r\n xpoint2 = Variables.getNVars()-1;\r\n\r\n // Cross the parts between both points\r\n for (i=xpoint1;i<=xpoint2;i++) {\r\n for (j=0; j<=Variables.getNLabelVar(i); j++) {\r\n Des.setCromElemGene(mom, i, j, Inter.getCromElemGene(dad,i,j));\r\n Des.setCromElemGene(dad, i, j, Inter.getCromElemGene(mom,i,j));\r\n }\r\n }\r\n\r\n // New individuals are not evaluated\r\n Des.setIndivEvaluated (mom, false);\r\n Des.setIndivEvaluated (dad, false);\r\n\r\n }", "private static void crossProductMerge(int[][] pointSet, int start, int mid, int end)\n {\n int[][] L = new int[2][mid-start+1];\n int[][] R = new int[2][end-mid];\n for (int i = 0; i<= L[0].length-1; i++)\n {\n L[0][i] = pointSet[0][start+i]; L[1][i] = pointSet[1][start+i];\n }\n for (int j = 0; j<= R[0].length-1; j++)\n {\n R[0][j] = pointSet[0][mid+j+1]; R[1][j] = pointSet[1][mid+j+1];\n }\n int i = 0;\n int j = 0;\n for (int k = start; k <= end; k++) \n {\n if (i == L[0].length || j == R[0].length)\n {\n if (i == L[0].length)\n {\n pointSet[0][k] = R[0][j]; pointSet[1][k] = R[1][j]; j++;\n }\n else\n {\n pointSet[0][k] = L[0][i]; pointSet[1][k] = L[1][i]; i++;\n }\n }\n else\n {\n if (((L[0][i]-pointSet[0][0])*(R[1][j]-pointSet[1][0]))-\n ((R[0][j]-pointSet[0][0])*(L[1][i]-pointSet[1][0])) > 0)\n {\n pointSet[0][k] = L[0][i]; pointSet[1][k] = L[1][i]; i++; \n }\n else\n {\n pointSet[0][k] = R[0][j]; pointSet[1][k] = R[1][j]; j++; \n }\n }\n }\n }", "public static void main(String args[])\n {\n int[] original = {1,2,3,4,5};\n int[] temp1 = new int[original.length]; //this array will hold the first product\n int[] temp2 = new int[original.length]; //this array will hold the second product\n temp1[0] = 1;\n temp2[original.length-1] = 1;\n for(int i=1;i<temp1.length;i++)\n {\n temp1[i] = temp1[i-1]*original[i-1];\n }\n for(int i=original.length-2;i>=0;i--)\n {\n temp2[i] = temp2[i+1]*original[i+1];\n }\n for(int i=0;i<original.length;i++)\n {\n original[i] = temp1[i]*temp2[i];\n System.out.print(original[i] + \" \");\n }\n }", "public static void main(String[] args) {\n TargetSumCombination obj = new TargetSumCombination();\n int nums[] = {1,1,1};\n int res[] = new int[nums.length];\n obj.giveCombinations(nums, res, 0);\n System.out.println(\"-----------------\");\n obj.giveCombinations1(nums, res, 0);\n }", "public StandardSolution (long[] nums){\n \t\tsequence = nums;\n \t\tpartitions = new boolean[sequence.length];\n \t\t\n \t\tRandom rand = new Random();\n \t\tfor (int i = 0; i < partitions.length; i++){\n \t\t\t// worry about seeing?\n \t\t\tpartitions[i] = rand.nextBoolean();\n \t\t}\n \t}", "private static double crossProduct(Point2D a, Point2D b) {\r\n return a.getX() * b.getY() - b.getX() * a.getY();\r\n }", "public SolutionSet[] execute2() throws JMException, ClassNotFoundException {\n baiscSetting();\n /*\n * step2: Initialize the Population\n */\n initPopulation();\n initIdealPoint(); // initialize the ideal point\n\n initNadirPoint(); // initialize the nadir point\n\n initExtremePoints(); // initialize the extreme points\n /*\n * Enter the main loop,into the process of evolution\n */\n while (generations_ < maxGenerations_) {\n /*\n * step3 and step4:Mating Selection and Recombination to generate Offspring Populations\n */\n generateOffspringPopulation();\n /*\n * step5:Environmental Selection\n */\n environmentalSelection(generations_);\n\n generations_++;\n }\n\n// Ranking ranking = new NondominatedRanking(population_);\n// return ranking.getSubfront(0);\n return population_;\n }", "private static TempTable crossProductPair(Table one, Table two) throws ProcessorException {\n\t\ttry {\n\t\t\t// Define product table\n\t\t\tTempTable tempTable = new TempTable(one.getDatabase());\n\t\t\tfor (FieldDefinition fd : one.getFields()) {\n\t\t\t\ttempTable.addField(fd);\n\t\t\t}\n\t\t\tfor (FieldDefinition fd : two.getFields()) {\n\t\t\t\ttempTable.addField(fd);\n\t\t\t}\n\t\t\t\n\t\t\t// Create and load definition into memory\n\t\t\ttempTable.create();\n\t\t\t\n\t\t\t// Populate table with product rows\n\t\t\tClass<?> tempDef = tempTable.getDefinition();\n\t\t\tfor (Tuple oneRow : one.getTuples2()) {\n\t\t\t\t\n\t\t\t\t// Get fields from table one\n\t\t\t\tClass<?> fieldDef = oneRow.getData().getClass();\n\t\t\t\tField[] attrDef = fieldDef.getFields();\n\t\t\t\t\n\t\t\t\t// All \"inserts\" done at the nested level\n\t\t\t\tfor (Tuple twoRow : two.getTuples2()) {\n\t\t\t\t\t\n\t\t\t\t\t// New row instance\n\t\t\t\t\tTableDefinition newRow = (TableDefinition) tempDef.newInstance();\n\t\t\t\t\t\n\t\t\t\t\t// Set fields for table one\n\t\t\t\t\tfor (Field f : attrDef) {\n\t\t\t\t\t\tString fieldName = f.getName();\n\t\t\t\t\t\tObject fieldVal = f.get(oneRow.getData());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!tempTable.isValidFieldValue(fieldName, fieldVal)) {\n\t\t\t\t\t\t\tthrow new ProcessorException(\"Failed to build cross product pair: tuple domains do not match\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttempDef.getField(fieldName).set(newRow, fieldVal);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get fields from table two\n\t\t\t\t\tClass<?> fieldDef2 = twoRow.getData().getClass();\n\t\t\t\t\tField[] attrDef2 = fieldDef2.getFields();\n\t\t\t\t\t\n\t\t\t\t\t// Set fields for table two\n\t\t\t\t\tfor (Field f : attrDef2) {\n\t\t\t\t\t\tString fieldName = f.getName();\n\t\t\t\t\t\tObject fieldVal = f.get(twoRow.getData());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!tempTable.isValidFieldValue(fieldName, fieldVal)) {\n\t\t\t\t\t\t\tthrow new ProcessorException(\"Failed to build cross product pair: tuple domains do not match\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttempDef.getField(fieldName).set(newRow, fieldVal);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Wrap in Tuple and insert\n\t\t\t\t\tTuple tuple = new Tuple(tempTable);\n\t\t\t\t\ttuple.setData(newRow);\n\t\t\t\t\ttempTable.insertTuple(tuple);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn tempTable;\n\t\t\t\n\t\t} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | IOException | IllegalArgumentException | NoSuchFieldException | SecurityException e) {\n\t\t\tthrow new ProcessorException(\"Failed to build cross product pair: \" + e);\n\t\t}\n\t}", "public static TempTable crossProduct(ArrayList<Table> tables) throws ProcessorException {\n\t\tTable prev = null;\n\t\tTempTable product = null;\n\t\t\n\t\tfor (int i = 0; i < tables.size(); i++) {\n\t\t\tif (i == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tprev = tables.get(i - 1);\n\t\t\tif (i == 1) {\n\t\t\t\tproduct = crossProductPair(prev, tables.get(i));\n\t\t\t} else {\n\t\t\t\tproduct = crossProductPair(product, tables.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn product;\n\t}", "protected LinkedList<FunQuadruple> generateCandidates(List<FunQuadruple> lk) {\n\n LinkedList<FunQuadruple> lkPlus1 = new LinkedList<>();\n if (lk.isEmpty()) {\n return lkPlus1;\n }\n Set<ColumnCombinationBitset> subsets = new HashSet<>();\n int k = lk.get(0).candidate.size();\n ColumnCombinationBitset union = new ColumnCombinationBitset();\n for (FunQuadruple subsetQuadruple : lk) {\n // TODO optimise: all bits are set? --> break\n // If subsetQuadruple represents a unique do not add it to subsets and union (it should be pruned).\n if (subsetQuadruple.count == 0) {\n continue;\n }\n union = subsetQuadruple.candidate.union(union);\n subsets.add(subsetQuadruple.candidate);\n }\n\n Map<ColumnCombinationBitset, Integer> candidateGenerationCount = new HashMap<>();\n\n List<ColumnCombinationBitset> lkPlus1Candidates;\n FunQuadruple lkPlus1Member;\n for (ColumnCombinationBitset subset : subsets) {\n lkPlus1Candidates = union.getNSubsetColumnCombinationsSupersetOf(\n subset, k + 1);\n // FIXME add key conditional here\n // Removed key conditional - should not be triggerable?\n for (ColumnCombinationBitset candidate : lkPlus1Candidates) {\n if (candidateGenerationCount.containsKey(candidate)) {\n int count = candidateGenerationCount.get(candidate);\n count++;\n candidateGenerationCount.put(candidate, count);\n } else {\n candidateGenerationCount.put(candidate, 1);\n }\n }\n }\n\n for (ColumnCombinationBitset candidate : candidateGenerationCount\n .keySet()) {\n if (candidateGenerationCount.get(candidate) == (k + 1)) {\n lkPlus1Member = new FunQuadruple(candidate, addPliGenerate(\n candidate).getRawKeyError());\n lkPlus1.add(lkPlus1Member);\n }\n }\n return lkPlus1;\n }", "public static VectorIntf componentProduct(VectorIntf x, VectorIntf y) {\r\n if (x==null) throw new IllegalArgumentException(\"1st arg is null\");\r\n if (y==null) throw new IllegalArgumentException(\"2nd arg is null\");\r\n final int n = x.getNumCoords();\r\n if (n!=y.getNumCoords())\r\n throw new IllegalArgumentException(\"dimensions don't match\");\r\n VectorIntf z = x.newInstance(); // x.newCopy();\r\n try {\r\n for (int i = 0; i < n; i++) {\r\n z.setCoord(i, x.getCoord(i) * y.getCoord(i));\r\n }\r\n }\r\n catch (parallel.ParallelException e) {\r\n e.printStackTrace(); // can never get here\r\n }\r\n return z;\r\n }", "public static void main(String[] args) {\r\n\t\tint[] nums = {1,2,3,4,5,6,3,1};\r\n\t\tSolution2 sol = new Solution2();\r\n\t\tSystem.out.println(sol.distributeCandies(nums));\r\n\t}", "public void MultipointCrossoverCAN (TableVar Variables) {\r\n int i, mom, dad, xpoint1, xpoint2;\r\n \r\n // We cross the two better individuals (the first ones)\r\n mom = 0; // Better individual\r\n dad = 1; // Second individual\r\n \r\n // Copy the individuals to cross\r\n for (i=0; i<Variables.getNVars(); i++) {\r\n Des.setCromElem (0, i, Inter.getCromElem(mom,i));\r\n Des.setCromElem (1, i, Inter.getCromElem(dad,i));\r\n }\r\n\r\n // Generation of the two points for the crossover\r\n xpoint1 = Randomize.Randint (0,(Variables.getNVars()-1));\r\n if (xpoint1!=Variables.getNVars()-1)\r\n xpoint2 = Randomize.Randint ((xpoint1+1),(Variables.getNVars()-1));\r\n else\r\n xpoint2 = Variables.getNVars()-1;\r\n\r\n // Cross the parts between both points\r\n for (i=xpoint1;i<=xpoint2;i++) {\r\n Des.setCromElem(mom, i, Inter.getCromElem(dad,i));\r\n Des.setCromElem(dad, i, Inter.getCromElem(mom,i));\r\n }\r\n\r\n // New individuals are not evaluated\r\n Des.setIndivEvaluated (mom, false);\r\n Des.setIndivEvaluated (dad, false);\r\n \r\n }", "public static void crossValidation() {\n\t\t\n\t\t//---------------------分为k折-----------------------------\n\t\t//初始化为k fold\n\t\tfor(int i=0;i<FOLD;i++) {\n\t\t\tArrayList<Point> tmp = new ArrayList<Point>();\n\t\t\tallData.add(tmp);\n\t\t}\n\t\t//选一个 删一个\n\t\tList<Integer> chosen = new ArrayList<Integer>();\n\t\tfor(int i=0;i<dataSet.size();i++) {\n\t\t\tchosen.add(i);\n\t\t}\n\t\t\n\t\t/*//按照原有比例采样\n\t\tfor(int i=0;i<FOLD;i++) { \n\t\t\tint choose = 0;\n\t\t\twhile( choose < ROW/FOLD && i != FOLD-1) {\n\t\t\t\tint p = pData.size() / FOLD; //采样的小类样本的个数\n\t\t\t\tint rand = new Random().nextInt(dataSet.size());\n\t\t\t\tif( choose < p) {\n\t\t\t\t\tif( chosen.contains(rand) && dataSet.get(rand).getLabel() == 0) {\n\t\t\t\t\t\tchosen.remove(new Integer(rand));\n\t\t\t\t\t\tchoose ++;\n\t\t\t\t\t\tallData.get(i).add(dataSet.get(rand));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif( chosen.contains(rand) && dataSet.get(rand).getLabel() != 0) {\n\t\t\t\t\t\tchosen.remove(new Integer(rand));\n\t\t\t\t\t\tchoose ++;\n\t\t\t\t\t\tallData.get(i).add(dataSet.get(rand));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//最后一折全部添加\n\t\t\tif( i == FOLD-1) {\n\t\t\t\tfor (Integer o : chosen) {\n\t\t\t\t\tallData.get(i).add(dataSet.get(o));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t}*/\n\t\tfor(int i=0;i<FOLD;i++) { \n\t\t\tint choose = 0;\n\t\t\twhile( choose < ROW/FOLD && i != FOLD-1) {\n\t\t\t\tint rand = new Random().nextInt(dataSet.size());\n\t\t\t\tif( chosen.contains(rand)) {\n\t\t\t\t\tchosen.remove(new Integer(rand));\n\t\t\t\t\tchoose ++;\n\t\t\t\t\tallData.get(i).add(dataSet.get(rand));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//最后一折全部添加\n\t\t\tif( i == FOLD-1) {\n\t\t\t\tfor (Integer o : chosen) {\n\t\t\t\t\tallData.get(i).add(dataSet.get(o));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\t//------------------取一折为测试,其余为训练集-----------------------------\n\t\tfor(int fold=0;fold<FOLD;fold++) {\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\n\t\t\tList<Point> trainData = new ArrayList<Point>();\n\t\t\tList<Point> testData = new ArrayList<Point>();\n\t\t\tList<Point> positiveTrainData = new ArrayList<Point>();\n\t\t\tList<Point> positiveTestData = new ArrayList<Point>();\n\t\t\t\n\t\t\ttestData.addAll(allData.get(fold));\n\t\t\tfor (List<Point> ps : allData) {\n\t\t\t\tif( ps != allData.get(fold))\n\t\t\t\t\ttrainData.addAll(ps);\n\t\t\t}\n\t\t\t//select the minority class instances\n\t\t\tfor (Point point : trainData) {\n\t\t\t\tif(point.getLabel() == 0)\n\t\t\t\t\tpositiveTrainData.add(point);\n\t\t\t}\n\t\t\tSystem.out.print(\"train data :\"+trainData.size() + \"\\t\");\n\t\t\tSystem.out.println(\"train positive :\"+positiveTrainData.size());\n\t\t\tfor (Point point : testData) {\n\t\t\t\tif(point.getLabel() == 0)\n\t\t\t\t\tpositiveTestData.add(point);\n\t\t\t}\n\t\t\tSystem.out.print(\"test data :\"+testData.size() + \"\\t\");\n\t\t\tSystem.out.println(\"test positive :\"+positiveTestData.size());\n\t\t\t\n\t\t\tborderline(positiveTrainData,trainData);\n\t\t\t\n\t\t\t//generate new dataset\n\t\t\tString trainFileName = NAME + \"BLTrain\"+fold+\".arff\";\n\t\t\tString testFileName = NAME + \"BLTest\"+fold+\".arff\";\n\t\t\t//TODO dataSet is a bug\n\t\t\tGenerate.generate(trainData,pointSet,COL,fileName,trainFileName);\n\t\t\tGenerate.generate(testData,new ArrayList<Point>(),COL,fileName,testFileName);\n\t\t\tpointSet.clear();\n\t\t\tlong endGenerating = System.currentTimeMillis();\n\t\t\tSystem.out.println(\"产生数据所用时间为:\"+ (endGenerating-start)*1.0/1000 + \"s\");\n\t\t\t\n\t\t\t\n\t\t/*\t//不进行任何处理\n\t\t\ttrainFileName = NAME + \"TrainWS\"+\".arff\";\n\t\t\ttestFileName = NAME + \"TestWS\"+\".arff\";\n\t\t\tGenerate.generate(dataSet,new ArrayList<Point>(),COL,fileName,trainFileName);\n\t\t\tGenerate.generate(testSet,new ArrayList<Point>(),COL,fileName,testFileName);\n//\t\t\tpointSet.clear();\n\t*/\t\t\n\t\t\t\n\t\t\t\n\t\t\tclassify(trainFileName,testFileName);\n\t\t\tlong endClassifying = System.currentTimeMillis();\n\t\t\tSystem.out.println(\"产生数据所用时间为:\"+ (endClassifying-start)*1.0/1000 + \"s\");\n\t\t}\n\t}", "public void evaluate_active_SBoxes() {\n int[] m0_m1 = select(DES_m_Plaintext, IP);\n for (int j = 0; j < 32; j++) {\n DES_m_cipher_sequence[0][j] = m0_m1[j];\n DES_m_cipher_sequence[1][j] = m0_m1[32 + j];\n }\n\n for (int i = 2; i < 18; i++) {\n int[] input_SBoxes = exclusive_or(expand_32bit(DES_m_cipher_sequence[i - 1]), DES_K[i - 2]);\n DES_m_active_SBoxes[i - 2] = input_SBoxes;\n int[] fmK = select(lookup_SBoxes(input_SBoxes), P);\n DES_m_cipher_sequence[i] = exclusive_or(DES_m_cipher_sequence[i - 2], fmK);\n }\n\n // ******* SAME **** SAME ***** SAME ****** SAME *****\n\n m0_m1 = select(DES_m_oplus_Delta_Plaintext, IP);\n for (int j = 0; j < 32; j++) {\n DES_m_oplus_Delta_cipher_sequence[0][j] = m0_m1[j];\n DES_m_oplus_Delta_cipher_sequence[1][j] = m0_m1[32 + j];\n }\n\n for (int i = 2; i < 18; i++) {\n int[] input_SBoxes = exclusive_or(expand_32bit(DES_m_oplus_Delta_cipher_sequence[i - 1]), DES_K[i - 2]);\n DES_m_oplus_Delta_active_SBoxes[i - 2] = input_SBoxes;\n int[] fmK = select(lookup_SBoxes(input_SBoxes), P);\n DES_m_oplus_Delta_cipher_sequence[i] = exclusive_or(DES_m_oplus_Delta_cipher_sequence[i - 2], fmK);\n }\n\n for (int r = 0; r < 16; r++)\n for (int c = 0; c < 48; c++)\n DES_active_SBoxes[r][c] = DES_m_active_SBoxes[r][c] ^ DES_m_oplus_Delta_active_SBoxes[r][c];\n\n DES_active_SBoxes_in_panel = transform_big_to_small_Activity_Matrix(DES_active_SBoxes);\n }", "public List<List<Integer>> combinationSum(int[] candidates, int target) {\n\n List<List<Integer>> result = new ArrayList<>();\n List<Integer> current = new ArrayList<>();\n dfs(candidates ,target, 0 ,0, current , result);\n return result;\n }", "private void generateSquarePartners() {\r\n\t\t// 2 copies of each end point,\r\n\t\t// which will be \"shifted\" to simulate the 2 adjacent squares\r\n\t\tint[] point1Shift1 = Arrays.copyOf(point1, 2);\r\n\t\tint[] point1Shift2 = Arrays.copyOf(point1, 2);\r\n\t\tint[] point2Shift1 = Arrays.copyOf(point2, 2);\r\n\t\tint[] point2Shift2 = Arrays.copyOf(point2, 2);\r\n\t\t\r\n\t\t// used to indicate the orientation of the Line and which axis needs to be shifted\r\n\t\t// 0 == vertical, 1 == horizontal\r\n\t\tint index;\r\n\t\t\r\n\t\tif (point1[0] == point2[0]) {\r\n\t\t\tindex = 0;\r\n\t\t} else {\r\n\t\t\tindex = 1;\r\n\t\t}\r\n\t\t\r\n\t\tif (point1[index] - 1 > 0) {\r\n\t\t\t// square1Partners form the square to the left or above *this* Line\r\n\t\t\t// so shifted points get decremented\r\n\t\t\tpoint1Shift1[index] = point1[index] - 1;\r\n\t\t\tpoint2Shift1[index] = point2[index] - 1;\r\n\t\t\t\r\n\t\t\tsquare1Partners.add(new Line(point1, point1Shift1));\r\n\t\t\tsquare1Partners.add(new Line(point1Shift1, point2Shift1));\r\n\t\t\tsquare1Partners.add(new Line(point2Shift1, point2));\r\n\t\t}\r\n\t\tif (point1[index] + 1 < boardSize) {\r\n\t\t\t// square2Partners form the square to the right or below *this* Line\r\n\t\t\t// so shifted points get incremented\r\n\t\t\tpoint1Shift2[index] = point1[index] + 1;\r\n\t\t\tpoint2Shift2[index] = point2[index] + 1;\r\n\t\t\t\r\n\t\t\tsquare2Partners.add(new Line(point1, point1Shift2));\r\n\t\t\tsquare2Partners.add(new Line(point1Shift2, point2Shift2));\r\n\t\t\tsquare2Partners.add(new Line(point2Shift2, point2));\r\n\t\t}\r\n\t}", "private ResultStage createResultStage(RDD<?> rdd,\n JobAction<?, ?> jobAction,\n List<Integer> partitions,\n int jobId,\n CallSite callSite) {\n // step1: 计算final rdd依赖的所有ShuffleDependency\n // step2: 计算ShuffleDependency依赖的ShuffleMapStage\n // 调用链:\n // DAGScheduler.getOrCreateParentStages(rdd)[final rdd ==> ResultStage]\n // |\n // +---> DAGScheduler.getShuffleDependencies(rdd)[final rdd ==> Set<ShuffleDependency>]\n // |\n // +---> DAGScheduler.getOrCreateShuffleMapStage(shuffleId, jobId)[ShuffleDependency ==> List<ShuffleMapStage>]\n // |\n // +---> DAGScheduler.createShuffleMapStage(shuffleDep, jobId)[ShuffleDependency ==> ShuffleMapStage]\n List<Stage> parents = getOrCreateParentStages(rdd, jobId);\n int id = nextStageId.getAndIncrement();\n ResultStage stage = new ResultStage(id,\n rdd,\n jobAction,\n partitions,\n parents,\n jobId,\n callSite);\n stageIdToStage.put(id, stage);\n updateJobIdStageIdMaps(jobId, Lists.newArrayList(stage));\n return stage;\n }", "public List<List<Integer>> combinationSumII(int target, int[] candidates) {\n if (candidates == null || candidates.length == 0) {\n return new ArrayList<List<Integer>>();\n }\n\n Arrays.sort(candidates);\n ArrayList<List<Integer>> result = new ArrayList<List<Integer>>();\n ArrayList<Integer> cur = new ArrayList<Integer>();\n dfs(0, target, result, cur, candidates);\n return result;\n\n }", "public int possibleCombinations(\r\n\t\t\tList< Scenario > first,\r\n\t\t\tList< Scenario > second\r\n\t\t\t) {\r\n\t\treturn first.size() * second.size();\r\n\t}", "public void calibrationPhase() {\n\t\t// iterate over all secret combination\n\t\tfor (Secret secretA : this.dataSet.getSecrets()) {\n\t\t\tfor (Secret secretB : this.dataSet.getSecrets()) {\n\t\t\t\tif(secretA != secretB) {\n\t\t\t\t\tif(this.optimalBox[0] == 0.0 && this.optimalBox[1] == 0.0) {\n\t\t\t\t\t\tif(searchOptimalBox(secretA, secretB)) {\n\t\t\t\t\t\t\tint smallestSize = searchSmallestSize(secretA, secretB);\n\t\t\t\t\t\t\tthis.openValidationPhase(secretA, secretB, smallestSize, this.optimalBox);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.optimalBox = new double[2];\n\t\t\t\t\t\tthis.optimalBox[0] = 0.0;\n\t\t\t\t\t\tthis.optimalBox[1] = 0.0;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tint smallestSize = searchSmallestSize(secretA, secretB);\n\t\t\t\t\t\tif(smallestSize != 0) {\n\t\t\t\t\t\t\tplotPool.plot(\"Filtered Measurments: User Input Optimal Box (\" + secretA.getName() + \"-\" + secretB.getName() + \")\", this.optimalBox[0], this.optimalBox[1]);\n\n\t\t\t\t\t\t\tthis.openValidationPhase(secretA, secretB, smallestSize, this.optimalBox);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlogger.warning(secretA.getName() + \" < \" + secretB.getName() + \": no significant different result found! You need to measure more times.\");\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "public Tuple2<PhysicalPlan, Map<Integer, CheckpointPlan>> generate() {\n CopyOnWriteArrayList<PassiveCompletableFuture<PipelineStatus>>\n waitForCompleteBySubPlanList = new CopyOnWriteArrayList<>();\n\n Map<Integer, CheckpointPlan> checkpointPlans = new HashMap<>();\n final int totalPipelineNum = pipelines.size();\n Stream<SubPlan> subPlanStream =\n pipelines.stream()\n .map(\n pipeline -> {\n this.pipelineTasks.clear();\n this.startingTasks.clear();\n this.subtaskActions.clear();\n final int pipelineId = pipeline.getId();\n final List<ExecutionEdge> edges = pipeline.getEdges();\n\n List<SourceAction<?, ?, ?>> sources = findSourceAction(edges);\n\n List<PhysicalVertex> coordinatorVertexList =\n getEnumeratorTask(\n sources, pipelineId, totalPipelineNum);\n coordinatorVertexList.addAll(\n getCommitterTask(edges, pipelineId, totalPipelineNum));\n\n List<PhysicalVertex> physicalVertexList =\n getSourceTask(\n edges, sources, pipelineId, totalPipelineNum);\n\n physicalVertexList.addAll(\n getShuffleTask(edges, pipelineId, totalPipelineNum));\n\n CompletableFuture<PipelineStatus> pipelineFuture =\n new CompletableFuture<>();\n waitForCompleteBySubPlanList.add(\n new PassiveCompletableFuture<>(pipelineFuture));\n\n checkpointPlans.put(\n pipelineId,\n CheckpointPlan.builder()\n .pipelineId(pipelineId)\n .pipelineSubtasks(pipelineTasks)\n .startingSubtasks(startingTasks)\n .pipelineActions(pipeline.getActions())\n .subtaskActions(subtaskActions)\n .build());\n return new SubPlan(\n pipelineId,\n totalPipelineNum,\n initializationTimestamp,\n physicalVertexList,\n coordinatorVertexList,\n jobImmutableInformation,\n executorService,\n runningJobStateIMap,\n runningJobStateTimestampsIMap);\n });\n\n PhysicalPlan physicalPlan =\n new PhysicalPlan(\n subPlanStream.collect(Collectors.toList()),\n executorService,\n jobImmutableInformation,\n initializationTimestamp,\n runningJobStateIMap,\n runningJobStateTimestampsIMap);\n return Tuple2.tuple2(physicalPlan, checkpointPlans);\n }", "@Override\n\tpublic List<String> combine() {\n\t\tsuper.prune = false;\n\t\tint iterationCounter = 0;\n\t\tfinal List<Mention> copyContext = Lists.newArrayList(this.context);\n\t\tSystem.out.println(getClass().getName()+\" - Mentions[\"+copyContext+\"]\");\n\t\t// Sorts them for the sake of initialisation picking based on word order\n\t\tCollections.sort(copyContext, Comparators.mentionOffsetComparator);\n\t\t// Computing clusters outside, so we don't have to redo it every time\n\t\tfinal Map<String, List<String>> clusters = computeClusters(copyContext);\n\t\t// Remove entities that do not have an associated embedding\n\t\t// & cluster if they are left w/o entity as a result of it\n\t\tremoveInvalidEmbeddings(clusters);\n\n\t\tfinal Map<String, List<MutablePair<String, Double>>> continuousChoices = new HashMap<>();\n\t\twhile (copyContext.size() > 1 && clusters.size() > 1) {\n\t\t\t// Do the picking logic\n\t\t\tSystem.out.println(\"Displaying (valid) clusters: \"+displayMap(clusters, 10));\n\t\t\tfinal Map<String, Pair<String, Double>> iterationChoices = super.pickItems(clusters);\n\n\t\t\t// If no item has been picked, there is no need to continue... -> jump out\n\t\t\tif (iterationChoices == null || iterationChoices.size() < 1) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t// Processes the choices and removes the worst 'cluster of candidates'\n\t\t\t\tprocessIterationResults(continuousChoices, iterationChoices, clusters, copyContext);\n\t\t\t} catch (IllegalArgumentException | NullPointerException exc) {\n\t\t\t\tSystem.err.println(\"###########################################\");\n\t\t\t\tSystem.out.println(\"Clusters:\" + displayMap(clusters));\n\t\t\t\tSystem.err.println(\"###########################################\");\n\t\t\t\tSystem.out.println(\"Iteration Choices:\" + displayMap(iterationChoices));\n\t\t\t\tSystem.err.println(\"###########################################\");\n\t\t\t\tSystem.err.println(\"Copy context:\" + copyContext);\n\t\t\t\tSystem.err.println(\"###########################################\");\n\t\t\t\tSystem.err.println(\"Context: \" + context);\n\t\t\t\tSystem.err.println(\"###########################################\");\n\t\t\t\tthrow exc;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Iteration(#\" + iterationCounter++ + \") Choices:\");\n\t\t\tSystem.out.println(displayMap(iterationChoices));\n\t\t}\n\n\t\t// Now just get the best one for each surface form\n\t\tfinal List<String> retList = Lists.newArrayList();\n\t\tfor (Entry<String, List<MutablePair<String, Double>>> entrySurfaceForm : continuousChoices.entrySet()) {\n\t\t\tDouble maxValue = Double.MIN_VALUE;\n\t\t\tPair<String, Double> maxPair = null;\n\t\t\tString maxKey = null;\n\n\t\t\tfor (MutablePair<String, Double> pair : entrySurfaceForm.getValue()) {\n\t\t\t\tif (pair.getValue() > maxValue) {\n\t\t\t\t\tmaxPair = pair;\n\t\t\t\t\tmaxValue = pair.getValue();\n\t\t\t\t\tmaxKey = pair.getKey();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (maxKey != null) {\n\t\t\t\tretList.add(maxKey);\n\t\t\t}\n\t\t}\n\n\t\tgetLogger().info(\"FINAL CHOICES[\" + retList.size() + \"]: \" + retList);\n\t\treturn retList;\n\t}", "public static Vector cross(Vector a, Vector b) {\r\n if(a.getDimension() == 3 && b.getDimension() == 3)\r\n return new Vector(a.components[1] * b.components[2] - a.components[2]\r\n * b.components[1], -a.components[0] * b.components[2]\r\n + a.components[2] * b.components[0], a.components[0]\r\n * b.components[1] - a.components[1] * b.components[0]);\r\n else if (a.getDimension() == 2 && b.getDimension() == 2)\r\n return new Vector(a.components[0] * b.components[1] - a.components[1] * b.components[0]);\r\n else return null;\r\n }", "public static List<List<Integer>> gen_size_k_candidate(Map<List<Integer>, Float> oldCandidate, Integer k){\n\n List<List<Integer>> sizeKPlusCandidate = new ArrayList<>();\n\n // size 2 candidate\n if( k <= 1){\n List<Integer> size1Candidate = new ArrayList<>();\n for (List<Integer> size1: oldCandidate.keySet()){\n size1Candidate.addAll(size1);\n }\n // sort\n Collections.sort(size1Candidate);\n // Generate\n sizeKPlusCandidate = CombinationGenerator.findsort(size1Candidate, 2);\n\n }else {\n List<List<Integer>> oldList = new ArrayList<>();\n oldList.addAll(oldCandidate.keySet());\n\n for(int iOld = 0; iOld < oldList.size()-1; iOld ++){\n for(int jOld =iOld+1; jOld < oldList.size(); jOld++){\n // check k element of feature is the same\n List<Integer> formerList = new ArrayList<>();\n List<Integer> laterList = new ArrayList<>();\n\n for (int fl=0; fl < k-1; fl++){\n formerList.add(oldList.get(iOld).get(fl));\n laterList.add(oldList.get(jOld).get(fl));\n }\n\n if (formerList.equals(laterList)){\n\n HashSet<Integer> tempCandidate = new HashSet<>();\n\n tempCandidate.addAll(oldList.get(iOld));\n tempCandidate.addAll(oldList.get(jOld));\n\n List<Integer> tempCandidateList = new ArrayList<>();\n tempCandidateList.addAll(tempCandidate);\n\n Collections.sort(tempCandidateList);\n // Prunning\n List<List<Integer>> prunningCandidate = CombinationGenerator.findsort(tempCandidateList, k);\n\n int flag = 0;\n for(List<Integer> checkPrun: prunningCandidate){\n if(oldCandidate.containsKey(checkPrun)){\n flag++;\n }\n }\n if (flag == k+1){\n sizeKPlusCandidate.add(tempCandidateList);\n }\n }\n }\n }\n }\n return sizeKPlusCandidate;\n }", "Optional<Pairof<X, MultiSet<X>>> choose();", "@Override\r\n\tpublic List<CandidateSteps> candidateSteps() {\n\t\treturn new InstanceStepsFactory(configuration(), new AmxBpmSteps()).createCandidateSteps();\r\n\t}", "public static List<List<Integer>> combinationSum2(int[] candidates, int target) {\n Arrays.sort(candidates);\n List<List<List<Integer>>> dp = new ArrayList<>();\n Map<Integer, Integer> candMap = new HashMap<>();\n for (int i = 0; i < candidates.length; i++) {\n if (candidates[i] > target) break;\n if(candMap.containsKey(candidates[i])) candMap.put(candidates[i], candMap.get(candidates[i]) + 1);\n else candMap.put(candidates[i], 1);\n }\n for (int i = 1; i <= target; i++) {\n Set<List<Integer>> subCand = new HashSet<>();\n for (int j = 0; j < candidates.length && candidates[j] <= i; j++) {\n if (candidates[j] == i) subCand.add(Arrays.asList(i));\n else for (List<Integer> l : dp.get(i - 1 - candidates[j])) {\n if (candidates[j] <= l.get(0)) {\n List<Integer> cl = new ArrayList<>();\n cl.add(candidates[j]);\n cl.addAll(l);\n int cnt = 1;\n for (int a : l) {\n if(a == candidates[j]) cnt++;\n else break;\n }\n if(cnt <= candMap.get(candidates[j])) subCand.add(cl);\n }\n }\n }\n List<List<Integer>> subCandList = new ArrayList<>();\n subCandList.addAll(subCand);\n dp.add(subCandList);\n }\n return dp.get(target - 1);\n }", "public void generateOffspringPopulation() throws JMException{\n\n offspringPopulation_ = new SolutionSet[problemSet_.size()];\n\n for (int task = 0; task < problemSet_.size(); task++){\n offspringPopulation_[task] = new SolutionSet(populationSize_);\n if (crossover_.getClass() == SBXCrossover.class){\n Solution[] parents = new Solution[2];\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n parents = (Solution[]) selection_.execute(population_[task]);\n\n Solution[] offSpring = (Solution[]) crossover_\n .execute(parents);\n mutation_.execute(offSpring[0]);\n problemSet_.get(task).evaluate(offSpring[0]);\n problemSet_.get(task).evaluateConstraints(offSpring[0]);\n offspringPopulation_[task].add(offSpring[0]);\n } // for\n }\n else if (crossover_.getClass() == EGG.class){\n\n int[] permutation = new int[populationSize_];\n Utils.randomPermutation(permutation, populationSize_);\n etmo.util.Ranking ranking = new etmo.util.Ranking(population_[task]);\n SolutionSet front = ranking.getSubfront(0);\n\n front.Suppress();\n SolutionSet KP = null;\n if(front.size()> problemSet_.get(task).getNumberOfObjectives())\n KP = findingKneePoint(front, task);\n if(KP == null){\n KP = population_[task];\n }\n\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n int n = permutation[i];\n // STEP 2.1. Mating selection\n int r1,r2;\n r1 = PseudoRandom.randInt(0, KP.size() - 1);\n do {\n r2 = PseudoRandom.randInt(0, KP.size() - 1);\n } while (r2==r1);\n // STEP 2.2. Reproduction\n Solution child;\n Solution[] parents = new Solution[3];\n\n// 加入迁移:\n double tranRand = PseudoRandom.randDouble();\n if (tranRand <= 0.1){\n parents[1] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[2] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n\n else {\n parents[1] = KP.get(r1);\n parents[2] = KP.get(r2);\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n } // for\n }\n\n }\n\n\n\n\n }", "public double getProduct()\n {\n return first * second;\n }", "private void crossover() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < pop_size; i++) { // go through population\r\n\r\n int a = new Random().nextInt(this.pop_size);\r\n int b = new Random().nextInt(this.pop_size);\r\n\r\n int split_point = new Random().nextInt(this.gene_size);\r\n\r\n float[] p1_genes = this.parent_population.getPopulation()[a].getGenes();\r\n float[] p2_genes = this.parent_population.getPopulation()[b].getGenes();\r\n\r\n float[] c1_genes = new float[gene_size];\r\n float[] c2_genes = new float[gene_size];\r\n\r\n for (int j = 0; j < gene_size; j++) {\r\n\r\n if (j < split_point) {\r\n c1_genes[j] = p1_genes[j];\r\n c2_genes[j] = p2_genes[j];\r\n } else {\r\n c2_genes[j] = p1_genes[j];\r\n c1_genes[j] = p2_genes[j];\r\n }\r\n }\r\n individual child1 = new individual(c1_genes, solutions, output);\r\n individual child2 = new individual(c2_genes, solutions, output);\r\n\r\n if (child1.getFitness() > child2.getFitness()) {\r\n temp_pop[i] = child1;\r\n } else {\r\n temp_pop[i] = child2;\r\n }\r\n }\r\n this.offspring_population.setPopulation(temp_pop);\r\n this.offspring_population.update_population();\r\n }", "public List<Candidates> getMultiWinnerCandidates() {\n List<Candidates> singleCandidates = getWinningSingleCandidates();\n List<Candidates> multiWinners = new ArrayList<>();\n Map<Integer, Integer> partyResult = multiService.mandatesByParty();\n for (Entry<Integer, Integer> partyMandateCount : partyResult.entrySet()) {\n int numberMandates = partyMandateCount.getValue();\n int counter=0;\n for (Candidates partyCandidates : candidateService.findByPartyId(partyMandateCount.getKey())) { \n while (numberMandates >= 1) { \n Candidates newPartyCandidate = candidateService.findByPartyAndSeat(partyMandateCount.getKey(),\n counter + 1);\n// Candidates newAlsoPartyCandidate = candidateService.findByPartyAndSeat(partyMandateCount.getKey(),\n// counter+2);\n counter++; \n if (singleCandidates.contains(newPartyCandidate)) {\n while(singleCandidates.contains(newPartyCandidate)==false){\n multiWinners.add(newPartyCandidate);\n counter++;\n break;\n }\n } else {\n multiWinners.add(newPartyCandidate);\n break;\n } \n \n }\n numberMandates--;\n \n }\n }\n\n System.out.println(multiWinners.size());\n\n for (Candidates candidate : multiWinners) {\n candidate.setCandidate_elected(\"multi\");\n candidateService.saveOrUpdate(candidate);\n }\n return multiWinners;\n }", "private Evolvable zipperCross(Evolvable parent1, Evolvable parent2)\n\t{\n\t\tint[] dnaP1 = ((SNSAgent)parent1).getDna();\n\t\t//dna of second parent\n\t\tint[] dnaP2 = ((SNSAgent)parent2).getDna();\n\t\t\n\t\t//result dna\n\t\tint dnaChild[] = new int[3000];\n\t\t//simple cross\n\t\tfor(int i = 0; i < 3000; i++)\n\t\t{\t\t\n\t\t\tif(i%2 == 0)\n\t\t\t\tdnaChild[i] = dnaP1[i];\n\t\t\telse\n\t\t\t\tdnaChild[i] = dnaP2[i];\n\t\t}\n\t\treturn new SNSAgent(dnaChild, ((SNSAgent)parent1).behavior);\t\n\t}", "public void crossover(){\n \t\n \t//int cut2 = ((NODELENGTH * 3 + 1) / 3) + cut;\n \tfor (int g = 0; g < (wallpapers.size() - 1); g += 2){\n \t\tint cut = getCutPoint();\n \t\tint[] parent1 = wallpapers.get(g);\n \t\tint[] parent2 = wallpapers.get(g + 1);\n \t\t\n \t\tint[] child1 = new int[parent1.length];\n \t\tint[] child2 = new int[parent2.length];\n \t\tfor (int i = 0; i < (cut); i++){\n \t\t\tchild1[i] = parent1[i];\n \t\t\tchild2[i] = parent2[i];\n \t\t}\n \t\tfor (int j = cut; j < parent1.length; j++){\n \t\t\tchild1[j] = parent2[j];\n \t\t\tchild2[j] = parent1[j];\n \t\t}\n \t\t\n \t\t\n \t\twallpapers.set(g, child1);\n \t\twallpapers.set(g + 1, child2);\n \t}\n \tfor (int d = 0; d < (wallpapers.size() * 2); d++){\n \t\tif (d < wallpapers.size()){\n \t\t\ttemp_wallpapers.add(wallpapers.get(d));\n \t\t}\n \t\telse {\n \t\t\ttemp_wallpapers.add(node());\n \t\t}\n \t}\n \twallpapers.clear();\n \tfor (int u = 0; u < temp_wallpapers.size(); u++){\n\t\t\twallpapers.add(u, temp_wallpapers.get(u));\n\t\t}\n \ttemp_wallpapers.clear();\n }", "public static void main(String[] args){\n\n ArrayList<String> test = new ArrayList<>();\n test.add(\"T\");\n test.add(\"L\");\n\n ArrayList<String> test2 = new ArrayList<>();\n test2.add(\"P\");\n\n PFD pfd1 = new PFD(test,test2,1);\n\n ArrayList<String> test3 = new ArrayList<>();\n test3.add(\"T\");\n test3.add(\"L\");\n\n ArrayList<String> test4 = new ArrayList<>();\n test4.add(\"M\");\n\n PFD pfd2 = new PFD(test3,test4,1);\n\n ArrayList<String> test5 = new ArrayList<>();\n test5.add(\"P\");\n ArrayList<String> test6 = new ArrayList<>();\n test6.add(\"M\");\n\n ArrayList<String> test7 = new ArrayList<>();\n test7.add(\"T\");\n ArrayList<String> test8 = new ArrayList<>();\n test8.add(\"S\");\n\n PFD pfd3 = new PFD(test5,test6,3);\n PFD pfd4 = new PFD(test7,test8,3);\n ArrayList<PFD> test2List = new ArrayList<PFD>(Arrays.asList(pfd1, pfd2));\n ArrayList<String> r = new ArrayList<String>(Arrays.asList(\"M\", \"S\", \"T\", \"P\"));\n// System.out.println(test2List);\n// System.out.println(\"Closure: \" + getClosureForAttr(new ArrayList<String>(Arrays.asList(\"T\",\"M\")),test2List,1));\n// System.out.println(\"BDNF? \"+ isSatisfiedBDFN(test2List,3));\n// System.out.println(getCanCover1(test2List));\n// S = DecomposeWithTheCertainty(r,test2List,4);\n// System.out.println(turnDeOutputToString());\n// System.out.println(getAllComb(r, new ArrayList<ArrayList<String>>()));\n\n// System.out.println(getMinimalKeys(test2List,r,4));\n\n// System.out.println(\"B-prime: \"+getBetaPrimeList(test2List,r,2));\n// System.out.println(\"Satisfied 3NF? \"+isSatisfied3NF(test2List,r,3));\n// System.out.println(\"Is not subset:\"+isNotSubset(pfd4,test2List));\n ArrayList<String> t = new ArrayList<>();\n t.add(\"A\");\n t.add(\"B\");\n t.add(\"C\");\n ArrayList<String> t1 = new ArrayList<>();\n t1.add(\"B\");\n t1.add(\"A\");\n// t1.add(\"D\");\n t.retainAll(t1);\n// System.out.println(t.toString());\n// System.out.println(String.join(\"\",t1));\n//\n// System.out.println(getAllCombo(r).toString());\n double x = 2 / 3.0;\n System.out.println(x);\n\n}", "private Evolvable cross(Evolvable parent1, Evolvable parent2)\n\t{\n\t\tif(((SNSAgent)parent1).getBehavior().equals(\"RuleBased\"))\n\t\t{\t\n\t\t\tint split = R.nextInt(7) + 1;\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn ruleZipperCross(parent1, parent2);\n\t\t\telse if(crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, split);\n\t\t\telse if(crossBehavior.equals(\"smartCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, split);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint split = R.nextInt(1000) + 100;\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn zipperCross(parent1, parent2);\n\t\t\telse if (crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn splitCross(parent1, parent2, split);\n\t\t\telse if (crossBehavior.equals(\"freeSplitCross\")){\n\t\t\t\treturn splitCross(parent1, parent2, R.nextInt(3000));\n\t\t\t}\n\t\t\telse if(crossBehavior.equals(\"smartCross\"))\n\t\t\t{\n\t\t\t\tsplit = ((SNSAgent)parent1).getCurrentMove() - R.nextInt(30);\n\t\t\t\treturn splitCross(parent1, parent2, split);\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\n\t\treturn zipperCross(parent1, parent2);\n\t}", "public int selectionFunctionBiggestCoin(MyList<Integer> candidates){\n\n\t\t//-----------------------------\n\t\t//Output Variable --> InitialValue\n\t\t//-----------------------------\n\t\tint res = -1;\n\n\t\t//-----------------------------\n\t\t//SET OF OPS\n\t\t//-----------------------------\n\t\tint maxWeight = Integer.MIN_VALUE;\n\t\tint index = candidates.length() - 1;\n\n\n\t\twhile (index >= 0) {\n\t\t\t// OP1.1. Auxiliary variables:\n\t\t\t// We use 'e0' to compute the first item of 'candidate' just once.\n\t\t\tint e0 = candidates.getElement(index);\n\n\t\t\t// OP1.1. If a not previously considered item improves minWeight, we\n\t\t\t// update 'res' and 'minWeight'\n\t\t\tif (e0 > maxWeight) {\n\t\t\t\tres = index;\n\t\t\t\tmaxWeight = e0;\n\t\t\t}\n\n\t\t\t// OP1.2. We decrease 'index' so as to try the previous item of\n\t\t\t// 'candidates'\n\t\t\tindex--;\n\t\t}\n\n\t\t//-----------------------------\n\t\t//Output Variable --> Return FinalValue\n\t\t//-----------------------------\t\t\n\t\treturn res;\t\t\n\t}", "public CascadeAccumulator[] executeInitialStage() {\n int indexCntKeptDocs = 0;\n\n // Clear priority queue.\n mSortedAccumulators.clear();\n\n // Cliques associated with the MRF.\n List<Clique> cliques = mMRF.getCliques();\n\n if (cliques.size() == 0) {\n throw new RetrievalException(\"Shouldn't have size 0!\");\n }\n\n // Current accumulator.\n CascadeAccumulator a = mAccumulators[0];\n\n // Maximum possible score that this MRF can achieve.\n float mrfMaxScore = 0.0f;\n for (Clique c : cliques) {\n if (!((((CascadeClique) c).getParamID()).equals(\"termWt\"))) {\n System.out\n .println(\"In this faster cascade implementation, first stage must be term in order to get positions[] values! \"\n + ((CascadeClique) c).getParamID());\n System.exit(-1);\n }\n mrfMaxScore += c.getMaxScore();\n }\n\n // Sort cliques according to their max scores.\n Collections.sort(cliques, maxScoreComparator);\n\n // Score that must be achieved to enter result set.\n double scoreThreshold = Double.NEGATIVE_INFINITY;\n\n // Offset into document set we're currently at (if applicable).\n int docsetOffset = 0;\n\n int docno = 0;\n if (mDocSet != null) {\n docno = docsetOffset < mDocSet.length ? mDocSet[docsetOffset++] : Integer.MAX_VALUE;\n } else {\n docno = mMRF.getNextCandidate();\n }\n\n boolean firstTime = true;\n\n while (docno < Integer.MAX_VALUE) {\n for (DocumentNode documentNode : mDocNodes) {\n documentNode.setDocno(docno);\n }\n\n // Document-at-a-time scoring.\n float docMaxScore = mrfMaxScore;\n boolean skipped = false;\n\n float score = 0.0f;\n\n // Lidan: accumulate document scores across the cascade stages\n// if (mDocSet != null && cascadeStage != 0) {\n// score = accumulated_scores[docsetOffset - 1];\n// }\n\n // for each query term, its position in a document\n int[][] termPositions = new int[cliques.size()][];\n int doclen = -1;\n\n for (int i = 0; i < cliques.size(); i++) {\n // Current clique that we're scoring.\n CascadeClique c = (CascadeClique) cliques.get(i);\n\n if (firstTime) {\n termToCliqueNumber.put(c.getConcept().trim().toLowerCase(), i);\n cf.put(c.getConcept().trim().toLowerCase(), c.termCollectionCF());\n df.put(c.getConcept().trim().toLowerCase(), c.termCollectionDF());\n }\n\n if (score + docMaxScore <= scoreThreshold) {\n // Advance postings readers (but don't score).\n for (int j = i; j < cliques.size(); j++) {\n cliques.get(j).setNextCandidate(docno + 1);\n }\n skipped = true;\n\n break;\n }\n\n // Document independent cliques do not affect the ranking.\n if (!c.isDocDependent()) {\n continue;\n }\n\n // Update document score.\n float cliqueScore = c.getPotential();\n score += c.getWeight() * cliqueScore;\n\n // Update the max score for the rest of the cliques.\n docMaxScore -= c.getMaxScore();\n\n // stuff needed for document evaluation in the next stage\n int[] p = c.getPositions();\n\n if (p != null) {\n termPositions[i] = Arrays.copyOf(p, p.length);\n doclen = c.getDocLen();\n }\n }\n\n firstTime = false;\n\n // Keep track of mNumResults best accumulators.\n if (!skipped && score > scoreThreshold) {\n a.docno = docno;\n a.score = score;\n a.index_into_keptDocs = indexCntKeptDocs;\n keptDocLengths[indexCntKeptDocs] = doclen;\n\n mSortedAccumulators.add(a);\n\n // save positional information for each query term in the document\n for (int j = 0; j < termPositions.length; j++) {\n\n if (termPositions[j] != null) {\n keptDocs[indexCntKeptDocs][j] = Arrays.copyOf(termPositions[j], termPositions[j].length);\n }\n }\n\n if (mSortedAccumulators.size() == mNumResults + 1) {\n a = mSortedAccumulators.poll(); // Re-use the accumulator of the removed document\n\n // After maximum # docs been put into queue, each time a new document is added, an old\n // document will be ejected, use the spot freed by the ejected document to store the new\n // document positional info in keptDocs\n\n indexCntKeptDocs = a.index_into_keptDocs;\n keptDocs[indexCntKeptDocs] = new int[numQueryTerms][];\n\n scoreThreshold = mSortedAccumulators.peek().score;\n\n } else {\n a = mAccumulators[mSortedAccumulators.size()]; // Next non-used accumulator in the\n // accumulator pool\n indexCntKeptDocs++;\n }\n\n }\n\n if (mDocSet != null) {\n docno = docsetOffset < mDocSet.length ? mDocSet[docsetOffset++] : Integer.MAX_VALUE;\n } else {\n docno = mMRF.getNextCandidate();\n }\n }\n\n // Grab the accumulators off the stack, in (reverse) order.\n CascadeAccumulator[] results_tmp = new CascadeAccumulator[Math.min(mNumResults,\n mSortedAccumulators.size())];\n\n for (int i = 0; i < results_tmp.length; i++) {\n results_tmp[results_tmp.length - 1 - i] = mSortedAccumulators.poll();\n meanScore += results_tmp[results_tmp.length - 1 - i].score;\n }\n\n meanScore /= results_tmp.length;\n\n CascadeAccumulator[] results = results_tmp;\n\n return results;\n }", "private List<int[]> buildNewCandidates(List<int[]> lastCandidates){\n Map<String, SetWithFrequency> frequency = new HashMap<>();\n\n // Set the threshold to be k\n int threshold = lastCandidates.get(0).length + 1;\n\n // Creates new candidates by merging the previous sets\n for (int i = 0; i < lastCandidates.size(); i++){\n for (int j = i + 1; j < lastCandidates.size(); j++){\n int[] firstSet = lastCandidates.get(i);\n int[] secondSet = lastCandidates.get(j);\n\n int[] candidate = mergeTwoSet(firstSet, secondSet);\n\n if (candidate != null){\n\n // This is a valid candidate (contains all elements from first / second set)\n String key = arrayToString(candidate);\n\n if (frequency.containsKey(key)){\n frequency.get(key).frequency++;\n } else{\n frequency.put(key, new SetWithFrequency(key, candidate, 1));\n }\n }\n }\n }\n\n List<int[]> res = new ArrayList<>();\n\n threshold = threshold * (threshold - 1) / 2;\n for (SetWithFrequency entry: frequency.values()){\n // Prune the candidates which does not have all subsets being frequent\n if (entry.frequency == threshold){\n res.add(entry.set);\n }\n }\n\n return res;\n }", "public static void stageTwo() {\n status.recount();\n if (play) {\n coar_maze1.ending1();\n }\n while (status.getCounter() < 6 && play) {\n coar_maze1.direction();\n if (coar_maze1.china) {\n china_maze.china_orbs();\n china_maze.china_enemies();\n } else if (coar_maze1.amazon_forest) {\n amazon_jungle.amazon_river_orbs();\n amazon_jungle.amazon_river_enemies();\n }\n status.addCounter();\n quit();\n }\n status.recount();\n }", "public static void main(String args[]) {\n int[][] A = new int[][]{ {1, 0, 0}, {-1, 0, 3}};\n int[][] B = new int[][]{ {7, 0, 0}, {0, 0, 0}, {0, 0, 1}};\n\n int[][] resultBruteForce = sparseMatrixMultiplyBruteForce(A, B);\n int[][] resultBestCase = sparseMatrixMultiplyBestCase(A, B);\n\n System.out.println(\"BRUTE FORCE CASE: \");\n for(int i = 0; i < resultBruteForce.length; i++) {\n for (int j = 0; j < resultBruteForce[0].length; j++) {\n System.out.println(resultBruteForce[i][j]);\n }\n }\n\n System.out.println(\"BEST CASE: \");\n for(int i = 0; i < resultBestCase.length; i++) {\n for (int j = 0; j < resultBestCase[0].length; j++) {\n System.out.println(resultBestCase[i][j]);\n }\n }\n }", "public List<Individual> crossover2Point2(Individual parent1, Individual parent2) {\n List <Individual> listOffsprings = new ArrayList<Individual>();\n Individual offspring1 = new Individual(parent1.getChromosomeLength());\n Individual offspring2 = new Individual(parent1.getChromosomeLength());\n int crossoverPoint1 = Service.rand(0, parent1.getChromosomeLength()-1);\n int crossoverPoint2 = Service.rand(crossoverPoint1 + 1, crossoverPoint1 + parent1.getChromosomeLength() - 1);\n\n for(int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n if (crossoverPoint2 >= parent1.getChromosomeLength()) {\n if(geneIndex >= crossoverPoint1 || geneIndex < (crossoverPoint2 - parent1.getChromosomeLength())) {\n offspring1.setGene(geneIndex, parent2.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent1.getGene(geneIndex ));\n } else {\n offspring1.setGene(geneIndex, parent1.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent2.getGene(geneIndex ));\n }\n }else {\n if(geneIndex >= crossoverPoint1 && geneIndex < crossoverPoint2) {\n offspring1.setGene(geneIndex, parent2.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent1.getGene(geneIndex ));\n } else {\n offspring1.setGene(geneIndex, parent1.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent2.getGene(geneIndex ));\n }\n }\n }\n listOffsprings.add(offspring1);\n listOffsprings.add(offspring2);\n return listOffsprings;\n }", "public static Map<List<Integer>, List<List<Integer>>> CollectTableInstasnces(List<List<Integer>> candidateList,\n Map<Integer,Map<List<Integer>, List<List<Integer>>>> starNeighbor,\n Map<List<Integer>, List<List<Integer>>> tableInstanceSizekSub1,\n int k){\n\n\n // [A, B]:[[1,2],[1,3]]\n // Return table instances\n Map<List<Integer>, List<List<Integer>>> tableInstances = new HashMap<>();\n\n // convert candidate to hashset\n Set<List<Integer>> candidateSet = new HashSet<>(candidateList);\n\n for(List<Integer> candidate: candidateSet){\n if (starNeighbor.containsKey(candidate.get(0))){\n\n // get remain candidate list\n List<Integer> remainCandidateElement = candidate.subList(1, k+1);\n\n // store the table instance of the current candidate\n List<List<Integer>> realCliquesAll = new ArrayList<>();\n\n // Loop hashmap\n Iterator<Map.Entry<List<Integer>, List<List<Integer>>>> itr = starNeighbor.get(candidate.get(0)).entrySet().iterator();\n while (itr.hasNext()){\n Map.Entry<List<Integer>, List<List<Integer>>> entry = itr.next();\n // put remain instance\n List<List<Integer>> tempRemain = new ArrayList<>();\n\n for (Integer feature : remainCandidateElement) {\n List<Integer> remainPoint = entry.getValue().parallelStream().filter( point ->\n point.get(0).equals(feature))\n .map(inst -> inst.get(1))\n .collect(Collectors.toList());\n\n if (!remainPoint.isEmpty()) {\n tempRemain.add(remainPoint);\n }\n }\n\n if (tempRemain.size() == k){\n // store the first instance into it\n tempRemain.add(0, Arrays.asList(entry.getKey().get(1)));\n\n // Cartesian product tempRemain based on combinatoricslib lib\n List<List<Integer>> remainFeatureInstance = MyGenerator.cartesianProductInteger(tempRemain);\n\n // Check real cliques\n List<List<Integer>> realClique = remainFeatureInstance.parallelStream().filter( row -> {\n\n return tableInstanceSizekSub1.get(remainCandidateElement).contains(row.subList(1, k+1));\n\n }).collect(Collectors.toList());\n\n if (!realClique.isEmpty()){\n realCliquesAll.addAll(realClique);\n }\n\n }\n }\n // put in table instances\n if(!realCliquesAll.isEmpty()){\n tableInstances.put(candidate, realCliquesAll);\n }\n }\n\n }\n return tableInstances;\n }", "public List<Candidates> consolidatedWinner() {\n List<Candidates> winnersFinal = new ArrayList<>();\n winnersFinal.addAll(getWinningSingleCandidates());\n winnersFinal.addAll(getMultiWinnerCandidates());\n return winnersFinal;\n }", "public boolean canBuildNextStage() {\r\n\t\tSystem.out.print(\"Checking if \" + stages[stagesCompleted]\r\n\t\t\t\t+ \" can be built:\");\r\n\t\tSimpleResList costSRL = SimpleResList\r\n\t\t\t\t.buildCostList(stages[stagesCompleted]);\r\n\t\tSystem.out\r\n\t\t\t\t.println((canBuildStage(stages[stagesCompleted], costSRL) ? \" true \"\r\n\t\t\t\t\t\t: \" false \"));\r\n\t\t// TODO needs code to see if there is enough money to buy the goods from\r\n\t\t// the neighbors(if they have the goods).....look buildCommandOptions\r\n\t\treturn canBuildStage(stages[stagesCompleted], costSRL); // this is only\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// checking to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// see if this\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// board can\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// afford it\r\n\t}", "private int[] productExceptSelfByMath(int[] nums){\n int len = nums.length;\n int[] ret = new int[len]; // not count as extra space\n\n int[] preMul = new int[len];\n int[] sufMul = new int[len];\n\n // head and tail\n preMul[0] = 1;\n sufMul[len - 1] = 1;\n // prefix multiply\n for(int i = 1; i < len; i++){\n preMul[i] = preMul[i - 1] * nums[i - 1];\n }\n // suffix multiply\n for(int i = len -2; i >= 0; i--){\n sufMul[i] = sufMul[i + 1] * nums[i + 1];\n }\n // cross\n for(int i = 0; i < len; i++){\n ret[i] = preMul[i] * sufMul[i];\n }\n\n return ret;\n }", "public Vector<T> crossProduct(Vector<T> aVector) throws VectorSizeException;", "public static void main(String[] args) {\n\t\t\r\n\t\t\r\n\t\tSolution sl = new Solution();\r\n\t\tint[] arr = {1,2,3,4};\r\n\t\t\r\n\t\tint[] result = sl.productExceptSelf(arr);\r\n\t\t\r\n\t\tfor (int i : result) {\r\n\t\t\tSystem.out.print(i+\" \");\r\n\t\t}\r\n\t\t\r\n\t\t//System.out.println(result);\r\n\t}", "Tour crossOver(Tour p2, int x1, int x2) {\r\n\t\t// make an empty tour and then fill it in\r\n\t\tTour child = new Tour();\r\n\r\n\t\t// copy the 1st segment of (this) to the child\r\n\t\tfor (int i = 0; i < x1; i++) {\r\n\t\t child.index[i] = this.index[i];\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = x1; i <= x2; i++) {\r\n\t\t child.index[i] = p2.index[i];\r\n\t\t}\r\n\t\t// copy the cross-over portion of p2 to the child\r\n\t\t\r\n for (int i = x2 + 1; i < index.length; i++) {\r\n child.index[i] = this.index[i];\r\n }\t\t\r\n\t\t// copy the last segment of (this) to the child\r\n\r\n\t\t// Now we need to correct the child for any duplicate cities\r\n\t\t\r\n\t\t// First find out the unique elements of the cross-over segment\r\n\t\t// i.e., those elements of the cross-over segment of\r\n\t\t// p1 that are not in p2\r\n\t\tint[] uniq = new int[x2 - x1 + 1];\r\n\t\tint k = 0;\r\n\t\tboolean found = false;\r\n for (int i = x1; i <= x2; i++) {\r\n for (int j = x1; j <= x2; j++) {\r\n if (this.index[i] == p2.index[j]) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (found) {\r\n found = false;\r\n continue;\r\n }\r\n uniq[k] = this.index[i];\r\n k++;\r\n }\r\n System.out.println();\r\n\t\t// *** TODO ***\r\n \r\n k--;\r\n found = false;\r\n for (int i = x1; i <= x2; i++) {\r\n for (int j = 0; j < x1; j++) {\r\n if (child.index[i] == child.index[j]) {\r\n child.index[i] = uniq[k];\r\n k--;\r\n found = true;\r\n break;\r\n }\r\n }\r\n \r\n if (found) {\r\n found = false;\r\n continue;\r\n }\r\n \r\n for (int j = x2 + 1; j < index.length; j++) {\r\n if (child.index[i] == child.index[j]) {\r\n child.index[i] = uniq[k];\r\n k--;\r\n break;\r\n }\r\n }\r\n }\r\n\t\t// scan the two portions of p1 that have been crossed into the\r\n\t\t// the child for any duplicates in the crossed-over \r\n\t\t// segment and if so replace with an element from the uniq list\r\n\t\t\r\n\t\tchild.distance = child.distance();\r\n\t\treturn child;\r\n\t}", "public static int MatrixChainMultDP(){\n int dp[][] = new int[n][n];\n\n // cost is zero when multiplying one matrix. \n for(int i=0;i<n;i++)\n dp[i][i] = 0;\n\n for(int L = 2;L < n;L++){\n for(int i=1;i<n;i++){\n int j = i + L - 1;\n if(j >= n)\n continue;\n dp[i][j] = Integer.MAX_VALUE;\n for(int k = i;k<j;k++){\n dp[i][j] = Math.min(dp[i][j] , dp[i][k] + dp[k+1][j] + (ar[i-1] * ar[k] * ar[j]));\n }\n }\n }\n return dp[1][n-1];\n\n }", "default Cocartesian<A, Choice2<A, B>, P> choose() {\n return this.<A>cocartesian().contraMap(Choice2::b);\n }", "final void mulV2() {\n\t\t\tV2Obj r = stack[--sp];\r\n\t\t\tV2Obj l = stack[--sp];\r\n\t\t\tV2Obj res = heap[hp++];\r\n\t\t\tres.a = l.a * r.a - l.a * r.b;\r\n\t\t\tres.b = l.a * r.b + l.b * r.a;\r\n\t\t\tstack[sp++] = res;\r\n\t\t}", "public void runMaxProductAndDecompose() throws AlgorithmException\n {\n Submodel invariant = recursiveMaxProduct();\n \n logger.info(\"submodels before merge\");\n DataPrinter.printSubmodels(\"submodels.dat\", _submodels);\n \n // merge submodels\n _submodels = SubmodelAlgorithms.mergeSubmodelsByIndepVar(_submodels);\n\n //_submodels = SubmodelAlgorithms.mergeSubmodels(_submodels);\n\n DataPrinter.printSubmodels(\"merged-models.dat\", _submodels);\n \n // filter submodels that do not explain any knockout effects\n if(filter)\n {\n for(ListIterator it = _submodels.listIterator(); it.hasNext();)\n {\n Submodel m = (Submodel) it.next(); \n int numKO = countKO(m);\n m.setNumExplainedKO(numKO);\n if( numKO < 3 )\n {\n logger.info(\"Submodel \" + m.getId() + \" explains no KO's\");\n \n it.remove();\n }\n }\n }\n\n // make the invariant model the first submodel\n _submodels.add(0, invariant);\n \n // annotate edges of submodel\n _fg.annotateSubmodelEdges(_submodels);\n\n // print submodels\n logger.info(\"### Decomposed models: \" + _submodels.size());\n \n for(Iterator it = _submodels.iterator(); it.hasNext();)\n {\n logger.info(_fg.toString((Submodel) it.next()));\n }\n \n logger.info(\"### Found \" + _submodels.size() + \" submodels\");\n \n // send submodels to interaction graph\n _fg.getInteractionGraph().setSubmodels(_submodels);\n }", "public Collection<Plan> getMinusPlan(CompilerContext context, Collection<Plan> p1, Collection<Plan> p2) {\n return p1.stream().flatMap( pp1 ->\n p2.stream().flatMap(pp2 ->\n Stream.of(context.asPlan(new Difference(pp1, pp2)))\n )\n ).collect(Collectors.toList());\n }", "protected abstract Set<Part> generateParts(List<Card> cards, List<Card> jokers);", "public List<List<Integer>> combinationSum(int[] candidates, int target) {\n Arrays.sort(candidates);\n List<List<Integer>> list = new ArrayList<>();\n \n List<Integer> path = new ArrayList();\n dfs(target, path, list, candidates, 0);\n \n return list;\n }", "public abstract Stage getNextStage(int score);", "static double cross(Vec a, Vec b) {\n return a.x * b.y - a.y * b.x;\n }", "private Set<WorkflowPlan> evaluatePlansFromScheduler(Set<WorkflowPlan> candidatePlans) {\n return candidatePlans;\n }", "public static void main(String[] args) {\n\t\tList<List<Integer>> res = combinationSum2(new int[]{1,1,2,2,4,5,5,6,7,8,9}, 17);\n\t\t//expected:<[[8, 9], [1, 7, 9], [2, 6, 9], [2, 7, 8], [4, 5, 8], [4, 6, 7], [5, 5, 7], \n\t\t//[1, 1, 6, 9], [1, 1, 7, 8], [1, 2, 5, 9], [1, 2, 6, 8], [1, 4, 5, 7], [1, 5, 5, 6], \n\t\t//[2, 2, 4, 9], [2, 2, 5, 8], [2, 2, 6, 7], [2, 4, 5, 6], [1, 1, 2, 4, 9], [1, 1, 2, 5, 8], \n\t\t//[1, 1, 2, 6, 7], [1, 1, 4, 5, 6], [1, 2, 2, 4, 8], [1, 2, 2, 5, 7], [1, 2, 4, 5, 5], [1, 1, 2, 2, 4, 7], \n\t\t//[1, 1, 2, 2, 5, 6]]>\n\t\t//but was:\n\t\tfor (int i = 0; i < res.size(); i++) {\n\t\t\tfor (int num : res.get(i)) {\n\t\t\t\tSystem.out.print(num + \", \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private String[] getCrossProduct(String digits) {\n\t\tString finalDigit[] = dict[Integer.parseInt(digits.charAt(0)+\"\")];\n\t\tString nextDigit[];\n\t\tString[] str ;\n\t\tint idx;\n\t\t\n\t\tfor(int k = 1; k < digits.length(); k++) {\n\t\t\tnextDigit= dict[Integer.parseInt(digits.charAt(k)+\"\")];\n\t\t\tidx = 0;\n\t\t\tstr = new String[finalDigit.length* nextDigit.length];\n\t\t\tfor(int i = 0; i < finalDigit.length; i++) {\n\t\t\t\tfor(int j = 0; j < nextDigit.length; j++){\n\t\t\t\t\tstr[idx++] = finalDigit[i] + nextDigit[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinalDigit = str;\n\t\t\t\n\t\t}\n\t\treturn finalDigit;\n\t}", "protected ColumnCombination createColumnCombination(\n ColumnCombinationBitset candidate) {\n ColumnIdentifier[] identifierList = new ColumnIdentifier[candidate\n .size()];\n int i = 0;\n for (Integer columnIndex : candidate.getSetBits()) {\n identifierList[i] = new ColumnIdentifier(this.relationName,\n this.columnNames.get(columnIndex));\n i++;\n }\n return new ColumnCombination(identifierList);\n }", "public static double crossProduct(Point a, Point b, Point reference)\n {\n Point aa = a.subtract(reference);\n Point bb = b.subtract(reference);\n // Calculate the determinant \n double cp = aa.getX() * bb.getY() - bb.getX() * aa.getY();\n return cp;\n }", "public void nextStage() {\n\t\tcurrentStage.setActive(false);\n\t\tcurrentStageNumber++;\n\t\tchildren.add(currentStage = new Stage(this, StageLocations.mesta2, currentStageNumber));\n\t}", "public static void compareCombos() {\n\t\tint currentTotal = 0;\n\t\tint pastTotal = 0;\n\n\t\tcost++;\n\t\tfor (int i = 0; i < numPeople; i++) {\n\t\t\tcurrentTotal += board[i][currentCombo[i]];\n\t\t\tpastTotal += board[i][bestCombo[i]];\n\t\t}\n\t\t\n\t\tif (currentTotal >= pastTotal) {\n\t\t\tbestTotal = 0;\n\t\t\tfor (int i = 0; i < numPeople; i++) {\n\t\t\t\tbestCombo[i] = currentCombo[i];\n\t\t\t\tbestTotal += board[i][currentCombo[i]];\n\t\t\t}\n\t\t}\n\n\t}", "private void phaseTwo(){\r\n\r\n\t\tCollections.shuffle(allNodes, random);\r\n\t\tList<Pair<Node, Node>> pairs = new ArrayList<Pair<Node, Node>>();\r\n\t\t\r\n\t\t//For each node in allNode, get all relationshpis and iterate through each relationship.\r\n\t\tfor (Node n1 : allNodes){\r\n\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\t//If a node n1 is related to any other node in allNodes, add those relationships to rels.\r\n\t\t\t\t//Avoid duplication, and self loops.\r\n\t\t\t\tIterable<Relationship> ite = n1.getRelationships(Direction.BOTH);\t\t\t\t\r\n\r\n\t\t\t\tfor (Relationship rel : ite){\r\n\t\t\t\t\tNode n2 = rel.getOtherNode(n1);\t//Get the other node\r\n\t\t\t\t\tif (allNodes.contains(n2) && !n1.equals(n2)){\t\t\t\t\t//If n2 is part of allNodes and n1 != n2\r\n\t\t\t\t\t\tif (!rels.contains(rel)){\t\t\t\t\t\t\t\t\t//If the relationship is not already part of rels\r\n\t\t\t\t\t\t\tPair<Node, Node> pA = new Pair<Node, Node>(n1, n2);\r\n\t\t\t\t\t\t\tPair<Node, Node> pB = new Pair<Node, Node>(n2, n1);\r\n\r\n\t\t\t\t\t\t\tif (!pairs.contains(pA)){\r\n\t\t\t\t\t\t\t\trels.add(rel);\t\t\t\t\t\t\t\t\t\t\t//Add the relationship to the lists.\r\n\t\t\t\t\t\t\t\tpairs.add(pA);\r\n\t\t\t\t\t\t\t\tpairs.add(pB);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn;\r\n\t}", "private void generateCombination() {\r\n\r\n\t\tfor (byte x = 0; x < field.length; x++) {\r\n\t\t\tfor (byte y = 0; y < field[x].length; y++) {\r\n\t\t\t\tfield[x][y].setValue((byte) newFigure(Constants.getRandom()));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public CutAndChooseSelection build(int numCircuits);", "public Fp12_2Over3Over2 square() {\n final Fp6_3Over2 c0c1 = c0.mul(c1);\n final Fp6_3Over2 factor = (c0.add(c1)).mul(c0.add(mulByNonResidue(c1)));\n return new Fp12_2Over3Over2(\n factor.sub(c0c1).sub(mulByNonResidue(c0c1)),\n c0c1.add(c0c1),\n Fp12Parameters);\n }", "private void doMerge(Set<BigInteger> mergedPartitions, int[][] candidatePartitions, BigInteger taken, int index){\n\t\tif(index < candidatePartitions.length){\n\t\t\tdoMerge(mergedPartitions, candidatePartitions, taken.setBit(index), index+1);\n\t\t\tdoMerge(mergedPartitions, candidatePartitions, taken, index+1);\n\t\t}\n\t\telse if(taken.bitCount()!=0){\n\t\t\t//System.out.println(taken.toString());\n List<Integer> mergedPartition = new ArrayList<Integer>();\n List<Integer> mergedPartitionIds = new ArrayList<Integer>();\n\n for(int i=0;i<candidatePartitions.length;i++){\n if(taken.testBit(i)){\n mergedPartitionIds.add(i);\n\n for(int j=0;j<candidatePartitions[i].length;j++)\n mergedPartition.add(candidatePartitions[i][j]);\n }\n }\n\n int[] mergedPartitionArr = ArrayUtils.toArrayInteger(mergedPartition);\n\n int[][] individualPartitions = new int[mergedPartitionIds.size()][];\n int i = 0;\n for(int pid: mergedPartitionIds) {\n individualPartitions[i++] = candidatePartitions[pid];\n }\n\n double totalIndividualPartitionCosts = costCalculator.getPartitionsCost(individualPartitions);\n double mergedPartitioningCost = costCalculator.getPartitionsCost(new int[][] {mergedPartitionArr});\n\t\t\t\n\t\t\t\n\t\t\t// 2. if the cost of the candidate partition is greater than or equal to the sum of\n\t\t\t//\t the individual costs of the partitions, then this candidate partition can be\n\t\t\t//\t discarded (replaced by the primary partitions), otherwise it is kept.\n if(mergedPartitioningCost >= totalIndividualPartitionCosts){\n\n for(int pid: mergedPartitionIds)\n\t\t\t\t\tmergedPartitions.add(BigInteger.valueOf(0).setBit(pid));\n\t\t\t}\n\t\t\telse\n\t\t\t\tmergedPartitions.add(taken);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tPermuatation2 p2 = new Permuatation2();\n\t\tSystem.out.println(p2.combinations(\"abc\"));\n\t}", "protected List<QueryIterator> nextStage(List<Binding> bindingsCouldBeParent) {\n\n\t\tList<QueryIterator> allIterators = new ArrayList<QueryIterator>();\n\t\tString filterType = (String) getExecContext().getContext().get(\n\t\t\t\tConstants.FILTER_TYPE);\n\t\t// creating filter Ops.\n\t\tList<Op> filterOps = QCFilter.substitute(opService,\n\t\t\t\tbindingsCouldBeParent, filterType);\n\t\tfor (int i = 0; i < filterOps.size(); i++) {\n\t\t\t// creating numeric binding list using numeric op\n\t\t\tList<Binding> bindingList = ServiceBound\n\t\t\t\t\t.exec((OpService) filterOps.get(i), getExecContext()\n\t\t\t\t\t\t\t.getContext());\n\n\t\t\t// logger.debug(\"Binding pairs is beginning to be generated...\");\n\t\t\t// long before = System.currentTimeMillis();\n\t\t\t// find binding pairs\n\t\t\tList<BindingPair> bindingPairs = generateBindingPairs(bindingList,\n\t\t\t\t\tbindingsCouldBeParent, opService.getService(),\n\t\t\t\t\t((OpService) filterOps.get(i)).getService());\n\t\t\t// long after = System.currentTimeMillis();\n\t\t\t// logger.debug(MessageFormat.format(\n\t\t\t// \"Binding pairs has been generated in \\\"{0}\\\" miliseconds\",\n\t\t\t// after - before));\n\n\t\t\t// logger.debug(\"Binding pairs is beginning to be intersected...\");\n\t\t\t// before = System.currentTimeMillis();\n\t\t\t// intersect bindings and their parents contained in binding pairs\n\t\t\tbindingPairs = intersectBindingPairs(bindingPairs);\n\t\t\t// after = System.currentTimeMillis();\n\t\t\t// logger.debug(MessageFormat\n\t\t\t// .format(\"Binding pairs has been intersected in \\\"{0}\\\" miliseconds\",\n\t\t\t// after - before));\n\n\t\t\t// logger.debug(\"Query iterators is beginning to be generated...\");\n\t\t\t// before = System.currentTimeMillis();\n\t\t\t// make query iterators using binding pairs\n\t\t\tList<QueryIterator> queryIterators = generateQueryIterators(bindingPairs);\n\t\t\t// after = System.currentTimeMillis();\n\t\t\t// logger.debug(MessageFormat\n\t\t\t// .format(\"Query iterators has been generated in \\\"{0}\\\" miliseconds\",\n\t\t\t// after - before));\n\n\t\t\t// reverse iterators\n\t\t\tCollections.reverse(queryIterators);\n\t\t\tallIterators.addAll(queryIterators);\n\t\t}\n\t\treturn allIterators;\n\t}", "public void start(Stage selectionStage) {\n Button Stage1Btn = new Button();\n Stage1Btn.setText(\"Stage 1\");\n Stage1Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage1Btn.setPrefSize(150,150);\n Stage1Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage1 gs1= new GameStage1();\n Stage gameStage = new Stage();\n gs1.start(gameStage);\n }\n });\n \n //Create button link to Stage 2\n Button Stage2Btn = new Button();\n Stage2Btn.setText(\"Stage 2\");\n Stage2Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage2Btn.setPrefSize(150,150);\n Stage2Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage2 gs2= new GameStage2();\n Stage gameStage2 = new Stage();\n gs2.start(gameStage2);\n }\n });\n \n //Create button link to Stage 3\n Button Stage3Btn = new Button();\n Stage3Btn.setText(\"Stage 3\");\n Stage3Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage3Btn.setPrefSize(150,150);\n Stage3Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage3 gs3= new GameStage3();\n Stage gameStage3 = new Stage();\n gs3.start(gameStage3);\n }\n });\n \n //Create button link to Stage 4\n Button Stage4Btn = new Button();\n Stage4Btn.setText(\"Stage 4\");\n Stage4Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage4Btn.setPrefSize(150,150);\n Stage4Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage4 gs4= new GameStage4();\n Stage gameStage4 = new Stage();\n gs4.start(gameStage4);\n }\n });\n \n //Create button link to Stage 5\n Button Stage5Btn = new Button();\n Stage5Btn.setText(\"Stage 5\");\n Stage5Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage5Btn.setPrefSize(150,150);\n Stage5Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage5 gs5= new GameStage5();\n Stage gameStage5 = new Stage();\n gs5.start(gameStage5);\n }\n });\n //Create a HBox to insert multiple button and arrange them horizontally\n HBox mainBtn = new HBox();\n mainBtn.setPadding(new Insets(15, 12, 15, 12));\n mainBtn.setSpacing(10);\n mainBtn.setAlignment(Pos.CENTER);\n \n //Create Main Menu button\n Button MainMenuBtn = new Button();\n MainMenuBtn.setText(\"Main Menu\");\n MainMenuBtn.setFont(Font.font(\"Lucida Console\",ITALIC ,40));\n MainMenuBtn.setPrefSize(300,80);\n MainMenuBtn.setOnAction((ActionEvent ae) -> {\n\n //Create a confirmation dialog\n Alert MainMenuAlert = new Alert(Alert.AlertType.CONFIRMATION);\n MainMenuAlert.initStyle(StageStyle.UTILITY);\n MainMenuAlert.setTitle(\"Confirmation\");\n MainMenuAlert.setHeaderText(\"Do you want to back to Main Menu?\");\n MainMenuAlert.setContentText(\"Click OK to confirm\");\n\n Optional<ButtonType> result = MainMenuAlert.showAndWait();\n if (result.get() == ButtonType.OK){\n selectionStage.close();\n MainScreenStage mss = new MainScreenStage();\n mss.start(selectionStage);\n// if user chose OK this window will closed and Main Interface will opened\n } \n });\n\n //Create button to close program\n Button QuitBtn = new Button();\n QuitBtn.setText(\"Quit Game\");\n QuitBtn.setFont(Font.font(\"Lucida Console\",ITALIC ,40));\n QuitBtn.setPrefSize(300,80);\n QuitBtn.setOnAction((ActionEvent ae) -> {\n\n //Create a confirmation dialog\n Alert QuitAlert = new Alert(Alert.AlertType.CONFIRMATION);\n QuitAlert.initStyle(StageStyle.UTILITY);\n QuitAlert.setTitle(\"Confirmation\");\n QuitAlert.setHeaderText(\"Do you want to quit game?\");\n QuitAlert.setContentText(\"Click OK to confirm\");\n\n Optional<ButtonType> result = QuitAlert.showAndWait();\n if (result.get() == ButtonType.OK){\n Platform.exit();// ... user chose OK\n } else {\n // ... user chose CANCEL or closed the dialog\n }\n\n });\n //Create HBox to add button\n HBox selectionBtns = new HBox();\n selectionBtns.setSpacing(10);\n selectionBtns.setAlignment(Pos.CENTER);\n selectionBtns.getChildren().addAll(Stage1Btn, Stage2Btn, Stage3Btn, Stage4Btn, Stage5Btn);\n mainBtn.getChildren().addAll(MainMenuBtn,QuitBtn);\n \n BorderPane root = new BorderPane();\n root.setCenter(selectionBtns);\n root.setBottom(mainBtn);\n \n Scene scene = new Scene(root, 1200, 800);\n \n selectionStage.setTitle(\"Shapes\");\n selectionStage.setScene(scene);\n selectionStage.show();\n }", "public double innerProduct(double[] x1, double[] x2) {\n\t\tdouble result = 0.0d;\n\t\tfor (int i = 0; i < x1.length; i++) {\n\t\t\tresult += x1[i] * x2[i];\n\t\t}\n\t\treturn result;\n\t}", "@Override protected void compute2() {\n addToPendingCount(_env.peekAry().numCols()-1);\n int nchks=0;\n for (int i =0; i < _argcnt; ++i)\n nchks+=_env.peekAryAt(-i).anyVec().nChunks();\n\n _espc = new long[nchks+1];\n int coffset = _env.peekAry().anyVec().nChunks();\n long[] first_espc = _env.peekAry().anyVec().get_espc();\n System.arraycopy(first_espc, 0, _espc, 0, first_espc.length);\n for (int i=1; i< _argcnt; ++i) {\n long roffset = _espc[coffset];\n long[] espc = _env.peekAryAt(-i).anyVec().get_espc();\n int j = 1;\n for (; j < espc.length; j++)\n _espc[coffset + j] = roffset+ espc[j];\n coffset += _env.peekAryAt(-i).anyVec().nChunks();\n }\n\n Key[] keys = _env.peekAry().anyVec().group().addVecs(_env.peekAry().numCols());\n _vecs = new Vec[keys.length];\n for (int i=0; i<_vecs.length; ++i)\n _vecs[i] = new Vec( keys[i], _espc, null, _env.peekAry().vec(i).get_type());\n\n for (int i=0; i < Math.min(_maxP, _vecs.length); ++i) forkVecTask(i);\n }", "String getCombination(int numberOfSides);", "public static void combinations(int[] boxes, int ci, int ti, int lb){\n if(ci>ti){\n for(int i=0;i<boxes.length;i++){\n if(boxes[i]==1){\n System.out.print(\"i\");\n }\n else if(boxes[i]==0){\n System.out.print(\"-\");\n }\n \n }\n System.out.println();\n return;\n }\n \n for(int i=lb+1;i<boxes.length;i++){\n if(boxes[i]==0){\n boxes[i]=1;\n combinations(boxes,ci+1,ti,i);\n boxes[i]=0;\n }\n }\n }", "public Transform compose(Transform other){\n float[][] ans = new float[4][4];\n for(int row = 0; row < 4; row++){\n for(int col = 0; col < 4; col++){\n for(int i = 0; i < 3; i++){\n ans[row][col] += this.values[row][i] * other.values[i][col];\n }\n }\n ans[row][3] += this.values[row][3];\n }\n return new Transform(ans);\n }", "private void doGenerate(List<BigInteger> candidatePartitions, int[][] partitionAttributes, BigInteger taken, BigInteger validLayout, int index){\n\t\tif(index < candidatePartitions.size()){\n\t\t\tdoGenerate(candidatePartitions, partitionAttributes, taken.setBit(index), validLayout, index+1);\n\t\t\tdoGenerate(candidatePartitions, partitionAttributes, taken, validLayout, index+1);\n\t\t}\n\t\telse{\n\t\t\tBigInteger attributeBitmap = BigInteger.valueOf(0);\n\t\t\tList<int[]> partitions = new ArrayList<int[]>(); \n\t\t\tfor(int i=0;i<candidatePartitions.size();i++){\n\t\t\t\tif(taken.testBit(i)){\n\t\t\t\t\t// non-disjoint?\n\t\t\t\t\tfor(int p: ArrayUtils.bigIntToArray(candidatePartitions.get(i))){\n\t\t\t\t\t\tBigInteger pBigInt = ArrayUtils.arrayToBigInt(partitionAttributes[p]);\n\t\t\t\t\t\tif(attributeBitmap.and(pBigInt).bitCount() != 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tattributeBitmap = attributeBitmap.or(pBigInt);\n\t\t\t\t\t\tpartitions.add(partitionAttributes[p]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// not complete?\n\t\t\tif(attributeBitmap.xor(validLayout).bitCount() != 0)\n\t\t\t\treturn;\n\t\t\t\n\t\t\t// 2. evaluate the cost of each valid layout\n\t\t\tdouble newCost = costCalculator.getPartitionsCost(ArrayUtils.toArrayList(partitions));\n\t\t\tif(newCost < minCost){\n\t\t\t\t// 3. discard all layouts but the one yielding the lowest cost.\n\t\t\t\tint[][] partitionsArr = new int[partitions.size()][];\n\t\t\t\tfor(int i=0;i<partitions.size();i++)\n\t\t\t\t\tpartitionsArr[i] = partitions.get(i);\n\t\t\t\tbestLayout = partitionsArr;\n\t\t\t\tminCost = newCost;\n\t\t\t}\n\t\t}\n\t}", "public Fraccion producto() {\r\n Fraccion producto = new Fraccion(operador1.getNumerador()*operador2.getNumerador() , operador1.getDenominador()*operador2.getDenominador());\r\n return simplify(producto);\r\n }", "public List<Configuration> solve(){\n int group = 0;\n for(List<Configuration> set : input){\n minimize(set);\n\n for(Configuration root : set) {\n root.setGroup(group);\n }\n group++;\n\n }\n\n // Step 2: Preprocess\n sortBySize(input);\n\n // Step 5: Initialize set of partial solutions\n List<Configuration> partialSolutions;\n if(input.size()==0){\n return null;\n }\n else {\n partialSolutions = input.get(0);\n input.remove(partialSolutions);\n }\n\n // Step 6: The compositional computations\n for(List<Configuration> set : input) {\n filter(partialSolutions, setCutoff);\n filter(set, setCutoff);\n partialSolutions = combine(partialSolutions, set, constraints);\n }\n\n // Step 7: Postprocessing\n //greedyPostProcessing(partialSolutions);\n\n return partialSolutions;\n }", "public BooleanChoiceCalculation(\n\t\t\tProp<Boolean> choice,\n\t\t\tProp<? extends V> first,\n\t\t\tProp<? extends V> second) {\n\t\t\n\t\tthis.choice = choice;\n\t\tthis.first = first;\n\t\tthis.second = second;\n\t\t\n\t\tIdentityHashSet<Changeable> sourcesM = new IdentityHashSet<Changeable>();\n\t\tsourcesM.add(choice);\n\t\tsourcesM.add(first);\n\t\tsourcesM.add(second);\n\t\tsources = Collections.unmodifiableSet(sourcesM);\n\t}", "public double computeCrossProduct(Vector v2){\n return this.getX() * v2.getY() - this.getY() * v2.getX();\n }", "private double jaccardIndexCross(Object m1, Object m2) \n\t{\n\t\treturn 0;\n\t}", "public Vector3D crossProduct(Vector3D b)\r\n {\r\n Vector3D a = this;\r\n return new Vector3D(a.y*b.z - a.z*b.y, a.z*b.x - a.x*b.z, a.x*b.y - a.y*b.x);\r\n }", "private PMCGenotype[] advanceGeneration()\n\t{\n\t\tPMCGenotype[] newPop = new PMCGenotype[population.length];\n\t\tPMCGenotype[] parents = selectParents();\n\t\tArrayList<PMCGenotype> candidates = new ArrayList<PMCGenotype>();\n\n\t\t// Add the current population to the list of candidates.\n\t\tfor (PMCGenotype pmcg : population)\n\t\t{\n\t\t\tcandidates.add(pmcg);\n\t\t}\n\n\t\t// For each parent, generate a number of mutations (children), calculate their fitness\n\t\t// and add them to the list of candidates.\n\t\tint childrenPerParent = this.childrenPerGeneration / this.parentsToSelect;\n\t\tfor (PMCGenotype p : parents)\n\t\t{\n\t\t\tfor (int i = 0; i < childrenPerParent; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = PMCGenotype.mutate(p, r);\n\t\t\t\tpmcg.setFitness(fitness(pmcg, this.trials));\n\t\t\t\tcandidates.add(pmcg);\n\t\t\t}\n\t\t}\n\n\t\t// Find candidate with the best fitness and add it to the new population.\n\t\t// Repeat this until the new population size matches the previous population size.\n\t\tint candidatesChosen = 0;\n\t\twhile (candidatesChosen < this.population.length)\n\t\t{\n\t\t\tint numberOfRemainingCandidates = candidates.size();\n\t\t\tdouble currentBestFitnessScore = 0;\n\t\t\tint currentBestFitnessScoreIndex = 0;\n\n\t\t\tfor (int i = 0; i < numberOfRemainingCandidates; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = candidates.get(i);\n\t\t\t\tif (pmcg.getFitness() > currentBestFitnessScore)\n\t\t\t\t{\n\t\t\t\t\tcurrentBestFitnessScore = pmcg.getFitness();\n\t\t\t\t\tcurrentBestFitnessScoreIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnewPop[candidatesChosen] = candidates.get(currentBestFitnessScoreIndex);\n\t\t\tcandidatesChosen++;\n\n\t\t\tcandidates.remove(currentBestFitnessScoreIndex);\n\t\t}\n\n\t\treturn newPop;\n\t}", "public static void buildStage2 ()\r\n {\r\n \r\n lgt.findParent(); //4\r\n lgt.findChild(0); //6\r\n lgt.insert(12);\r\n lgt.findParent();\r\n lgt.insert(13);\r\n lgt.findParent();\r\n lgt.insert(14);\r\n \r\n lgt.findRoot();\r\n lgt.findChild(0);//2\r\n lgt.findChild(0);//5\r\n lgt.insert(8);\r\n lgt.findParent();\r\n lgt.insert(9);\r\n lgt.findParent();\r\n lgt.insert(10);\r\n lgt.findParent();\r\n lgt.insert(11);\r\n \r\n }", "static int[] productExceptSelf(int[] nums) {\n int n = nums.length;\n int[] prefix = new int[n];\n int[] suffix = new int[n];\n\n prefix[0] = 1;\n suffix[n - 1] = 1;\n\n for (int i = 1; i < n; i++) {\n prefix[i] = prefix[i - 1] * nums[i - 1];\n }\n\n for (int i = n - 2; i >= 0; i--) {\n suffix[i] = suffix[i + 1] * nums[i + 1];\n }\n\n int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = prefix[i] * suffix[i];\n }\n return result;\n }" ]
[ "0.5279118", "0.5071735", "0.49911553", "0.48923296", "0.48182416", "0.47825706", "0.47258148", "0.46679544", "0.4642828", "0.46349108", "0.46109056", "0.459588", "0.45857596", "0.45817193", "0.45537582", "0.45383334", "0.4498283", "0.44942304", "0.44818452", "0.4467509", "0.4455285", "0.44467217", "0.44426417", "0.4420032", "0.44189495", "0.44115078", "0.44020528", "0.43986672", "0.43834475", "0.438259", "0.4382198", "0.4372501", "0.4368361", "0.4350374", "0.43476644", "0.43432537", "0.43430176", "0.43419012", "0.43406972", "0.43344176", "0.43304235", "0.43256757", "0.43181908", "0.43144903", "0.4288933", "0.42790374", "0.42756835", "0.4272072", "0.4269117", "0.4264368", "0.42592838", "0.42510447", "0.42499542", "0.424532", "0.42446312", "0.42421338", "0.4233794", "0.4215355", "0.42134315", "0.42039102", "0.41989583", "0.4190306", "0.41884398", "0.41875815", "0.41861337", "0.41860566", "0.41850144", "0.41816238", "0.418036", "0.41789764", "0.41771773", "0.41763845", "0.4171796", "0.4169618", "0.4164635", "0.41610014", "0.41544655", "0.41477603", "0.41449597", "0.4143344", "0.41424268", "0.41409922", "0.41398054", "0.41279623", "0.4126726", "0.4126041", "0.4124378", "0.41212913", "0.4119423", "0.41161776", "0.41143382", "0.41088948", "0.4108209", "0.40998027", "0.4094659", "0.4090133", "0.40845194", "0.40808412", "0.40782934", "0.40744916" ]
0.7431004
0
doViewOptions / Returns a value suitable for use as a label
private String getLabel(int aValue) { if (fRadix == radix_Hex) { return Format.toHexString(aValue); } else { if (fType == type_Float) { return "" + (double)aValue; } else { return "" + aValue; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DISPID(1610743816) //= 0x60020008. The runtime will prefer the VTID if present\r\n @VTID(15)\r\n int viewOptions();", "java.lang.String getViewsLabel();", "private static void viewOptions() {\n\t\tlog.info(\"Enter 0 to Exit.\");\n\t\tlog.info(\"Enter 1 to Login.\");\n\t}", "public String getViewText() {\n \t\treturn \"featured-partner-view_text_t\";\n \t}", "java.lang.String getView();", "public ViewTaskOption getViewTaskOption() {\n return (ViewTaskOption) commandData.get(CommandProperties.TASKS_VIEW_OPTION);\n }", "public interface ViewExecutionOptions {\n \n /**\n * Gets the cycle execution sequence.\n * \n * @return the cycle execution sequence, not null\n */\n ViewCycleExecutionSequence getExecutionSequence();\n \n /**\n * Gets the set of flags defining aspects of the execution behaviour in relation to the execution options.\n * \n * @return the set of flags, not null\n */\n EnumSet<ViewExecutionFlags> getFlags();\n \n /**\n * Gets the maximum number of delta cycles following a full computation cycles.\n * \n * @return the maximum number of delta cycles following a full computation cycle, null for no limit\n */\n Integer getMaxSuccessiveDeltaCycles();\n \n /**\n * Gets the default execution options.\n * \n * @return the default execution options, null if not specified\n */\n ViewCycleExecutionOptions getDefaultExecutionOptions();\n \n /**\n * Gets the version-correction to apply during execution.\n * <p>\n * The version-correction affects the data used by the running view process. If the version-correction has either the\n * version or correction set to 'latest' then the view process will track real-time changes to any data on which it\n * depends. \n * \n * @return the version-correction, not null\n */\n VersionCorrection getVersionCorrection();\n \n}", "@Override\n\tpublic void setDisplayOptions(int options) {\n\t\t\n\t}", "public void getOption(View view) {\n Spinner spinner = (Spinner) findViewById(R.id.country_spinner);\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);\n if (spinner != null) {\n user_choice = String.valueOf(spinner.getSelectedItem());\n }\n Set<String> selections = settings.getStringSet(\"list_option_key\", null);\n if (selections != null) {\n if (selections.isEmpty()) {\n //User must select options for the graph to display.\n displayToast(\"No options selected, please try again.\");\n return;\n } else {\n //User has selected options we we get the country data associated with user options\n boolean use_local = settings.getBoolean(\"use_file_key\", true);\n processData(use_local, selections);\n }\n } else {\n //No options have been selected and this is the first time user is using the app so display message\n displayToast(\"No options selected, please try again.\");\n return;\n }\n }", "Object getViewDetails();", "public String getViewParam() {\r\n\t\treturn viewParam;\r\n\t}", "public String getView();", "public String getView();", "public void execute(View view){\n //method in view to show the choice\n }", "public java.lang.String getViewsLabel() {\n return instance.getViewsLabel();\n }", "@Override\n\tpublic void setDisplayOptions(int options, int mask) {\n\t\t\n\t}", "private String determineViewTag() {\r\n\t\tif (viewTag == null) {\r\n\t\t\tviewTag = ClearCaseUtils.getViewTag(getViewPath(), getProject());\r\n\t\t}\r\n\t\treturn viewTag;\r\n\t}", "public abstract String getView();", "String getViewExtension();", "void showNoneParametersView();", "@Override\n public View getDropDownView(int position, View convertView,\n ViewGroup parent) {\n TextView label = new TextView(context);\n label.setTextColor(Color.BLACK);\n label.setText(values[position].get_projekodu());\n\n return label;\n }", "public String getOption()\r\n {\r\n return ((COSString)option.getObject( 0 ) ).getString();\r\n }", "String getOption();", "private void setViewsLabel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n viewsLabel_ = value;\n }", "void showSelectedAgentView();", "public void viewOptions()\r\n {\r\n SetupScreen setupScreen = new SetupScreen();\r\n pushScreen(setupScreen);\r\n }", "String getViewType();", "public interface View {\n\t\n\tpublic DifferenceOperators getOperator();\n\tpublic double getUtility(DistanceMetric distanceMetric);\n\tpublic double getUtility(DistanceMetric distanceMetric,\n\t\t\tboolean normalizeDistributions);\n //Added by Himos\n public double getUtilitywithfunc(DistanceMetric distanceMetric, Constants.AggregateFunctions AGF,\n\t\t\tboolean normalizeDistributions);\n\tpublic List<View> constituentViews();\n \n // public String getHighFunction(); \n\t//public View getTopDifferent();\n\n}", "public void configure(T aView) { aView.setText(\"Label\"); }", "public java.lang.String getViewsLabel() {\n return viewsLabel_;\n }", "Map getOptions();", "public static String getViewDataType(View view) {\r\n\t\tswitch (view) {\r\n\t\t\tcase MATCHEDBIGDECIMALS: return \"text\";\r\n\t\t\tcase PATTERNBIGDECIMALS: return \"text\";\r\n\t\t\tcase BIGDECIMALS: return \"text\";\r\n\t\t\tcase MATCHEDBIGINTEGERS: return \"text\";\r\n\t\t\tcase PATTERNBIGINTEGERS: return \"text\";\r\n\t\t\tcase BIGINTEGERS: return \"text\";\r\n\t\t\tcase MATCHEDBLOBS: return \"blob\";\r\n\t\t\tcase PATTERNBLOBS: return \"blob\";\r\n\t\t\tcase BLOBS: return \"blob\";\r\n\t\t\tcase MATCHEDBOOLEANS: return \"blob\";\r\n\t\t\tcase PATTERNBOOLEANS: return \"boolean\";\r\n\t\t\tcase BOOLEANS: return \"boolean\";\r\n\t\t\tcase BULKDATA: return \"blob\";\r\n\t\t\tcase MATCHEDCLOBS: return \"text\";\r\n\t\t\tcase PATTERNCLOBS: return \"text\";\r\n\t\t\tcase CLOBS: return \"text\";\r\n\t\t\tcase MATCHEDDOUBLES: return \"double\";\r\n\t\t\tcase PATTERNDOUBLES: return \"double\";\r\n\t\t\tcase DOUBLES: return \"double\";\r\n\t\t\tcase MATCHEDFLOATS: return \"float\";\r\n\t\t\tcase PATTERNFLOATS: return \"float\";\r\n\t\t\tcase FLOATS: return \"float\";\r\n\t\t\tcase MATCHEDINTEGERS: return \"int\";\r\n\t\t\tcase PATTERNINTEGERS: return \"int\";\r\n\t\t\tcase INTEGERS: return \"int\";\r\n\t\t\tcase MATCHEDLONGS: return \"bigint\";\r\n\t\t\tcase PATTERNLONGS: return \"bigint\";\r\n\t\t\tcase LONGS: return \"bigint\";\r\n\t\t\tcase MASTERDATA: return null;\r\n\t\t\tcase SAMPLEDBIGDECIMALS: return \"text\";\r\n\t\t\tcase SAMPLEDBIGINTEGERS: return \"text\";\r\n\t\t\tcase SAMPLEDBLOBS: return \"blob\";\r\n\t\t\tcase SAMPLEDBOOLEANS: return \"boolean\";\r\n\t\t\tcase SAMPLEDCLOBS: return \"text\";\r\n\t\t\tcase SAMPLEDDOUBLES: return \"double\";\r\n\t\t\tcase SAMPLEDFLOATS: return \"float\";\r\n\t\t\tcase SAMPLEDINTEGERS: return \"int\";\r\n\t\t\tcase SAMPLEDLONGS: return \"bigint\";\r\n\t\t\tcase SAMPLEDSTRINGS: return \"text\";\r\n\t\t\tcase SKETCHEDBIGDECIMALS: return \"text\";\r\n\t\t\tcase SKETCHEDBIGINTEGERS: return \"text\";\r\n\t\t\tcase SKETCHEDBLOBS: return \"blob\";\r\n\t\t\tcase SKETCHEDBOOLEANS: return \"boolean\";\r\n\t\t\tcase SKETCHEDCLOBS: return \"text\";\r\n\t\t\tcase SKETCHEDDOUBLES: return \"double\";\r\n\t\t\tcase SKETCHEDFLOATS: return \"float\";\r\n\t\t\tcase SKETCHEDINTEGERS: return \"int\";\r\n\t\t\tcase SKETCHEDLONGS: return \"bigint\";\r\n\t\t\tcase SKETCHEDSTRINGS: return \"text\";\r\n\t\t\tcase MATCHEDSTRINGS: return \"text\";\r\n\t\t\tcase PATTERNSTRINGS: return \"text\";\r\n\t\t\tcase STRINGS: return \"text\";\r\n\t\t\tdefault: return null;\r\n\t\t}\r\n\t}", "public ViewConfiguration invoke() {\n return ViewConfiguration.get(this.f64333a);\n }", "String displayValue();", "@Override\n\tpublic String getValue() {\n\t\treturn PushyView.c.getValue();\n\t}", "public short getOptions()\n {\n return field_1_options;\n }", "public void testOptions() {\n OptionsOperator optionsOper = OptionsOperator.invoke();\n optionsOper.selectEditor();\n optionsOper.selectFontAndColors();\n optionsOper.selectKeymap();\n optionsOper.selectGeneral();\n // \"Manual Proxy Setting\"\n String hTTPProxyLabel = Bundle.getStringTrimmed(\n \"org.netbeans.core.ui.options.general.Bundle\", \"CTL_Use_HTTP_Proxy\");\n new JRadioButtonOperator(optionsOper, hTTPProxyLabel).push();\n // \"HTTP Proxy:\"\n String proxyHostLabel = Bundle.getStringTrimmed(\n \"org.netbeans.core.ui.options.general.Bundle\", \"CTL_Proxy_Host\");\n JLabelOperator jloHost = new JLabelOperator(optionsOper, proxyHostLabel);\n new JTextFieldOperator((JTextField) jloHost.getLabelFor()).setText(\"www-proxy.uk.oracle.com\"); // NOI18N\n // \"Port:\"\n String proxyPortLabel = Bundle.getStringTrimmed(\n \"org.netbeans.core.ui.options.general.Bundle\", \"CTL_Proxy_Port\");\n JLabelOperator jloPort = new JLabelOperator(optionsOper, proxyPortLabel);\n new JTextFieldOperator((JTextField) jloPort.getLabelFor()).setText(\"80\"); // NOI18N\n optionsOper.ok();\n }", "int getDisplayValue();", "public String selectDictLabel(@Param(\"dictType\") String dictType, @Param(\"dictValue\") String dictValue);", "public String getOptionText() {\n return option;\n }", "@Override\n public String displayUponBeingSelected() {\n\n StringBuilder sb = new StringBuilder();\n sb.append(String.format(\"Information about '%s'\\n\", foodLabel));\n sb.append(String.format(\"Brand: %s\\n\", brand));\n sb.append(String.format(\"Category: %s\\n\", category));\n sb.append(String.format(\"Item type: %s\\n\", StringUtils.capitalize(categoryLabel)));\n sb.append(String.format(\"Measure(s): %s\\n\", StringUtils.join(measures, \", \")));\n sb.append(String.format(\"Food ID: %s\\n\", foodId));\n sb.append(String.format(\"Food URI: %s\\n\", foodUri));\n sb.append(String.format(\"Image link: %s\\n\", imageLink));\n sb.append(String.format(\"Yielding search term: %s\\n\", yieldingSearchTerm));\n sb.append(formatBasicNutrients());\n\n return sb.toString();\n\n }", "public java.lang.String getView() {\n return view;\n }", "public java.lang.String getView() {\n return view;\n }", "public java.lang.String getView() {\n return view;\n }", "int getOptLevelValue();", "com.google.wireless.android.sdk.stats.FilterMetadata.View getActiveView();", "public String buildOptionsPanelContext( VelocityPortlet portlet,\n\t\t\t\t\t\t\t\t\t\t\tContext context,\n\t\t\t\t\t\t\t\t\t\t\tRunData data,\n\t\t\t\t\t\t\t\t\t\t\tSessionState state)\n\t{\n\t\tcontext.put(\"tlang\",rb);\n\t\tString home = (String) state.getAttribute(STATE_HOME_COLLECTION_ID);\n\t\tReference ref = EntityManager.newReference(ContentHostingService.getReference(home));\n\t\tString siteId = ref.getContext();\n\n\t\tcontext.put(\"form-submit\", BUTTON + \"doConfigure_update\");\n\t\tcontext.put(\"form-cancel\", BUTTON + \"doCancel_options\");\n\t\tcontext.put(\"description\", \"Setting options for Resources in worksite \"\n\t\t\t\t+ SiteService.getSiteDisplay(siteId));\n\n\t\t// pick the \"-customize\" template based on the standard template name\n\t\tString template = (String)getContext(data).get(\"template\");\n\t\treturn template + \"-customize\";\n\n\t}", "IViewParserConfiguration getViewParserConfiguration();", "Map<String, String> getPropsViews();", "@Override\r\n public @Nullable String getFormattedText(RenderContext ctx)\r\n {\n String oorPrefix = getOORPrefix(ctx);\r\n String formattedValue = \"\";\r\n Object value = getDisplayValue(ctx);\r\n if (null != value)\r\n {\r\n formattedValue = super.getFormattedText(ctx);\r\n if (null == formattedValue)\r\n formattedValue = ConvertUtils.convert(value);\r\n }\r\n assert null != formattedValue;\r\n return oorPrefix + formattedValue;\r\n }", "@Override\n\tpublic void setValue(View view, String value) {\n\t\t((TextView) view).setText(value);\n\n\t}", "public void configure(T aView) { aView.setText(\"CheckBox\"); }", "com.google.protobuf.ByteString\n getViewsLabelBytes();", "public void executeView()\n\t{\n\t\tString cmd = \"\";\n\t\tString opar = Deducer.getUniqueName(\"opar\");\n\t\tcmd += (opar + \" <- par()\"); //save the original margin parameters\n\t\tcmd += (\"\\npar(mar=c(8, 4, 4, 0.5))\"); //give the plot more space at the bottom for long words.\n\t\tcmd += (\n\t\t\t\t\"\\nbarplot(\" \n\t\t\t\t+ \n\t\t\t\ttfDialog.getTermFreqCall(this.getExtraTermFreqArgs()) + \",\" \n\t\t\t\t+\n\t\t\t\t\"cex.names=0.8,\" //make the terms a bit smaller\n\t\t\t\t+\n\t\t\" las=2);\");\n\t\tcmd += (\"\\npar(\"+ opar +\")\");\n\t\tDeducer.execute(cmd);\n\t\tDeducer.execute(\"dev.set()\", false); //give the plot focus\n\t\t\n\t\t\n\t}", "public void printOptions() {\n\t\t\n\t}", "TextView getDescriptionView();", "@UITopiaVariant(affiliation = \"RWTH Aachen\", author = \"Kefang\", email = \"***@gmail.com\", uiLabel = UITopiaVariant.USEVARIANT)\n\t@PluginVariant(variantLabel = \"Assign Label to Specific Variant\", requiredParameterLabels = { 0 })\n\tpublic XLog assignSpecificLabel(UIPluginContext context, XLog log) {\n\t\t// get variants with summary\n\t\tXFactory factory = XFactoryRegistry.instance().currentDefault();\n\t\tXLog label_log = (XLog) log.clone();\n\t\tXLogInfo info = XLogInfoFactory.createLogInfo(label_log);\n\n\t\tlabel_log.getGlobalTraceAttributes().add(factory.createAttributeBoolean(Configuration.POS_LABEL, false, null));\n\t\tlabel_log.getGlobalTraceAttributes().add(factory.createAttributeBoolean(Configuration.FIT_LABEL, false, null));\n\t\t// so here we just set one interactive parameter setting window\n\t\t// after the process, we get labeled_log ??? No, here are the variants changed\n\t\t// but it refers to data in log, so change variant changed the log\n\t\t// VariantControlStep c_step = new VariantControlStep(label_log);\n\n\t\tList<TraceVariant> variants = EventLogUtilities.getTraceVariants(label_log);\n\t\tVariantWholeView view = new VariantWholeView(variants, info);\n\t\tInteractionResult result = context.showWizard(\"Setting Variant\", true, true, view);\n\t\tif (result != InteractionResult.FINISHED) {\n\t\t\treturn null;\n\t\t}\n\t\treturn label_log;\n\t\t// ListWizard<XLog> wizard = new ListWizard<XLog>(c_step);\n\t\t// it doesn't retun value, just the change on variants, then actually, I could get it here.\n\t\t// return ProMWizardDisplay.show(context, wizard, label_log);\n\t\t// if we update the view, how should we do it ??? Or actually we could do it in trace\n\n\t}", "@Override\n protected void options()\n {\n super.options();\n addOption(Opt.APPLICATION_ID);\n addOption(Opt.SERVER_ID);\n addOption(Opt.CATEGORY);\n addOption(Opt.NAME, \"The name of the label\");\n }", "public void showValor() {\n String out = new String();\n this.setText(Integer.toString(valor));\n }", "public void options() {\n\n audio.playSound(LDSound.SMALL_CLICK);\n if (canViewOptions()) {\n Logger.info(\"HUD Presenter: options\");\n uiStateManager.setState(GameUIState.OPTIONS);\n }\n }", "public String getLabel();", "public String getLabel();", "public String getLabel();", "public String getLabel();", "public java.lang.String getLabel();", "public String getView(String viewName) {\n\t\t\n\t\treturn prefix + viewName + suffix;\n\t}", "java.lang.String getLabel();", "@Override\n public int doEndTag() throws JspException {\n\n // Acquire the select tag we are associated with\n SelectTag selectTag = (SelectTag) pageContext.getAttribute(Constants.SELECT_KEY);\n if (selectTag == null) {\n throw new JspException(messages.getMessage(\"optionsTag.select\"));\n }\n StringBuilder sb = new StringBuilder();\n\n // If a collection was specified, use that mode to render options\n if (collection != null) {\n Iterator collIterator = getIterator(collection, null);\n while (collIterator.hasNext()) {\n\n Object bean = collIterator.next();\n Object value = null;\n Object label = null;\n\n try {\n value = PropertyUtils.getProperty(bean, property);\n if (value == null) {\n value = \"\";\n }\n } catch (IllegalAccessException e) {\n throw new JspException(messages.getMessage(\"getter.access\", property, collection));\n } catch (InvocationTargetException e) {\n Throwable t = e.getTargetException();\n throw new JspException(messages.getMessage(\"getter.result\", property, t.toString()));\n } catch (NoSuchMethodException e) {\n throw new JspException(messages.getMessage(\"getter.method\", property, collection));\n }\n\n try {\n if (labelProperty != null) {\n label = PropertyUtils.getProperty(bean, labelProperty);\n } else {\n label = value;\n }\n if (label == null) {\n label = \"\";\n }\n } catch (IllegalAccessException e) {\n throw new JspException(messages.getMessage(\"getter.access\", labelProperty, collection));\n } catch (InvocationTargetException e) {\n Throwable t = e.getTargetException();\n throw new JspException(messages.getMessage(\"getter.result\", labelProperty, t.toString()));\n } catch (NoSuchMethodException e) {\n throw new JspException(messages.getMessage(\"getter.method\", labelProperty, collection));\n }\n\n String stringValue = value.toString();\n addOption(sb, stringValue, label.toString(), selectTag.isMatched(stringValue));\n\n }\n\n }\n\n // Otherwise, use the separate iterators mode to render options\n else {\n\n // Construct iterators for the values and labels collections\n Iterator valuesIterator = getIterator(name, property);\n Iterator labelsIterator = null;\n if ((labelName == null) && (labelProperty == null)) {\n labelsIterator = getIterator(name, property); // Same coll.\n } else {\n labelsIterator = getIterator(labelName, labelProperty);\n }\n\n // Render the options tags for each element of the values coll.\n while (valuesIterator.hasNext()) {\n String value = valuesIterator.next().toString();\n String label = value;\n if (labelsIterator.hasNext()) {\n label = labelsIterator.next().toString();\n }\n addOption(sb, value, label, selectTag.isMatched(value));\n }\n }\n\n // Render this element to our writer\n ResponseUtils.write(pageContext, sb.toString());\n\n // Evaluate the remainder of this page\n return EVAL_PAGE;\n\n }", "@Override\n\tpublic int getDisplayOptions() {\n\t\treturn 0;\n\t}", "@Override\n\tprotected String getView() {\n\t\treturn SOTGView.CONTECT_VIEW;\n\t}", "String getLabel();", "String getLabel();", "public String getVarimaxOption(){\n if(this. varimaxOption){\n return \"normal varimax option\";\n }\n else{\n return \"raw varimax option\";\n }\n }", "public Get setView(java.lang.String view) {\n this.view = view;\n return this;\n }", "public String optionToString() {\n return new StringBuffer().append(\"<\").append(base16.toString(this.data)).append(\">\").toString();\n }", "private void deliverOptions()\n {\n int counter = 0;\n for(Option choice : options){\n counter++;\n System.out.println(\"#\" + counter + \" \" + choice.getText());\n }\n }", "private void showOptions(Connection connection, Long pollID) {\n final EventBus bus = getEventBus();\n\n try {\n SPPoll poll = StrawpollAPI.getResults(pollID);\n\n StringBuilder sb = new StringBuilder();\n sb.append(poll.getTitle());\n sb.append(\" (\");\n sb.append(poll.getId());\n sb.append(\")\");\n sb.append(System.lineSeparator());\n\n for(int i = 0; i < poll.getOptions().size(); i++) {\n sb.append(i);\n sb.append(\") \");\n sb.append(poll.getOptions().get(i).getTitle());\n sb.append(\" (votes: \");\n sb.append(poll.getOptions().get(i).getVotes());\n sb.append(\")\");\n sb.append(System.lineSeparator());\n }\n\n sb.append(System.lineSeparator());\n sb.append(System.lineSeparator());\n sb.append(\"in order to vote run the command 'vote <index>' where <index> shall be replaced by the displayed index of the answer\");\n\n bus.publish(new ConnectionMessageCommandEvent(connection, sb.toString()));\n } catch (Exception e) {\n bus.publish(new ConnectionMessageCommandEvent(connection, System.lineSeparator() + \"Whoops, it looks like we did not find a poll with the given id\"));\n e.printStackTrace();\n }\n }", "public String toString()\n {\n DecimalFormat df = new DecimalFormat(\"#.00\");\n String words = getOptionName() + \": $\" + df.format(getOptionPrice()) + \".\";\n return words;\n }", "public String getViewServiceDescription()\n {\n return viewServiceDescription;\n }", "public void configure(T aView) { aView.setText(\"RadioButton\"); }", "public Builder setViewsLabel(\n java.lang.String value) {\n copyOnWrite();\n instance.setViewsLabel(value);\n return this;\n }", "View getShowReportGraphView();", "public BatchGet setView(java.lang.String view) {\n this.view = view;\n return this;\n }", "public void showOptions() {\n\t\tCIVLTable tbl_optionTable = (CIVLTable) getComponentByName(\"tbl_optionTable\");\n\t\tDefaultTableModel optionModel = (DefaultTableModel) tbl_optionTable\n\t\t\t\t.getModel();\n\n\t\tif (optionModel.getRowCount() != 0) {\n\t\t\toptionModel.setRowCount(0);\n\t\t\ttbl_optionTable.clearSelection();\n\t\t\ttbl_optionTable.revalidate();\n\t\t}\n\n\t\tGMCSection section = currConfig.getGmcConfig().getSection(\n\t\t\t\tGMCConfiguration.ANONYMOUS_SECTION);\n\t\tObject[] opts = currConfig.getGmcConfig().getOptions().toArray();\n\t\tCollection<Option> options = currConfig.getGmcConfig().getOptions();\n\t\tIterator<Option> iter_opt = options.iterator();\n\t\tList<Object> vals = new ArrayList<Object>();\n\n\t\twhile (iter_opt.hasNext()) {\n\t\t\tOption curr = iter_opt.next();\n\t\t\tvals.add(section.getValueOrDefault(curr));\n\t\t}\n\n\t\t// Sets all of the default-ize buttons\n\t\tnew ButtonColumn(tbl_optionTable, defaultize, 2);\n\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tOption currOpt = (Option) opts[i];\n\t\t\t/*\n\t\t\t * if (currOpt.name().equals(\"sysIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"sysIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t * \n\t\t\t * else if (currOpt.name().equals(\"userIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"userIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t */\n\t\t\t// else {\n\t\t\toptionModel\n\t\t\t\t\t.addRow(new Object[] { currOpt, vals.get(i), \"Default\" });\n\t\t\t// }\n\t\t}\n\t}", "public String getLabelText();", "public void setOptions(){\n System.out.println(\"¿Que operacion desea realizar?\");\n System.out.println(\"\");\n System.out.println(\"1- Consultar sus datos\");\n System.out.println(\"2- Ingresar\");\n System.out.println(\"3- Retirar\");\n System.out.println(\"4- Transferencia\");\n System.out.println(\"5- Consultar saldo\");\n System.out.println(\"6- Cerrar\");\n System.out.println(\"\");\n}", "private String setVerticalExpenseInfoLabel(float currentValue) {\n\t\tfloat putNumber = privacyAction.getPUTNumber();\n\t\tBigInteger totalCombinations = PUTExperiment.getNcKValue(numOfAttributes, PUTExperiment.calculatePartitionSize(numOfAttributes, putNumber));\n\t\tBigInteger numberOfCombinations = new BigDecimal(totalCombinations).multiply(new BigDecimal(\"\" + currentValue)).setScale(0, RoundingMode.HALF_UP).toBigInteger();\n\t\tif(numberOfCombinations.compareTo(BigInteger.ZERO) == 0) {\n\t\t\tif(!switchOffWarnings)\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The number of attribute combinations cannot be 0 !!\", \"Error (0 combinations)\", JOptionPane.ERROR_MESSAGE);\n\t\t\tBigDecimal leastVal;\n\t\t\tif(totalCombinations.equals(BigDecimal.ONE))\n\t\t\t\tleastVal = BigDecimal.ONE;\n\t\t\telse\n\t\t\t\tleastVal = BigDecimal.ONE.divide(new BigDecimal(totalCombinations), FloatingSliderPanel.MAX_PRECISION, RoundingMode.HALF_DOWN);\n\t\t\tnumberOfCombinations = new BigDecimal(totalCombinations).multiply(new BigDecimal(\"\" + leastVal)).setScale(0, RoundingMode.HALF_UP).toBigInteger();\n\t\t\tverticalExpenseSlider.setCurrentValue(Math.nextUp(leastVal.floatValue()));\n\t\t}\n\t\tString text = \"Select \" + numberOfCombinations + \" attribute combinations out of \" + totalCombinations + \" (without considering any Privacy Exceptions)\";\n\t\treturn \"<html><center><font size='4' color='#2d0c08'>\" + text + \"</font></center></html>\";\n\t}", "@Override\r\n protected void updateView() {\r\n putValue(ActionUtil.SELECTED_KEY,\r\n getActiveView() != null &&\r\n ! getActiveView().isPropertiesPanelVisible()\r\n );\r\n }", "@Override public void doAction(int option)\r\n {\r\n switch(option)\r\n {\r\n \r\n case 1: \r\n displayJavaCollectView();\r\n break;\r\n \r\n case 2: \r\n {\r\n try {\r\n displayThreadsAndMore();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(MainMenuView.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n break;\r\n \r\n case 3: \r\n displayAppControlPatt();\r\n break;\r\n \r\n case 4:\r\n displayMVC();\r\n break;\r\n \r\n case 5:\r\n displayHibernate();\r\n break; \r\n \r\n case 6:\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdisplayJSON();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n break; \r\n \r\n case 7:\r\n displayHttpUrlCon();\r\n break; \r\n \r\n case 8:\r\n System.out.println(\"That's it\"); \r\n }\r\n }", "public java.lang.Object[] getSelectPresentationLabelList();", "public String meta(String opt, String key, String value) throws Exception;", "@Override\n\tpublic String getText(Object object) {\n\t\tString label = ((tzpropOptional) object).getTzname();\n\t\treturn label == null || label.length() == 0 ? getString(\"_UI_tzpropOptional_type\")\n\t\t\t\t: getString(\"_UI_tzpropOptional_type\") + \" \" + label;\n\t}", "public VDF getVDF()\n {\n VDF vdf = getViewDefinition();\n // group view current cardinality\n vdf.getEntries()[0].getDataValue().setObject(new Integer(OutUnqassGrp_MA));\n // group view active flags\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n if ( adim0 < OutUnqassGrp_MA )\n {\n ((VDFEntryObject [])vdf.getEntries()[1].getDataValue().getObject())[\n adim0].setObject(new Character('Y'));\n }\n else \n {\n ((VDFEntryObject [])vdf.getEntries()[1].getDataValue().getObject())[\n adim0].setObject(new Character('N'));\n }\n }\n vdf.getEntries()[1].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[2].getDataValue().getObject())[adim0]\n .setObject(new Short(OutGUniqueAssignmentYear[adim0]));\n }\n vdf.getEntries()[2].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[3].getDataValue().getObject())[adim0]\n .setObject(new Short(OutGUniqueAssignmentPeriod[adim0]));\n }\n vdf.getEntries()[3].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[4].getDataValue().getObject())[adim0]\n .setObject(new Integer(OutGUniqueAssignmentUniqueNr[adim0]));\n }\n vdf.getEntries()[4].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[5].getDataValue().getObject())[adim0]\n .setObject(OutGUniqueAssignmentMkStudyUnitCode[adim0]);\n }\n vdf.getEntries()[5].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[6].getDataValue().getObject())[adim0]\n .setObject(new Short(OutGUniqueAssignmentAssignmentNr[adim0]));\n }\n vdf.getEntries()[6].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[7].getDataValue().getObject())[adim0]\n .setObject(new Short(OutGUniqueAssignmentNrOfQuestions[adim0]));\n }\n vdf.getEntries()[7].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[8].getDataValue().getObject())[adim0]\n .setObject(OutGUniqueAssignmentType[adim0]);\n }\n vdf.getEntries()[8].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[9].getDataValue().getObject())[adim0]\n .setObject(new Short(OutGUniqueAssignmentNegativeMarkFactor[adim0]));\n }\n vdf.getEntries()[9].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[10].getDataValue().getObject())[\n adim0].setObject(new Short(OutGUniqueAssignmentMaxCredits[adim0]));\n }\n vdf.getEntries()[10].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[11].getDataValue().getObject())[\n adim0].setObject(new Short(OutGUniqueAssignmentCreditSystem[adim0]));\n }\n vdf.getEntries()[11].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[12].getDataValue().getObject())[\n adim0].setObject(new Short(OutGUniqueAssignmentPassMarkPercentage[adim0]\n ));\n }\n vdf.getEntries()[12].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[13].getDataValue().getObject())[\n adim0].setObject(new Integer(OutGUniqueAssignmentClosingDate[adim0]));\n }\n vdf.getEntries()[13].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[14].getDataValue().getObject())[\n adim0].setObject(OutGUniqueAssignmentCompulsory[adim0]);\n }\n vdf.getEntries()[14].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[15].getDataValue().getObject())[\n adim0].setObject(new Integer(OutGUniqueAssignmentTsaUniqueNr[adim0]));\n }\n vdf.getEntries()[15].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[16].getDataValue().getObject())[\n adim0].setObject(OutGYearMarkCalculationType[adim0]);\n }\n vdf.getEntries()[16].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[17].getDataValue().getObject())[\n adim0].setObject(new Double(OutGYearMarkCalculationNormalWeight[adim0]))\n ;\n }\n vdf.getEntries()[17].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[18].getDataValue().getObject())[\n adim0].setObject(OutGYearMarkCalculationOptionalityGc3[adim0]);\n }\n vdf.getEntries()[18].setCountUsed((short)OutUnqassGrp_MA);\n return(vdf);\n }", "public int getOption() {\n return option;\n }", "public int getOption() {\n return option;\n }", "@Override\n\tpublic void displayData(TextView view, double value) {\n\t\tdouble mph = value * 2.23694;\n\n\t\tspeedBuilder.replace(0, speedBuilder.length(),\n\t\t\t\tString.format(String.format(\"%.1f\", mph)));\n\t\tSpannableString ss1 = new SpannableString(speedBuilder.toString()\n\t\t\t\t+ unitBuilder.toString());\n\t\tss1.setSpan(new RelativeSizeSpan(0.5f), speedBuilder.length(),\n\t\t\t\tss1.length(), 0); // set size\n\t\tss1.setSpan(new ForegroundColorSpan(Color.RED), speedBuilder.length(),\n\t\t\t\tss1.length(), 0);// set color\n\n\t\tview.setText( ss1 );\n\t}", "ViewMap<IBranchMapping> getView();", "abstract String display(T value);", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n\n TextView name = (TextView) view.findViewById(R.id.label3nazwa);\n TextView date = (TextView) view.findViewById(R.id.label1data);\n TextView type = (TextView) view.findViewById(R.id.label2typ);\n TextView value = (TextView) view.findViewById(R.id.label4wartosc);\n // Extract properties from cursor\n String nazwa = cursor.getString(cursor.getColumnIndexOrThrow(\"nazwa\"));\n String typ_id = cursor.getString(cursor.getColumnIndexOrThrow(\"typ_id\"));\n String data = cursor.getString(cursor.getColumnIndexOrThrow(\"data\"));\n String wartosc = cursor.getString(cursor.getColumnIndexOrThrow(\"wartosc\"));\n // Populate fields with extracted properties\n name.setText(nazwa);\n date.setText(data);\n type.setText(typ_id);\n value.setText(wartosc);\n }", "View getActiveView();", "String getViewName() {\n\t\treturn this.viewName;\n\t}" ]
[ "0.7127085", "0.60860384", "0.5835229", "0.5750026", "0.57279605", "0.5713538", "0.5691337", "0.5630883", "0.56263447", "0.5544042", "0.55335975", "0.5511225", "0.5511225", "0.5486209", "0.5472678", "0.5419611", "0.53549707", "0.5316053", "0.5311049", "0.5291073", "0.5274728", "0.5248523", "0.5244751", "0.5236603", "0.5231963", "0.5209941", "0.520251", "0.5197456", "0.51945657", "0.51633227", "0.5153763", "0.5142221", "0.5125217", "0.5109219", "0.5079721", "0.50775576", "0.506751", "0.5063073", "0.50596935", "0.50335073", "0.49672976", "0.49671945", "0.49671945", "0.49671945", "0.4966011", "0.49632496", "0.495962", "0.4951155", "0.49469313", "0.49222317", "0.4919825", "0.49154082", "0.49099845", "0.490725", "0.4901068", "0.4900803", "0.48992583", "0.4895728", "0.4891604", "0.4889311", "0.4882559", "0.4882559", "0.4882559", "0.4882559", "0.4882505", "0.48792967", "0.48756894", "0.48555204", "0.48299855", "0.48285115", "0.48252374", "0.48252374", "0.4825164", "0.4822959", "0.48175928", "0.48149365", "0.48119122", "0.48067898", "0.4804779", "0.48029703", "0.4795046", "0.47901416", "0.47846282", "0.4784377", "0.47838715", "0.47809494", "0.4778736", "0.47752392", "0.47701448", "0.47690675", "0.47671023", "0.4765661", "0.47634855", "0.47526157", "0.47526157", "0.4752314", "0.4746987", "0.47463912", "0.47391656", "0.47358048", "0.47328764" ]
0.0
-1
Create the dialog box
void makeDialog() { fDialog = new ViewOptionsDialog(this.getTopLevelAncestor()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract JDialog createDialog();", "public Dialog<String> createDialog() {\n\t\t// Creating a dialog\n\t\tDialog<String> dialog = new Dialog<String>();\n\n\t\tButtonType type = new ButtonType(\"Ok\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().add(type);\n\t\treturn dialog;\n\t}", "private void createResultPopup() {\r\n resultDialog = new JDialog(parentFrame);\r\n resultDialog.setLayout(new BoxLayout(resultDialog.getContentPane(), BoxLayout.Y_AXIS));\r\n resultDialog.setAlwaysOnTop(true);\r\n Utilities.centerWindowTo(resultDialog, parentFrame);\r\n resultDialog.add(createResultLabel());\r\n resultDialog.add(createButtonDescription());\r\n resultDialog.add(createConfirmationButtons());\r\n resultDialog.pack();\r\n resultDialog.setVisible(true);\r\n }", "private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}", "private void creatDialog() {\n \t mDialog=new ProgressDialog(this);\n \t mDialog.setTitle(\"\");\n \t mDialog.setMessage(\"正在加载请稍后\");\n \t mDialog.setIndeterminate(true);\n \t mDialog.setCancelable(true);\n \t mDialog.show();\n \n\t}", "public abstract Dialog createDialog(DialogDescriptor descriptor);", "private void initDialog() {\n }", "public StandardDialog() {\n super();\n init();\n }", "protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!response.isEmpty()) {\n newOrderbutton(response.toUpperCase());\n }\n });\n }", "private void createDialog() {\r\n final AlertDialog dialog = new AlertDialog.Builder(getActivity()).setView(R.layout.dialog_recorder_details)\r\n .setTitle(\"Recorder Info\").setPositiveButton(\"Start\", (dialog1, which) -> {\r\n EditText width = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_width);\r\n EditText height = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_height);\r\n CheckBox audio = (CheckBox) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_audio_checkbox);\r\n EditText fileName = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_filename_name);\r\n mServiceHandle.start(new RecordingInfo(Integer.parseInt(width.getText().toString()), Integer.parseInt(height.getText().toString()),\r\n audio.isChecked(), fileName.getText().toString()));\r\n dialog1.dismiss();\r\n }).setNegativeButton(\"Cancel\", (dialog1, which) -> {\r\n dialog1.dismiss();\r\n }).show();\r\n Point size = new Point();\r\n getActivity().getWindowManager().getDefaultDisplay().getRealSize(size);\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_width)).setText(Integer.toString(size.x));\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_height)).setText(Integer.toString(size.y));\r\n }", "public void crearDialogo() {\r\n final PantallaCompletaDialog a2 = PantallaCompletaDialog.a(getString(R.string.hubo_error), getString(R.string.no_hay_internet), getString(R.string.cerrar).toUpperCase(), R.drawable.ic_error);\r\n a2.f4589b = new a() {\r\n public void onClick(View view) {\r\n a2.dismiss();\r\n }\r\n };\r\n a2.show(getParentFragmentManager(), \"TAG\");\r\n }", "private void createDialogBox(String title,Widget widget, final Function<Boolean, Void> function) {\n\t\tfinal DialogBox dialogBox = new DialogBox();\n\t\tdialogBox.ensureDebugId(\"cwDialogBox\");\n\t\tdialogBox.setText(title);\n\n\t\t// Create a table to layout the content\n\t\tVerticalPanel dialogContents = new VerticalPanel();\n\t\tdialogContents.setWidth(\"100%\");\n\t\tdialogContents.setSpacing(4);\n\t\tdialogBox.setWidget(dialogContents);\n\n\t\t// Add an image viewer to the dialog\n\t\t\n\t\tdialogContents.add(widget);\n\t\tdialogContents.setCellHorizontalAlignment(widget, HasHorizontalAlignment.ALIGN_CENTER);\n\n\t\t// Add a close button at the bottom of the dialog\n\t\tButton closeButton = new Button(constants.close());\n\t\tcloseButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tdialogBox.hide();\n\t\t\t\tfunction.apply(true);\n\t\t\t}\n\t\t});\n\t\t\n\t\tdialogContents.add(closeButton);\n\t\tdialogContents.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT);\n\n\t\tdialogBox.setGlassEnabled(true);\n\t\tdialogBox.center();\n dialogBox.show();\n\t}", "public void showLifeCycleDialog() {\n\t\t\tlifeCycleDialogBox = new DialogBox(true);\n\t\t\tlifeCycleDialogBox.setGlassEnabled(true);\n\t\t\tlifeCycleDialogBox.setText(\"Seguimiento del Documento\");\n\n\t\t\t// Vertical Panel\n\t\t\tVerticalPanel vp = new VerticalPanel();\n\t\t\tvp.setSize(\"100%\", \"100%\");\n\t\t\tvp.add(lifeCycleCellTree);\n\t\t\tvp.add(new HTML(\"&nbsp;\"));\n\t\t\tvp.add(lifeCycleCloseButton);\n\n\t\t\t// Scroll Panel\n\t\t\tScrollPanel scrollPanel = new ScrollPanel();\n\t\t\tif (getUiParams().isMobile())\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() + \"px\", Window.getClientHeight() + \"px\");\n\t\t\telse\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() * .4 + \"px\", Window.getClientHeight() * .3 + \"px\");\n\t\t\tscrollPanel.setWidget(vp);\n\t\t\tlifeCycleDialogBox.setWidget(scrollPanel);\n\n\t\t\tDouble d = Window.getClientWidth() * .3;\n\t\t\tif (!getUiParams().isMobile()) \n\t\t\t\tlifeCycleDialogBox.setPopupPosition(d.intValue(), UiTemplate.NORTHSIZE * 3);\n\n\t\t\tlifeCycleDialogBox.show();\n\t\t}", "private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}", "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"User created successfully\");\n builder.setIcon(R.drawable.ic_shield);\n builder.setCancelable(true);\n builder.setPositiveButton(\n \"Continue\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n AlertDialog alert11 = builder.create();\n alert11.show();\n Window window = alert11.getWindow();\n assert window != null;\n WindowManager.LayoutParams wlp = window.getAttributes();\n wlp.gravity = Gravity.CENTER;\n wlp.y = 270;\n wlp.flags &= ~WindowManager.LayoutParams.FLAG_DIM_BEHIND;\n window.setAttributes(wlp);\n }", "public void createPopupWindow() {\r\n \t//\r\n }", "void generar_dialog_preguntas();", "public void createNewSoundBoard() {\n\n dialogCreateSoundBoard = new Dialog(this);\n dialogCreateSoundBoard.setContentView(R.layout.soundboard_create);\n dialogCreateSoundBoard.setTitle(\"Create board\");\n dialogCreateSoundBoard.setCancelable(true);\n\n\n sbName = (EditText) dialogCreateSoundBoard.findViewById(R.id.textfieldcreatesoundboardname);\n sbName.setHint(\"Name\");\n Button createOkButton = (Button) dialogCreateSoundBoard.findViewById(R.id.createSoundBoardButton);\n createOkButton.setOnClickListener(createSoundBoardListener);\n\n Button createCancelButton = (Button) dialogCreateSoundBoard.findViewById(R.id.cancelSoundBoardButton);\n createCancelButton.setOnClickListener(cancelButtonCreateSoundBoardListener);\n\n dialogCreateSoundBoard.show();\n }", "public Dialog() {\n\t}", "private void createForumDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(this),\n R.style.AlertDialogTheme);\n dialog.setTitle(R.string.add_new_forum_title);\n dialog.setMessage(R.string.add_new_forum_description);\n\n View newForumDialog = getLayoutInflater().inflate(R.layout.new_forum_dialog, null);\n dialog.setView(newForumDialog);\n\n AlertDialog alertDialog = dialog.create();\n setAddForumButtonListener(alertDialog, newForumDialog);\n\n alertDialog.show();\n }", "public abstract void initDialog();", "public InfoDialog() {\r\n\t\tcreateContents();\r\n\t}", "private AssignFSADialog() {\r\n super(Hub.getMainWindow(), Hub.string(\"TD_assignFSATitle\"));\r\n addWindowListener(new WindowAdapter() {\r\n @Override\r\n public void windowClosing(WindowEvent e) {\r\n onEscapeEvent();\r\n }\r\n });\r\n this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\r\n this.setMinimumSize(new Dimension(300, 10));\r\n\r\n Box mainBox = Box.createHorizontalBox();\r\n mainBox.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\r\n Box newBox = Box.createVerticalBox();\r\n newBox.add(new JLabel(\" \"));\r\n newBox.add(new JButton(new NewFSAAction()));\r\n mainBox.add(newBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n openModelsCombo = new JComboBox();\r\n openModelsCombo.setRenderer(new JLabelListRenderer());\r\n Box modelsBox = Box.createVerticalBox();\r\n Box titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_openModels\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n modelsBox.add(titleBox);\r\n modelsBox.add(openModelsCombo);\r\n mainBox.add(modelsBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n templatesCombo = new JComboBox();\r\n templatesCombo.setRenderer(new JLabelListRenderer());\r\n Box templatesBox = Box.createVerticalBox();\r\n titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_templates\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n templatesBox.add(titleBox);\r\n templatesBox.add(templatesCombo);\r\n mainBox.add(templatesBox);\r\n\r\n getContentPane().add(mainBox);\r\n\r\n }", "public void openDialogCreateVisual(){\n DataHeader[] tabHeader = dataset.getListDataHeaderDouble(true);\n TypeVisualization[] tabVis = getListTypeVisualization(tabHeader.length);\n DataHeader[] tabHeaderLabel = dataset.getListDataHeaderDouble(false);\n CreateDataVisualDialog dialog = new CreateDataVisualDialog(this, tabVis, tabHeader, tabHeaderLabel);\n dialog.setVisible(true);\n }", "private void usernameTakenDialog() {\n Dialog dialog = new Dialog(\"Username taken\", cloudSkin, \"dialog\") {\n public void result(Object obj) {\n System.out.println(\"result \" + obj);\n }\n };\n dialog.text(\"This username has already been taken, try a new one.\");\n dialog.button(\"OK\", true);\n dialog.show(stage);\n }", "private void newDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.addmark));\n\t\tfinal EditText input = new EditText(this);\n\t\tinput.setHint(getString(R.string.pleasemark));\n\t\tbuilder.setView(input);\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tif (input.getText().toString().trim().length() > 0) {\n\t\t\t\t\t\t\taddTag(input.getText().toString());\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.successaddmark),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.pleasemark),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tnewDialog();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}", "private void openCreateAccountDialog()\n {\n testDialog();\n\n }", "public static JDialog createDialog(JFrame owner) {\n PlatformInfoPanel panel = new PlatformInfoPanel();\n JDialog dialog = new JDialog(owner, ResourceManager.getResource(PlatformInfoPanel.class, \"Dialog_title\"));\n dialog.getContentPane().add(panel);\n dialog.setSize(panel.getWidth() + 10, panel.getHeight() + 30);\n return dialog;\n}", "public FiltroGirosDialog() {\n \n }", "private void mostrarDialogoCargar(){\n materialDialog = new MaterialDialog.Builder(this)\n .title(\"Validando datos\")\n .content(\"Por favor espere\")\n .progress(true, 0)\n .contentGravity(GravityEnum.CENTER)\n .widgetColorRes(R.color.colorPrimary)\n .show();\n\n materialDialog.setCancelable(false);\n materialDialog.setCanceledOnTouchOutside(false);\n }", "private Dialogs () {\r\n\t}", "private void createAndShowDialog(final String message, final String title) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity ());\n\n builder.setMessage(message);\n builder.setTitle(title);\n builder.create().show();\n }", "private void createAndShowDialog(final String message, final String title) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setMessage(message);\n builder.setTitle(title);\n builder.create().show();\n }", "public Dialog onCreateDialog(Bundle savedInstanceState){\n AlertDialog.Builder sample_builder = new AlertDialog.Builder(getActivity());\n sample_builder.setView(\"activity_main\");\n sample_builder.setMessage(\"This is a sample prompt. No new networks should be scanned while this prompt is up\");\n sample_builder.setCancelable(true);\n sample_builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogPositiveClick(StationFragment.this);\n }\n });\n sample_builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogNegativeClick(StationFragment.this);\n }\n });\n return sample_builder.create();\n\n }", "public static void newJFXDialogPopUp(String min, String sec, String dist, StackPane stP) {\n System.out.println(\"DialogBox Posted\");\n JFXDialogLayout jfxDialogLayout = new JFXDialogLayout();\n jfxDialogLayout.setHeading(new Text(\"Time Details\"));\n jfxDialogLayout.setBody(new Text(\"Time Estimate: \" + min + \" \" + sec +\"\\n\" + \"Distance Estimate: \" + dist));\n JFXDialog dialog = new JFXDialog(stP, jfxDialogLayout, JFXDialog.DialogTransition.CENTER);\n JFXButton okay = new JFXButton(\"Okay\");\n okay.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n dialog.close();\n\n }\n });\n jfxDialogLayout.setActions(okay);\n dialog.show();\n }", "private void initDialog() {\n dialog = new Dialog(context);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_custom_ok);\n }", "public NewDialog() {\n\t\t\t// super((java.awt.Frame)null, \"New Document\");\n\t\t\tsuper(\"JFLAP 7.0\");\n\t\t\tgetContentPane().setLayout(new GridLayout(0, 1));\n\t\t\tinitMenu();\n\t\t\tinitComponents();\n\t\t\tsetResizable(false);\n\t\t\tpack();\n\t\t\tthis.setLocation(50, 50);\n\n\t\t\taddWindowListener(new WindowAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void windowClosing(final WindowEvent event) {\n\t\t\t\t\tif (Universe.numberOfFrames() > 0) {\n\t\t\t\t\t\tNewDialog.this.setVisible(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tQuitAction.beginQuit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public BaseDialog create()\n {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n // instantiate the dialog with the custom Theme\n final BaseDialog dialog = new BaseDialog(context, R.style.Dialog);\n\n View layout = inflater.inflate(R.layout.view_shared_basedialog, null);\n\n //set the dialog's image\n this.icon = (ImageView) layout.findViewById(R.id.view_shared_basedialog_icon);\n\n if (this.imageResource > 0 || this.imageUrl != null)\n {\n this.icon.setVisibility(View.VISIBLE);\n if (this.imageResource > 0)\n {\n this.icon.setBackgroundResource(this.imageResource);\n }\n else\n {\n// TextureRender.getInstance().setBitmap(this.imageUrl, this.icon, R.drawable.no_data_error_image);\n }\n }\n else\n {\n this.icon.setVisibility(View.GONE);\n }\n\n // set check box's text and default value\n this.checkLayout = layout.findViewById(R.id.view_shared_basedialog_checkbox_layout);\n this.checkBox = (CheckBox) layout.findViewById(R.id.view_shared_basedialog_checkbox);\n this.checkBoxTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_checkbox_text);\n\n if (!TextUtils.isEmpty(this.checkBoxText))\n {\n this.checkLayout.setVisibility(View.VISIBLE);\n this.checkBoxTextView.setText(this.checkBoxText);\n this.checkBox.setChecked(checkBoxDefaultState);\n }\n else\n {\n this.checkLayout.setVisibility(View.GONE);\n }\n\n // set the dialog main title and sub title\n this.maintitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_maintitle_textview);\n this.subtitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_subtitle_textview);\n this.titleDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_titledivide_textview);\n if (!TextUtils.isEmpty(title1))\n {\n this.maintitleTextView.setText(title1);\n if (this.title1BoldAndBig)\n {\n this.maintitleTextView.setTypeface(null, Typeface.BOLD);\n this.maintitleTextView.setTextSize(17);\n }\n\n this.maintitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.maintitleTextView.setVisibility(View.GONE);\n }\n\n if (!TextUtils.isEmpty(title2))\n {\n this.subtitleTextView.setText(title2);\n this.subtitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.subtitleTextView.setVisibility(View.GONE);\n }\n this.titleDivideTextView.setVisibility(View.GONE);\n\n // set the confirm button\n this.positiveButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_positivebutton));\n if (!TextUtils.isEmpty(positiveButtonText))\n {\n this.positiveButton.setText(positiveButtonText);\n this.positiveButton.setVisibility(View.VISIBLE);\n if (positiveButtonClickListener != null)\n {\n this.positiveButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n positiveButtonClickListener.onClick(dialog, DialogInterface.BUTTON_POSITIVE);\n if (checkBox.isChecked()&&onCheckBoxListener!=null)\n {\n onCheckBoxListener.checkedOperation();\n }\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.positiveButton.setVisibility(View.GONE);\n }\n\n // set the cancel button\n this.negativeButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_negativebutton));\n if (!TextUtils.isEmpty(negativeButtonText))\n {\n this.negativeButton.setText(negativeButtonText);\n this.negativeButton.setVisibility(View.VISIBLE);\n if (negativeButtonClickListener != null)\n {\n this.negativeButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n negativeButtonClickListener.onClick(dialog, DialogInterface.BUTTON_NEGATIVE);\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.negativeButton.setVisibility(View.GONE);\n }\n\n // set button's background\n this.buttonDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_buttondivide_textview);\n if (!TextUtils.isEmpty(negativeButtonText) && !TextUtils.isEmpty(negativeButtonText))\n {\n this.buttonDivideTextView.setVisibility(View.VISIBLE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_rightbottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_leftbottom);\n }\n else\n {\n this.buttonDivideTextView.setVisibility(View.GONE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n }\n\n // set the content message\n this.contentLayout = layout.findViewById(R.id.view_shared_basedialog_content_layout);\n if (!TextUtils.isEmpty(message))\n {\n this.contentTextView = ((TextView) layout.findViewById(R.id.view_shared_basedialog_content_textview));\n this.contentTextView.setText(message);\n this.contentTextView.setMovementMethod(ScrollingMovementMethod.getInstance());\n }\n else if (contentView != null)\n {\n // if no message set\n // add the contentView to the dialog body\n ((ViewGroup) this.contentLayout).removeAllViews();\n ((ViewGroup) this.contentLayout).addView(contentView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n }\n else\n {\n this.contentLayout.setVisibility(View.GONE);\n }\n\n int[] params = Utils.getLayoutParamsForHeroImage();\n dialog.setContentView(layout, new ViewGroup.LayoutParams(params[0]*4/5, ViewGroup.LayoutParams.MATCH_PARENT));\n return dialog;\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n // Use the Builder class for convenient dialog construction\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(R.string.title_add_to_shopping);\n\n // initialize itemcreation\n m_createItemDlg = new CreateItemDialog(this);\n\n // create item selection\n builder.setView(createItemSelection());\n\n // set buttonss\n builder.setPositiveButton(R.string.button_add, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n if(m_callback != null) {\n m_callback.readAddToShoppingDlgAndUpdate();\n }\n }\n });\n builder.setNegativeButton(R.string.button_cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) { }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n \r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n builder.setTitle(\"New Wallet\");\r\n \r\n\t final View view = inflater.inflate(R.layout.new_wallet_dialog, null);\r\n\t \r\n\t final EditText name = (EditText) view.findViewById(R.id.newWallet_text);\r\n\t \r\n builder.setPositiveButton(R.string.confirmRecord, new DialogInterface.OnClickListener() {\r\n \r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.comfirmPressed(name.getText().toString());\t\r\n \t\t}\r\n });\r\n builder.setNegativeButton(R.string.cancelRecord, new DialogInterface.OnClickListener() {\r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.cancelPressed();\r\n \t\t}\r\n \t});\r\n // Create the AlertDialog object and return it\r\n return builder.create();\r\n }", "protected void createDialogSize ()\n {\n }", "DialogResult show();", "public AlertDialog createSimpleDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Code with love by\")\n .setMessage(\"Alvaro Velasco & Jose Alberto del Val\");\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = requireActivity().getLayoutInflater();\n final View view = inflater.inflate(R.layout.on_click_dialog, null);\n builder.setView(view);\n\n\n\n\n\n\n\n\n return builder.create();\n }", "public void openOrderBalanceDialog() {\n\t\torderBalanceDialogBox = new DialogBox(true);\n\t\torderBalanceDialogBox.setGlassEnabled(true);\n\t\torderBalanceDialogBox.setText(\"Rentabilidad Pedido\");\n\t\torderBalanceDialogBox.setSize(\"250px\", \"150px\");\n\n\t\tVerticalPanel vp = new VerticalPanel();\n\t\tvp.setSize(\"250px\", \"150px\");\n\t\torderBalanceDialogBox.setWidget(vp);\n\n\t\tFlowPanel orderPanel = new FlowPanel();\n\t\torderPanel.setWidth(\"250px\");\n\n\t\t// Obten info del filtro forzado\n\t\tBmFilter forceFilter = getUiParams().getUiProgramParams(getBmObject().getProgramCode()).getForceFilter();\n\n\t\tUiRequisitionOrderView uiRequisitionOrderView = new UiRequisitionOrderView(getUiParams(), orderPanel, forceFilter.getValue());\n\t\tuiRequisitionOrderView.show();\t\t\t\t\t\n\n\t\tHorizontalPanel buttonPanel = new HorizontalPanel();\n\t\tbuttonPanel.add(orderBalanceCloseDialogButton);\n\n\t\tvp.add(orderPanel);\n\t\tvp.add(buttonPanel);\n\n\t\torderBalanceDialogBox.center();\n\t\torderBalanceDialogBox.show();\n\t}", "private void makeDialog() {\n \t\tfinal BackgroundGame thisPanel = this;\n \n \t\tfinal JInternalFrame dialog = new JInternalFrame(\"Question!\");\n \t\tdialog.addInternalFrameListener(new InternalFrameListener() {\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameOpened(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameClosing(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameClosed(InternalFrameEvent arg0) {\n \t\t\t\tthisPanel.requestFocusInWindow();\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameIconified(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameDeiconified(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameActivated(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameDeactivated(InternalFrameEvent arg0) {\n \t\t\t}\n \t\t});\n \n \t\tQuestion randQuestion = questions.get(\n \t\t\t\t(int) (Math.random() * questions.size()));\n \n \t\tJLabel label = new JLabel(randQuestion.getQuestion());\n \t\tlabel.setHorizontalAlignment(SwingConstants.LEFT);\n \t\tFont font = label.getFont();\n \t\tlabel.setFont(label.getFont().deriveFont(font.PLAIN, 14.0f));\n \n \t\tJPanel a = new JPanel();\n \t\ta.setLayout(new BoxLayout(a, BoxLayout.Y_AXIS));\n \t\ta.add(label);\n \t\t\n \t\tJPanel choicesPanel = new JPanel();\n \t\tfor (int i = 1; i <= 4; ++i) {\n \t\t\tString choice = randQuestion.getChoice(i);\n \t\t\tJButton button = new JButton();\n \t\t\tif (randQuestion.answerIs(choice)) {\n \t\t\t\t//Remove the \"--\" marker\n \t\t\t\tchoice = choice.substring(0, choice.indexOf(\"--\"));\n \t\t\t\t\n \t\t\t\tbutton.addActionListener(new ActionListener() {\n \t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n \t\t\t\t\t\tdialog.setVisible(false);\n \t\t\t\t\t\tdialog.dispose();\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t}\n \t\t\t\t\t\t\t\n \t\t\tbutton.setText(choice);\n \t\t\tchoicesPanel.add(button);\n \t\t}\n \t\ta.add(choicesPanel);\n \n \t\tdialog.setContentPane(a);\n \n \t\tdialog.pack();\n \t\tdialog.setVisible(true);\n \t\tadd(dialog);\n \n \t\tdialog.setLocation(\n \t\t\t\t(int) (Math.random() * (getWidth() - dialog.getWidth())),\n \t\t\t\t(int) (Math.random() * (getHeight() - dialog.getHeight())));\n \t\t/*\n \t\t\n \t\tfor (max = max; max >= 1; max--) {\n \t\ttest = choices.get((int) (Math.random() * max) + min);\n \t\tSystem.out.println(test);\n \t\tSystem.out.println(choices.indexOf(test));\n \t\tchoices.remove(test);\n \t\tSystem.out.println(max);\n \t\t}*/\n \n \t\tincreaseCpuUsage(2);\n \t}", "public void popUpDialogBox(View passedView, int code) {\n mBuilder = new AlertDialog.Builder(TrailActivity.this);\n if(code == 0) {\n Date editedTrailDt = null;\n editedView = passedView;\n editedTrailName = (EditText) editedView.findViewById(R.id.TrailNametxt);\n editedTrailModule = (EditText) editedView.findViewById(R.id.Moduletxt);\n editedTrailCode = (EditText) editedView.findViewById(R.id.TrailCodetxt);\n editedTrailDate = (EditText) editedView.findViewById(R.id.datetxt);\n try { editedTrailDt = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.ENGLISH).parse(editedTrailDate.getText().toString().trim()); }\n catch (ParseException e) { e.printStackTrace(); }\n editedTrailId = geTrailId(editedTrailCode.getText().toString(), editedTrailDt);\n }\n else editedView = null;\n initDialogBoxViews(passedView);\n setDateClickListener();\n setTrailDateClickListener();\n setAddtrailBtnClickListener();\n mBuilder.setView(passedView);\n dialog = mBuilder.create();\n dialog.show();\n }", "public PaySuccessDialog create() {\r\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n View layout = inflater.inflate(R.layout.paysucdialog, null);\r\n final PaySuccessDialog dialog = new PaySuccessDialog(context,R.style.Dialog);\r\n ImageView img_success = (ImageView)layout.findViewById(R.id.img_success);\r\n img_success.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\r\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}\r\n\t\t\t});\r\n \r\n dialog.setContentView(layout);\r\n return dialog;\r\n }", "@Override\n protected Dialog onCreateDialog(int id) {\n \tswitch (id) {\n\t\tcase DLG_PROGRESSBAR:\n\t\t\treturn dialogoProgressBar();\n\t\tcase DLG_BUTTONS:\n\t\t\treturn dialogButtons();\n\t\tcase DLG_LIST:\n\t\t\treturn dialogLista();\n\t\tcase DLG_LIST_SELECT:\n\t\t\treturn dialogListaSelect();\n\t\tdefault:\n\t\t\treturn dialogButtons();\n\t\t}\n }", "public Dialog createAddPersonDialog(String title, String msg) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getMyAcitivty());\n builder.setTitle(title);\n builder.setMessage(msg);\n\n // Use an EditText view to get user input.\n final EditText input = new EditText(getMyAcitivty());\n input.setText(\"\");\n builder.setView(input);\n\n builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int whichButton) {\n String value = input.getText().toString();\n Log.d(TAG, \"user input: \" + value);\n inputDialogResult = value;\n launchTrainingActivity();\n// AlertDialog dg =\n// SelectServerAlertDialog.createDialog(\n// getContext(),\n// \"Pick a Server\",\n// getAllIps(),\n// launchTrainingActivityAction,\n// cancelAction,\n// true);\n// dg.show();\n }\n });\n builder.setNegativeButton(\"Cancel\", SelectServerAlertDialog.cancelAction);\n return builder.create();\n }", "protected Dialog onCreateDialog (int id) {\n\t\tif (!this.hasWindowFocus())\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tdismissDialog (DIALOG_CREATE);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\r\n\t\t\t}\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tdismissDialog (DIALOG_SUBMIT);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tAlertDialog.Builder bld = new AlertDialog.Builder(this);\r\n\t\tswitch (id){\r\n\t\tcase DIALOG_CREATE: \r\n\t\t{bld.setMessage(\"More than one call needs to be reported. Your most recent call is first.\").setCancelable(false).setPositiveButton(\"OK\", new DialogInterface.OnClickListener()\r\n\t\t{\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\tdialog.dismiss();\r\n\t\t}\r\n\t\t}).setTitle(\"New Record\");\r\n\t\tbreak;\r\n\t\t}\r\n\t\tcase DIALOG_SUBMIT:\r\n\t\t{\r\n\t\t\tbld.setMessage(\"Please submit your previous call record now.\").setCancelable(false).setPositiveButton(\"OK\", new DialogInterface.OnClickListener()\r\n\t\t\t{\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}\r\n\t\t\t}).setTitle(\"Older Record\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t}\r\n\t\treturn bld.create();\r\n\t}", "private void doDialogMsgBuilder() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(getResources().getString(R.string.OverAge))\n .setCancelable(false)\n .setPositiveButton(getResources().getString(R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n\n AlertDialog alert = builder.create();\n alert.show();\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.fragment_message_dialog, null);\n msg = rootView.findViewById(R.id.msg);\n submit = rootView.findViewById(R.id.msg_submit);\n final int code = getTargetRequestCode();\n builder.setView(rootView);\n builder.setTitle(\"Enter a message:\");\n\n submit.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n\n sendResult(code);\n dismiss();\n\n\n }\n\n });\n\n return builder.create();\n }", "public void dialogoAgregarUsuario() {\n vAgregarUsuario = new V_AgregarUsuario(new JFrame(), true);\n vAgregarUsuario.setVisible(true);\n }", "@Override\r\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\r\n\t\t// Set up the layout inflater\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\r\n\t\t// Set the title, message and layout of the dialog box\r\n\t\tbuilder.setView(inflater.inflate(R.layout.dialog_box_layout, null))\r\n\t\t\t\t.setTitle(R.string.dialog_title);\r\n\r\n\t\t// User accepts the thing in the dialog box\r\n\t\tbuilder.setPositiveButton(R.string.dialog_accpet,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(),\r\n\t\t\t\t\t\t\t\t\"Thank you for your kiss ^.^\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t// User cancels the thing in the dialog box\r\n\t\tbuilder.setNegativeButton(R.string.dialog_cancel,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(), \"Refuse my kiss??? >.<\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\treturn builder.create(); // return the AlertDialog object\r\n\t}", "private void buildSuccessDialog(){\n\t\tmainDialog = new JDialog(mainWindow,\"Success!\");\n\t\t//mainDialog.getContentPane().removeAll();\n\t\tJPanel p1 = new JPanel (new BorderLayout());\n\t\tp1.setBackground(Color.white);\n\t\t//success text\n\t\tJLabel lab = new JLabel(\"Login Successful!\");\n\t\tlab.setFont( new Font(\"URW Gothic L\",Font.BOLD, 15));\n\t\tlab.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\tp1.add(lab, BorderLayout.NORTH);\n\t\t\n\t\t//success image\n\t\tImageIcon img = new ImageIcon (\"./client_images/success.png\");\n\t\timg = new ImageIcon ( img.getImage().getScaledInstance(100,100,Image.SCALE_DEFAULT));\n\t\tJLabel imgLabel = new JLabel(img);\n\t\tp1.add(imgLabel,BorderLayout.CENTER);\n\n\t\tJButton ok = new JButton (\"Ok\");\n\t\t//pressing ok closes the application\n\t\t//register action listener (anonymous inner class is sufficient)\n\t\tok.addActionListener (new ActionListener(){\n\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\t//call GUI's close up method to gracefully release all\n\t\t\t\t\t\t\t//resources\n\t\t\t\t\t\t\tClientGui.this.closeUp();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\tp1.add(ok,BorderLayout.SOUTH);\n\n\t\t//settings of the dialog box\n\t\tmainDialog.getContentPane().add(p1);\n\t\tmainDialog.setLocationRelativeTo(mainWindow);\n\t\tmainDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\t\tmainDialog.setModal(true);\n\t\tmainDialog.setMinimumSize(new Dimension(300,200));\n\t\tmainDialog.setMaximumSize(new Dimension(300,200));\n\t\tmainDialog.setResizable(false);\n\t\tmainDialog.setVisible(true);\n\t\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_fire_missiles)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n return builder.create();\n }", "public void popupAdd() {\n builder = new AlertDialog.Builder(getView().getContext());\n View views = getLayoutInflater().inflate(R.layout.departmentpopup, (ViewGroup) null);\n DepartmentName = (EditText) views.findViewById(R.id.department_name);\n DepartmentId = (EditText) views.findViewById(R.id.department_id);\n pbar =views.findViewById(R.id.departmentProgress);\n Button button =views.findViewById(R.id.save_depart);\n saveButton = button;\n button.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n addDeparatments();\n }\n });\n builder.setView(views);\n AlertDialog create =builder.create();\n dialog = create;\n create.show();\n }", "protected Dialog onCreateDialog(int id) {\n if (id == 1) {\n AlertDialog.Builder adb = new AlertDialog.Builder(this);\n // заголовок\n adb.setTitle(\"PIN Removed\");\n // сообщение\n adb.setMessage(\"There will be no PIN entry screen when Application starts up.\");\n // иконка\n adb.setIcon(android.R.drawable.ic_dialog_info);\n adb.setNeutralButton(\"Ok\", myClickListener);\n // создаем диалог\n return adb.create();\n }\n return super.onCreateDialog(id);\n }", "public void working() {\n\t\t Dialog d = new Dialog(this);\r\n\t\t d.setTitle(\"hech yea!\");\r\n\t\t TextView tv = new TextView(this);\r\n\t\t tv.setText(\"Success\");\r\n\t\t d.setContentView(tv);\r\n\t\t d.show();\t\r\n\t}", "private void buildWaitingDialog(){\n\t\tmainDialog = new JDialog(mainWindow,\"Waiting for server...\");\n\t\tJPanel p1= new JPanel(new BorderLayout());\n\t\tp1.setBackground(Color.white);\n\n\t\t//waiting text\n\t\tJLabel lab = new JLabel(\"Please wait...\");\n\t\tlab.setFont( new Font(\"URW Gothic L\",Font.BOLD, 15));\n\t\tlab.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\tp1.add(lab, BorderLayout.NORTH);\n\t\t\n\t\t//waiting animation\n\t\tImageIcon gif = new ImageIcon (\"./client_images/load.gif\");\n\t\tJLabel imgLabel = new JLabel(gif);\n\t\tp1.add(imgLabel,BorderLayout.CENTER);\n\n\t\t//abort button to close client application\n\t\tJButton abort = new JButton (\"Abort\");\n\t\t//register anonymous listener class that closes up application\n\t\tabort.addActionListener (new ActionListener(){\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\tClientGui.this.closeUp();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t);\n\t\tp1.add(abort,BorderLayout.SOUTH);\n\n\t\t//dialog settings\n\t\tmainDialog.getContentPane().add(p1);\n\t\tmainDialog.setLocationRelativeTo(mainWindow);\n\t\tmainDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\t\tmainDialog.setModal(true);\n\t\tmainDialog.setMinimumSize(new Dimension(300,200));\n\t\tmainDialog.setMaximumSize(new Dimension(300,200));\n\t\tmainDialog.setResizable(false);\n\t\tmainDialog.setVisible(true);\n\t\t\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(device.getName())\n \t\t.setTitle(R.string.bt_exchange_dialog_title)\n .setPositiveButton(R.string.bt_exchange_dialog_positive_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n \t //Add BT Device Activity\n \t performBTKeyExchange(device);\n }\n })\n .setNegativeButton(R.string.bt_exchange_dialog_negative_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n \t dismiss();\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(msg)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n\n Dialog dialog = builder.create();\n\n // Create the AlertDialog object and return it\n return dialog;\n }", "private void showCheckDialog() {\n AlertDialog.Builder showAuditAlert = new AlertDialog.Builder(this); // Create Alert dialog\n showAuditAlert.setTitle(\"Total prize\"); // Set title\n showAuditAlert.setMessage(\"= \"+mydb.getResultDayAudit(year,month,day).intValue()+\"\"); // Set message\n\n showAuditAlert.setPositiveButton(\"Done\",\n new DialogInterface.OnClickListener()\n { // Can hear \"CLICK\"\n @Override\n public void onClick(DialogInterface dialog,int which)\n {\n \tdialog.dismiss(); // CLICK then disappear\n }\n }\n );\n showAuditAlert.show(); // Show dialog that created upper this line\n }", "private void createGroupDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(this),\n R.style.AlertDialogTheme);\n dialog.setTitle(R.string.add_new_group_title);\n dialog.setMessage(R.string.add_new_group_description);\n\n View newGroupDialog = getLayoutInflater().inflate(R.layout.new_group_dialog, null);\n dialog.setView(newGroupDialog);\n\n AlertDialog alertDialog = dialog.create();\n setAddGroupButtonListener(alertDialog, newGroupDialog);\n\n alertDialog.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n View view = getActivity().getLayoutInflater().inflate(R.layout.rollback_detail_dialog, new LinearLayout(getActivity()), false);\n\n initUI(view);\n // clickEvents();\n\n /*\n assert getArguments() != null;\n voucherTypes = (ArrayList<VoucherType>) getArguments().getSerializable(\"warehouses\");\n voucherType=\"\";\n*/\n\n Dialog builder = new Dialog(getActivity());\n builder.requestWindowFeature(Window.FEATURE_NO_TITLE);\n builder.setContentView(view);\n return builder;\n\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Done entering class?\")\n .setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n })\n .setNegativeButton(\"no\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent tmp = new Intent(getContext(), course_info.class);\n startActivity(tmp);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public void actionPerformed(ActionEvent evt) {\r\n super.actionPerformed(evt);\r\n createDialog().show();\r\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"REGISTRO PODA\");\n builder.setMessage(\"USUARIO O CONTRASEÑA INCORRECTA\");\n final AlertDialog.Builder ok = builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // You don't have to do anything here if you just want it dismissed when clicked\n }\n });\n\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.generic_test_layout);\r\n\t\t//--Creating Dialog.\r\n\t\tString [] Botones={\"OK\",\"CANCEL\"};\r\n\t\tString [] Items={\"opcion1\",\"opcion2\",\"opcion3\"};\r\n\t\tCreateDialog(TypeDialog.ALERT, R.drawable.icon, \"TestingDialog\", Botones, Items, null);\r\n\t\tCreateDialog(TypeDialog.PROGRESS, R.drawable.icon, \"TestingDialog\", Botones, Items, 100);\r\n\t}", "public void showInputCategoryCreateDialog() {\r\n FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_INPUT_CATEGORY_CREATE_DIALOG));\r\n\r\n Parent page;\r\n\r\n try {\r\n page = loader.load();\r\n } catch (IOException ex) {\r\n logger.warn(\"Failed to load: \" + FXML_INPUT_CATEGORY_CREATE_DIALOG, ex);\r\n\r\n return;\r\n }\r\n\r\n // set the stage\r\n Stage stage = new Stage();\r\n stage.setTitle(\"Create Input Category\");\r\n stage.initModality(Modality.APPLICATION_MODAL);\r\n stage.centerOnScreen();\r\n stage.initOwner(mainStage);\r\n\r\n Scene scene = new Scene(page);\r\n scene.getStylesheets().add(getClass().getResource(STYLESHEET_DEFAULT).toExternalForm());\r\n\r\n stage.setScene(scene);\r\n\r\n // Set the item into the controller.\r\n InputCategoryCreateDialogController controller = loader.getController();\r\n controller.setStage(stage);\r\n\r\n stage.showAndWait();\r\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n filename = getArguments().getString(\"filename\");\n username = getArguments().getString(\"username\");\n workingDIR = getArguments().getString(\"workingDIR\");\n builder.setTitle(R.string.copy_move_file_select_options_title)\n .setItems(R.array.file__move_copy_dialog_options, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n onSelect(which);\n }\n });\n return builder.create();\n }", "private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\n\t\tshell.setSize(379, 234);\n\t\tshell.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tLabel dialogAccountHeader = new Label(shell, SWT.NONE);\n\t\tdialogAccountHeader.setAlignment(SWT.CENTER);\n\t\tdialogAccountHeader.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tdialogAccountHeader.setLayoutData(BorderLayout.NORTH);\n\t\tif(!this.isNeedAdd)\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u043B\\u0435\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.BOLD));\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\t\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel.setBounds(10, 16, 106, 21);\n\t\tlabel.setText(\"\\u0418\\u043C\\u044F \\u0441\\u0435\\u0440\\u0432\\u0435\\u0440\\u0430\");\n\t\t\n\t\ttextServer = new Text(composite, SWT.BORDER);\n\t\ttextServer.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextServer.setBounds(122, 13, 241, 32);\n\t\t\n\t\n\t\tLabel label_1 = new Label(composite, SWT.NONE);\n\t\tlabel_1.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_1.setText(\"\\u041B\\u043E\\u0433\\u0438\\u043D\");\n\t\tlabel_1.setBounds(10, 58, 55, 21);\n\t\t\n\t\ttextLogin = new Text(composite, SWT.BORDER);\n\t\ttextLogin.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextLogin.setBounds(122, 55, 241, 32);\n\t\ttextLogin.setFocus();\n\t\t\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_2.setText(\"\\u041F\\u0430\\u0440\\u043E\\u043B\\u044C\");\n\t\tlabel_2.setBounds(10, 106, 55, 21);\n\t\t\n\t\ttextPass = new Text(composite, SWT.PASSWORD | SWT.BORDER);\n\t\ttextPass.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextPass.setBounds(122, 103, 241, 32);\n\t\t\n\t\tif(isNeedAdd){\n\t\t\ttextServer.setText(\"imap.mail.ru\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttextServer.setText(this.account.getServer());\n\t\t\ttextLogin.setText(account.getLogin());\n\t\t\ttextPass.setText(account.getPass());\n\t\t}\n\t\t\n\t\tComposite composite_1 = new Composite(shell, SWT.NONE);\n\t\tcomposite_1.setLayoutData(BorderLayout.SOUTH);\n\t\t\n\t\tButton btnSaveAccount = new Button(composite_1, SWT.NONE);\n\t\tbtnSaveAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tString login = textLogin.getText();\n\t\t\t\tif(textServer.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле имя сервера не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textLogin.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if (!login.matches(\"^([_A-Za-z0-9-]+)@([A-Za-z0-9]+)\\\\.([A-Za-z]{2,})$\"))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин введен некорректно!\");\n\t\t\t\t\treturn;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(Setting.Instance().AnyAccounts(textLogin.getText(), isNeedAdd))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"такой логин уже существует!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textPass.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле пароль не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(isNeedAdd)\n\t\t\t\t{\n\t\t\t\t\tservice.AddAccount(textServer.getText(), textLogin.getText(), textPass.getText());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\taccount.setLogin(textLogin.getText());\n\t\t\t\t\taccount.setPass(textPass.getText());\n\t\t\t\t\taccount.setServer(textServer.getText());\t\n\t\t\t\t\tservice.EditAccount(account);\n\t\t\t\t}\n\t\t\t\tservice.RepaintAccount(table);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnSaveAccount.setLocation(154, 0);\n\t\tbtnSaveAccount.setSize(96, 32);\n\t\tbtnSaveAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnSaveAccount.setText(\"\\u0421\\u043E\\u0445\\u0440\\u0430\\u043D\\u0438\\u0442\\u044C\");\n\t\t\n\t\tButton btnCancel = new Button(composite_1, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setLocation(267, 0);\n\t\tbtnCancel.setSize(96, 32);\n\t\tbtnCancel.setText(\"\\u041E\\u0442\\u043C\\u0435\\u043D\\u0430\");\n\t\tbtnCancel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\n\t}", "@Override\n protected Dialog onCreateDialog(int id) {\n Dialog dialog = null;\n switch (id) {\n case CHOOSE_METHOD_DIALOG:\n return chooseActionContextMenu.createMenu(this.getString(R.string.choose_action_title));\n case ABOUT_DIALOG:\n dialog = createAboutDialog();\n break;\n default:\n dialog = null;\n break;\n }\n return dialog;\n }", "@Override\n public void onClick(View view) {\n if (mAddDialog == null) {\n mAddDialog = new XPopup.Builder(MainActivity.this)\n .asInputConfirm(getString(R.string.add_random_title)\n , getString(R.string.add_random_content)\n , new OnInputConfirmListener() {\n @Override\n public void onConfirm(String text) {\n if (mAdapter != null) {\n mAdapter.addData(new BaseModel(text, 1));\n }\n }\n }).show();\n } else {\n mAddDialog.show();\n }\n }", "@Override\r\n\t protected Dialog onCreateDialog(int id) {\n\t \r\n\t screenDialog = null;\r\n\t switch(id){\r\n\t case(ID_SCREENDIALOG):\r\n\t screenDialog = new Dialog(this);\r\n\t screenDialog.setContentView(R.layout.message);\r\n\t messageText=(EditText)screenDialog.findViewById(R.id.messagetext1);\r\n\t send=(Button)screenDialog.findViewById(R.id.button1);\r\n\t send.setOnClickListener(sendmessage);\r\n\t cancel=(Button)screenDialog.findViewById(R.id.button2);\r\n\t cancel.setOnClickListener(cancelmessage);\r\n\t }\r\n\t return screenDialog;\r\n\t }", "public PHConstDialog() {\n\t\tinitComponents();\n\t}", "public RelationshipDialog() {\n super(getRTParent(), \"Add Relationship...\", true);\n getContentPane().setLayout(new BorderLayout(5,5));\n JPanel center = new JPanel(new GridLayout(5,2,5,5));\n center.add(new JLabel(\"From\")); \n center.add(new JLabel(\"To\"));\n\n String blanks[] = KeyMaker.blanks(getRTParent().getRootBundles().getGlobals());\n center.add(from_cb = new JComboBox(blanks));\n center.add(to_cb = new JComboBox(blanks));\n\n center.add(from_symbol_cb = new JComboBox(Utils.SHAPE_STRS));\n center.add(to_symbol_cb = new JComboBox(Utils.SHAPE_STRS));\n center.add(from_typed_cb = new JCheckBox(\"Field Typed\", false));\n center.add(to_typed_cb = new JCheckBox(\"Field Typed\", false));\n center.add(ignore_ns_cb = new JCheckBox(\"Ignore Not Sets\", true));\n getContentPane().add(\"Center\", center);\n\n getContentPane().add(\"North\", style_cb = new JComboBox(STYLE_STRS));\n\n JPanel bottom = new JPanel(new FlowLayout());\n JButton add_bt, cancel_bt;\n bottom.add(add_bt = new JButton(\"Add\"));\n bottom.add(cancel_bt = new JButton(\"Cancel\"));\n getContentPane().add(\"South\", bottom);\n\n // Add listeners\n cancel_bt.addActionListener(new ActionListener() { \n public void actionPerformed(ActionEvent ae) { setVisible(false); dispose(); } } );\n add_bt.addActionListener(new ActionListener() { \n public void actionPerformed(ActionEvent ae) {\n setVisible(false); dispose();\n\t addRelationship((String) from_cb.getSelectedItem(), \n\t (String) from_symbol_cb.getSelectedItem(),\n\t \t\t from_typed_cb.isSelected(),\n\t (String) to_cb.getSelectedItem(), \n\t (String) to_symbol_cb.getSelectedItem(),\n\t\t \t to_typed_cb.isSelected(),\n (String) style_cb.getSelectedItem(), \n\t\t\t ignore_ns_cb.isSelected(), \n\t\t\t false);\n } } );\n pack(); setVisible(true);\n }", "public IOHandlerDialog()\n {\n panel = new JOptionPane();\n }", "public JDialogParticleAnalysisNew() { }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState)\n {\n AnalyticsHelper.reportScreen(getActivity(), AnalyticsManager.SCREEN_NODE_CREATE_NAME);\n\n MaterialDialog dialog = new MaterialDialog.Builder(getActivity()).iconRes(R.drawable.ic_application_logo)\n .title(R.string.folder_create).customView(createView(LayoutInflater.from(getActivity()), null), true)\n .positiveText(R.string.create).negativeText(R.string.cancel)\n .callback(new MaterialDialog.ButtonCallback()\n {\n @Override\n public void onPositive(MaterialDialog dialog)\n {\n UIUtils.hideKeyboard(getActivity(), tv);\n\n String operationId = Operator.with(getActivity(), SessionUtils.getAccount(getActivity()))\n .load(new CreateFolderRequest.Builder((Folder) getArguments().get(ARGUMENT_FOLDER),\n tv.getText().toString().trim()));\n\n OperationWaitingDialogFragment\n .newInstance(CreateFolderRequest.TYPE_ID, R.drawable.ic_add_folder,\n getString(R.string.folder_create), null,\n (Folder) getArguments().get(ARGUMENT_FOLDER), 0, operationId)\n .show(getActivity().getSupportFragmentManager(), OperationWaitingDialogFragment.TAG);\n\n dialog.dismiss();\n }\n\n @Override\n public void onNegative(MaterialDialog dialog)\n {\n dialog.dismiss();\n }\n }).build();\n dialog.getActionButton(DialogAction.POSITIVE).setEnabled(false);\n return dialog;\n }", "private void popupCalibratingDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(R.string.motion_calibrating);\n builder.setCancelable(false);\n builder.setMessage(R.string.motion_calibrating_message);\n\n calibratingDialog = builder.create();\n calibratingDialog.show();\n }", "@Override\n\tprotected Dialog onCreateDialog(int id) {\n\t\treturn buildDialog(MainActivity.this);\n\t\t\n\t}", "public void showUserDefinedInputCreateDialog() {\r\n FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_USER_DEFINED_INPUT_CREATE_DIALOG));\r\n\r\n Parent page;\r\n\r\n try {\r\n page = loader.load();\r\n } catch (IOException ex) {\r\n logger.warn(\"Failed to load: \" + FXML_USER_DEFINED_INPUT_CREATE_DIALOG, ex);\r\n\r\n return;\r\n }\r\n\r\n // set the stage\r\n Stage stage = new Stage();\r\n stage.setTitle(\"Create Custom Input\");\r\n stage.initModality(Modality.APPLICATION_MODAL);\r\n stage.centerOnScreen();\r\n stage.initOwner(mainStage);\r\n\r\n Scene scene = new Scene(page);\r\n scene.getStylesheets().add(getClass().getResource(STYLESHEET_DEFAULT).toExternalForm());\r\n\r\n stage.setScene(scene);\r\n\r\n // Set the item into the controller.\r\n UserDefinedInputCreateDialogController controller = loader.getController();\r\n controller.setStage(stage);\r\n\r\n stage.showAndWait();\r\n }", "public void AboutDialog() {\r\n final Dialog dialog = new Dialog(this); // Context, this, etc.\r\n dialog.setContentView(R.layout.about_dialog);\r\n dialog.setTitle(R.string.dialog_title);\r\n\r\n Button dialogButton = (Button) dialog.findViewById(R.id.dialog_cancel);\r\n // if button is clicked, close the custom dialog\r\n dialogButton.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n dialog.dismiss();\r\n }\r\n });\r\n\r\n\r\n dialog.show();\r\n }", "public void addRelationshipDialog() { new RelationshipDialog(); }", "public ReorganizeDialog() { }", "private Dialog recreateDialog() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(OptionActivity.this);\n builder.setMessage(\"Do you want to change your profile?\")\n .setPositiveButton(\"Yah!\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent intent = new Intent(OptionActivity.this, amountscreen.class);\n startActivity(intent);\n }\n })\n .setNegativeButton(\"Nope\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void setUpDialoguebox() {\n\t\tinput = new CTS_GUI_Dialoguebox();\n\t\tinput.setTitle(\"Settings\");\n\t\tBorderPane pane = new BorderPane();\n\t\tLocalTime t = LocalTime.now();\n\t\tLocalDate d = LocalDate.now();\n\t\tuicontrols = new VBox(10);\n\t\tHBox box0 = new HBox(5);\n\t\tbox0.getChildren().addAll(new Label(\"Latitude: \"),new TextField(\"0\"));\n\t\tHBox box1 = new HBox(5);\n\t\tbox1.getChildren().addAll(new Label(\"Longitude: \"),new TextField(\"0\"));\n\t\tHBox box2 = new HBox(5);\n\t\tbox2.getChildren().addAll(new Label(\"Date: \"),new TextField(d.toString()));\n\t\tTextField time = new TextField(t.getHour() + \":\" + t.getMinute() + \":\" + (int) floor(t.getSecond()));\n\t\tHBox box3 = new HBox(5);\n\t\tbox3.getChildren().addAll(new Label(\"Time: \"),time);\n\t\t// Check boxes\n\t\tHBox box5 = new HBox(5);\n\t\tCheckBox c1 = new CheckBox(\"Plot Stars\");\n\t\tc1.setSelected(true);\n\t\tCheckBox c2 = new CheckBox(\"Plot DSOs\");\n\t\tc2.setSelected(true);\n\t\tCheckBox c3 = new CheckBox(\"Plot Constellations\");\n\t\tc3.setSelected(true);\n\t\tCheckBox c4 = new CheckBox(\"Plot Planets\");\n\t\tc4.setSelected(true);\n\t\tbox5.getChildren().addAll(c1,c2,c3,c4);\n\t\t// Color Picker\n\t\t// 0 = Star color, 1 = Low mag star, 2 = Very low mag star.\n\t\t// 3 = DSO, 4 = Sky background, 5 = Circle around sky background\n\t\t// 6 = Overall background, 7 = Lat/long txt color, 8 = Constellation line color.\n\t\tHBox box6 = new HBox(5);\n\t\tTextField colorSet = new TextField(\"255,255,255,1\");\n\t\tButton setcolorbutton = new Button(\"Submit Color\");\n\t\tbox6.getChildren().addAll(new Label(\"Color to Set: \"),colorSet,setcolorbutton,new Label(\"[PREVIEW COLOR]\"));\n\t\tsetcolorbutton.setOnAction((event) -> { colorPickerHander(); });\n MenuBar mainmenu = new MenuBar();\n Menu colorpickermenu = new Menu(\"Set Custom Colors\");\n String[] colorstrs = {\"Star Color\",\"Low Magnituide Star Color\",\"Very Low Magnituide Star Color\", \"Deep Space Object Color\",\"Sky Background Color\",\n \t\t\"Circle Around Sky Background Color\",\"Overall Background Color\", \"Latitude/Longitude Text Color\",\"Constellation Line Color\"};\n for(int x = 0; x < colorstrs.length; x++) {\n \tMenuItem opt = new MenuItem(colorstrs[x]);\n \tint id = x;\n \topt.setOnAction((event) -> { colorSetterId = id; });\n \tcolorpickermenu.getItems().add(opt);\n }\n \n ComboBox<String> consts = new ComboBox<>();\n HashMap<String, String> cdbs = controller.getModelConstellationDBs();\n\n for (String name : cdbs.keySet()) {\n consts.getItems().add(name);\n }\n HBox box7 = new HBox(5);\n box7.getChildren().addAll(new Label(\"Select Constellation Set\"), consts);\n \n consts.getSelectionModel().select(\"Western\");\n mainmenu.getMenus().addAll(colorpickermenu);\n\t\tHBox box4 = new HBox(5);\n\t\tButton but = new Button(\"Cancel\");\n\t\tbut.setPadding(new Insets(5));\n\t\tButton but2 = new Button(\"Submit\");\n\t\tbut2.setPadding(new Insets(5));\n\t\tbox4.getChildren().addAll(but,but2);\n\t\tuicontrols.getChildren().addAll(box0,box1,box2,box3,box5,box6,box7,box4);\n\t\tbut.setOnAction((event) -> { input.close(); });\n\t\tbut2.setOnAction((event) -> {\n\t\t\tuserSelectedConstellationFileName = cdbs.get(consts.getValue());\n\t\t\tlong i = validateInput();\n\t\t\tif (i == 0) {\n\t\t\t\tchartTheStars();\n\t\t\t\tinput.close();\n\t\t\t} else {\n\t\t\t\tGUIerrorout = new Alert(AlertType.ERROR, getGUIErrorMsg(i));\n\t\t\t\tGUIerrorout.showAndWait();\n\t\t\t}\n });\n\t\tpane.setTop(mainmenu);\n\t\tpane.setCenter(uicontrols);\n\t\tpane.setPadding(new Insets(10));\n\t\tScene scene = new Scene(pane, 520, 310);\n\t\tinput.setScene(scene);\n\t}", "private void startMealToDatabaseAlert() {\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);\n TextView dialogTitle = new TextView(this);\n int blackValue = Color.parseColor(\"#000000\");\n dialogTitle.setText(R.string.title_dialog_meal);\n dialogTitle.setGravity(Gravity.CENTER_HORIZONTAL);\n dialogTitle.setPadding(0, 30, 0, 0);\n dialogTitle.setTextSize(25);\n dialogTitle.setTextColor(blackValue);\n dialogBuilder.setCustomTitle(dialogTitle);\n View dialogView = getLayoutInflater().inflate(R.layout.dialog_add_meal, null);\n\n this.startEditTexts(dialogView);\n this.startLocationSpinner(dialogView);\n this.startAddPhotoButton(dialogView);\n this.startMealDialogButtonListeners(dialogBuilder);\n\n dialogBuilder.setView(dialogView);\n AlertDialog permission_dialog = dialogBuilder.create();\n permission_dialog.show();\n }", "private void showInputDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"App info\");\n builder.setMessage(message);\n builder.setPositiveButton(\" Done \", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n builder.show();\n }", "@Override\n protected Dialog onCreateDialog(int id) {\n Dialog dialog = null;\n String title;\n String message;\n String value;\n \n Units units = new Units(Settings.KEY_UNITS);\n \t\n \tswitch (id) {\n \tcase DIALOG_CONFIRM_ODOMETER_LOW_ID:\n \t\ttitle = getString(R.string.title_confirm_odometer);\n \t\tmessage = getString(R.string.message_confirm_odometer);\n \t\tvalue = Integer.toString(current_odometer);\n \t\tmessage = String.format(message,value);\n \tdialog = ConfirmationDialog.create(this,this,id,title,message);\n \tbreak;\n \t\n \tcase DIALOG_CONFIRM_GALLONS_HIGH_ID:\n \t\ttitle = getString(R.string.title_confirm_gallons);\n \t\ttitle = String.format(title,units.getLiquidVolumeLabel());\n \t\tmessage = getString(R.string.message_confirm_gallons);\n \t\tvalue = String.format(App.getLocale(),\"%.1f %s\", \n \t\t\t\ttank_size, units.getLiquidVolumeLabelLowerCase());\n \t\tmessage = String.format(message,value);\n \tdialog = ConfirmationDialog.create(this,this,id,title,message);\n \tbreak;\n \t\n \t}\n \treturn dialog;\n }", "public void showDialog() {\n mDialogInfoWithTwoButtons = new DialogInfoWithTwoButtons(mContext,\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n saveTemplate(mToastEdited);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mTemplateId = mDatabaseManager.getTemplateNewId();\n mPreferenceManager.setTemplateId(mTemplateId);\n saveTemplate(mToastCreated);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, mTitle, mMessage, mTitleButtonOne, mTitleButtonTwo);\n mDialogInfoWithTwoButtons.getDialog().show();\n }", "protected Dialog onCreateDialog(int id) {\r\n switch(id) {\r\n case PROGRESS_DIALOG:\r\n progressDialog = new ProgressDialog(Suggestions.this);\r\n progressDialog.setMessage(\"Loading. Please wait.\");\r\n progressThread = new ProgressThread(handler);\r\n progressThread.start();\r\n return progressDialog;\r\n default:\r\n return null;\r\n }\r\n }", "@Override\r\n\tprotected Dialog onCreateDialog(int id) {\r\n\t\tProgressDialog dialog = new ProgressDialog(this);\r\n\t\tdialog.setMessage(\"Please wait while saving...\");\r\n\t\tdialog.setIndeterminate(true);\r\n\t\tdialog.setCancelable(true);\r\n\t\treturn dialog;\r\n\t}", "private void showMsgBox(Context context, String msgTitle, String msgContent, boolean flag){\n final Dialog dialog = new Dialog(context);\n //tell the Dialog to use the dialog.xml as it's layout description\n dialog.setContentView(R.layout.custom_dialog);\n //dialog.setTitle(msgContent);\n TextView title = (TextView) dialog.findViewById(R.id.dlgTitle);\n TextView content = (TextView) dialog.findViewById(R.id.dlgContent);\n title.setText(msgTitle);\n content.setText(msgContent);\n if (!flag){\n LinearLayout linearLayout = (LinearLayout)dialog.findViewById(R.id.type1);\n linearLayout.removeAllViews();\n }else{\n LinearLayout linearLayout = (LinearLayout)dialog.findViewById(R.id.type2);\n linearLayout.removeAllViews();\n }\n Button dlgCancel = (Button) dialog.findViewById(R.id.dlgCancel);\n dlgCancel.setText(\"Okay\");\n dlgCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.dismiss();\n }\n });\n dialog.show();\n }", "@Override\n\t\tpublic final Dialog onCreateDialog(final Bundle savedInstanceState) {\n\t\t\tint title = getArguments().getInt(\"title\");\n\n\t\t\treturn new AlertDialog.Builder(getActivity())\n\t\t\t\t\t.setIcon(R.drawable.alert_dialog_icon)\n\t\t\t\t\t.setTitle(title)\n\t\t\t\t\t.setPositiveButton(R.string.alert_dialog_ok,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\tfinal DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tfinal int whichButton) {\n\t\t\t\t\t\t\t\t\t((AddingActivity) getActivity())\n\t\t\t\t\t\t\t\t\t\t\t.doPositiveClick();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t.setNegativeButton(R.string.alert_dialog_cancel,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\tfinal DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tfinal int whichButton) {\n\t\t\t\t\t\t\t\t\t((AddingActivity) getActivity())\n\t\t\t\t\t\t\t\t\t\t\t.doNegativeClick();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}).create();\n\t\t}", "public Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\t\tView dialogView = inflater.inflate(R.layout.posted, null);\r\n\r\n\t\tbuilder.setTitle(\"Posted Message to:\");\r\n\t\tbuilder.setView(dialogView);\r\n\t\tfinal AlertDialog dialog = builder.show();\r\n\t\t//dialog.getWindow().setLayout(520, 525);\r\n\t\t\r\n\t\tTextView message = (TextView) dialog.findViewById(R.id.sites_posted);\r\n\t\tmessage.setText(sites);\r\n\r\n\t\tButton done = (Button) dialog.findViewById(R.id.done);\r\n\t\tdone.setOnClickListener(new OnClickListener(){\r\n\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO open social media options\r\n\t\t\t\tdialog.cancel();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\treturn dialog;\r\n\t}", "private static AlertDialog createDialog(\n Context context, MenuDialogListenerHandler listenerHandler) {\n Resources resources = context.getResources();\n String[] menuDialogItems = resources.getStringArray(R.array.menu_dialog_items);\n String appName = resources.getString(R.string.app_name);\n for (int i = 0; i < menuDialogItems.length; ++i) {\n menuDialogItems[i] = String.format(menuDialogItems[i], appName);\n }\n\n AlertDialog dialog = new AlertDialog.Builder(context)\n .setTitle(R.string.menu_dialog_title)\n .setAdapter(new MenuDialogAdapter(context, menuDialogItems), listenerHandler)\n .create();\n dialog.setOnDismissListener(listenerHandler);\n return dialog;\n }", "public Dialog(String text) {\n initComponents( text);\n }" ]
[ "0.7419603", "0.7412471", "0.7307323", "0.72942585", "0.72109926", "0.7204741", "0.7157919", "0.7144742", "0.7136977", "0.713174", "0.7072543", "0.7071794", "0.70505637", "0.7002181", "0.6911259", "0.6893067", "0.68829215", "0.6873896", "0.6867495", "0.6867252", "0.6863194", "0.6862666", "0.6852751", "0.68392205", "0.68377286", "0.6806911", "0.67843705", "0.6710685", "0.6698492", "0.66910225", "0.6681437", "0.66593057", "0.66584486", "0.6652136", "0.6644376", "0.6639487", "0.66375417", "0.6634059", "0.6627364", "0.66171324", "0.66160244", "0.6612439", "0.6606849", "0.6604782", "0.6580609", "0.65773356", "0.65771943", "0.6571649", "0.657042", "0.65664774", "0.654944", "0.65307814", "0.6526324", "0.6522524", "0.6464764", "0.6464677", "0.6461035", "0.64579827", "0.6443961", "0.6434786", "0.64303654", "0.64287305", "0.6421907", "0.6419144", "0.6415719", "0.6415633", "0.6408358", "0.640559", "0.64049816", "0.6399556", "0.63984984", "0.63981265", "0.63968277", "0.63913745", "0.6388953", "0.63805825", "0.6379398", "0.6376465", "0.6373614", "0.63683206", "0.63682055", "0.63584435", "0.63545656", "0.63441384", "0.6335556", "0.6334007", "0.6324917", "0.6323932", "0.6318738", "0.6317912", "0.6315774", "0.63048893", "0.6302983", "0.6302923", "0.6299358", "0.6295991", "0.6292504", "0.6284016", "0.6282154", "0.62819284" ]
0.71767116
6
paintComponent The underlying parameter has changed
public void refresh() { this.repaint(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void paintComponent(Graphics g);", "public void draw(){\n\t\tcomponent.draw();\r\n\t}", "@Override\r\n public void repaint() {\r\n }", "@Override\n\tpublic void update(Observable o, Object arg) {\n\t\tthis.repaint(); // Schedule a call to paintComponent\n\t}", "void paintComponent(Graphics g);", "@Override\n public void paintComponent(Graphics g) \n {\n super.paintComponent(g);\n doDrawing(g);\n }", "@Override\r\n\tprotected void paintComponent(Graphics g) \r\n\t{\n\t\tsuper.paintComponent(g);\r\n\t\t\r\n\t\t// passes Graphics g into flappy\r\n\t\tflappy.flappybox.repaint(g); /// passes Graphics g into flappy\r\n\t}", "protected void paintComponent(Graphics g)\n\t{\n\t}", "public void update(Graphics param1Graphics) {\n/* 252 */ paint(param1Graphics);\n/* */ }", "@Override\r\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t\r\n\t\r\n\t}", "void paintComponent();", "@Override\r\n public void repaint(Object canvas) {\r\n {\r\n }\r\n\t}", "@Override\r\n\tpublic void paint(float deltaTime) {\n\t\t\r\n\t}", "public void paintComponent(Graphics g)\r\n\t{\n\t}", "@Override\r\n\tpublic void repaint() {\n\t\tsuper.repaint();\r\n\t}", "@Override\r\n\tpublic void repaint() {\n\t\tsuper.repaint();\r\n\t}", "@Override\n public void paint(Graphics g) {\n }", "public void draw(){\n super.repaint();\n }", "@Override\n\tpublic void repaint() {\n\t\tsuper.repaint();\n\t}", "@Override\n public void paintComponent() {\n Graphics2D graphics = gameInstance.getGameGraphics();\n graphics.setColor(Color.ORANGE);\n\n final int diff = (PacmanGame.GRID_SIZE/2) - pointCircleRadius;\n graphics.fill(new Ellipse2D.Double(this.x + diff, this.y + diff, pointCircleRadius*2, pointCircleRadius*2));\n }", "@Override\r\n\tpublic void update() {\n\t\tthis.repaint();\r\n\t}", "@Override\n public void paintComponent(final Graphics theGraphics) {\n super.paintComponent(theGraphics);\n \n this.myLineCleared.setText(\"Cleared Lines : \" + Integer.toString(this.myClearedLines));\n this.myScoreLabel.\n setText(\"Current Score : \" + Integer.toString(this.myCurrentScoreInt));\n this.myHighScoreLabel.\n setText(\"High Score: \" + Integer.toString(this.myHighScoreInt));\n this.myCurrentLevel.\n setText(\"Current Level : \" + Integer.toString(this.myLevel));\n this.myNextLevelDistance.\n setText(\"Lines To Go : \" + Integer.toString(this.myLinesToGo));\n this.myNextPiece.repaint();\n }", "@Override \n\tpublic void update(Graphics g) \n\t{\n\t\tpaint(g); \n\t}", "@Override //paint component is overridden to allow super.paintCompnent to be called\r\n public void paintComponent(Graphics g) {\n \tsuper.paintComponent(g); //The super.paintComponent() method calls the method of the parent class, prepare a component for drawing\r\n doDrawing(g); //The drawing is delegated inside the doDrawing() method\r\n }", "public void repaint() {}", "public void update(Graphics g, JComponent c)\n/* */ {\n/* 304 */ super.update(g, c);\n/* */ }", "@Override\n public void update(Graphics g) {\n paint(g);\n }", "public void draw() {\n\t\tsuper.repaint();\n\t}", "public void repaint() {\n\t\n}", "public void paintComponent(Graphics myGraphic) \n\t{\n\t\tsuper.paintComponent(myGraphic);\t\n\t}", "public void paintComponent(Graphics arg0) {\n\t\tsuper.paintComponent(arg0);\n\t\targ0.setColor(Color.BLACK); \n\t\tboard(arg0); \n\t\tdrawStone(arg0);\n\t}", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "@Override\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tGraphics2D g2 = (Graphics2D) g; \n\t\tg2.setColor(Color.lightGray);\n\t\tg2.fill(model.bg);\n\t\tg2.setColor(Color.darkGray);\n\t\tg2.fillPolygon(model.terrain);\n\t\tg2.setColor(Color.gray);\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\tg2.draw(model.circles.get(i));\n\t\t}\n\t\tif (model.curCircleSel != -1) {\n\t\t\tg2.setColor(Color.white);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.draw(model.circles.get(model.curCircleSel));\n\t\t}\n\t\tg2.setColor(Color.RED);\n\t\tg2.fill(model.pad);\n\t\tif (curPadSel) {\n\t\t\tg2.setColor(Color.white);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.draw(model.pad);\n\t\t}\n\t}", "@Override\r\n\tpublic void paint(Graphics g, JComponent c) {\n\t\tsuper.paint(g, c);\r\n\t}", "public void update(Graphics g){\n paint (g);\r\n \r\n }", "public void paint (Graphics g){\n \r\n }", "public void repaint() {\n\n\t}", "public void paint( VisualGraphComponent component, Graphics2D g2d );", "public void paintComponent(Graphics g){\n\n\n\n r.render(g);\n }", "public void paintComponent(Graphics thing)\n {\n int frameHeigth = PiSaver.getFrameHeight();\n int frameWidth = PiSaver.getFrameWidth();\n \n super.paintComponent(thing);\n if (frameHeigth > 0 && frameWidth > 0)\n {\n thing.drawImage(backgroundList.get(g_iBackgroundIndex), 0, 0, this);\n }\n \n thing.setColor(Color.yellow);\n thing.fillPolygon(myPi);\n }", "@Override\n\tpublic void redraw() {\n\t\t\n\t}", "private void drawPanelComponentResized(java.awt.event.ComponentEvent evt) {\n \n ((DrawPanel)drawPanel).updateEllipse();\n }", "public void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tg2 = (Graphics2D) g;\n\t\tdibujar(g);\n\t\tactualizar();\n\t}", "public void paintComponent(Graphics g){\n\t\tsuper.paintComponent(g);\n\t\tdisp.notifyAll(g);\n\t}", "@Override \r\n public void paintComponent(final Graphics theGraphics) { \r\n super.paintComponent(theGraphics); \r\n final Graphics2D g2d = (Graphics2D) theGraphics; \r\n \r\n final int width = myBoard.getWidth(); \r\n final int height = myBoard.getHeight(); \r\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \r\n RenderingHints.VALUE_ANTIALIAS_ON); \r\n \r\n // draw purple game grid\r\n g2d.setColor(PURPLE); \r\n for (int i = 0; i < Math.max(width, height); i++) { \r\n final int lines = i * GRID_SIZING; \r\n \r\n //draws horizontal lines\r\n g2d.draw(new Line2D.Double(lines, ZERO, lines, height * GRID_SIZING));\r\n \r\n //draws vertical lines\r\n g2d.draw(new Line2D.Double(ZERO, lines, width * GRID_SIZING, lines));\r\n \r\n if (myBoard.isGameOver()) { \r\n myGameOver = true; \r\n myGamePaused = true; \r\n }\r\n } \r\n \r\n //update blocks\r\n drawCurrentPiece(g2d, height, width);\r\n drawFrozenBlocks(g2d, height, width);\r\n handlePausedGame(g2d);\r\n }", "@Override\n\t\tprotected void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tGraphics2D ga = (Graphics2D) g; \n\t\t\tif (currentColor == color) {\n\t\t\t\tShape check = factory.getShape(ShapeFactory.CHECK);\n\t\t\t\tcheck.setPosition(new Point2D.Double(point.getX() + getPreferredSize().width/2 - 7, point.getY()+ 25));\n\t\t\t\tga.setColor(currentColor);\n\t\t\t\tcheck.draw(ga);\n\t\t\t}\n\t\t}", "@Override\n public void onPaint(Graphics2D g) {\n\n }", "@Override\r\n\tpublic void update(Graphics g) {\r\n\t\t// S*ystem.out.println(\"Graph.update\");\r\n\t\t// paint(g);\r\n\t\t// super.update(g);\r\n\t}", "public void paintComponent(Graphics g)\r\n\t\t{\t\t\t\r\n\t\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t}", "public void paintComponent(Graphics g)\r\n\t\t{\t\t\t\r\n\t\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t}", "@Override\r\n\tpublic void update(Observable o, Object arg) {\r\n\t\t// Not exactly how MVC works, but similar.\r\n\t\tthis.repaint(); // Schedule a call to paintComponent\r\n\t}", "public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n draw(g);\n }", "@Override\r\n\tpublic void update(Observable arg0, Object arg1) {\n\t\trepaint();\r\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n render(g);\n }", "@Override\r\n\t\tpublic void update(Rectangle2D r) {\r\n\t\t\t\r\n\t\t\tmakeDirty(r, false);\r\n\t\t\tif (_clipping != null) \r\n\t\t\t\trepaint(_clipping.getTransform().createTransformedShape(r).getBounds());\r\n\t\t}", "public void propertyChange(PropertyChangeEvent evt)\n/* */ {\n/* 76 */ CompoundPainter<?> painter = (CompoundPainter)this.ref.get();\n/* */ \n/* 78 */ if (painter == null) {\n/* 79 */ AbstractPainter<?> src = (AbstractPainter)evt.getSource();\n/* 80 */ src.removePropertyChangeListener(this);\n/* */ } else {\n/* 82 */ String property = evt.getPropertyName();\n/* */ \n/* 84 */ if ((\"dirty\".equals(property)) && (evt.getNewValue() == Boolean.FALSE)) {\n/* 85 */ return;\n/* */ }\n/* */ \n/* 88 */ painter.setDirty(true);\n/* */ }\n/* */ }", "protected void paintComponent(Graphics g) {\r\n super.paintComponent(g);\r\n g.drawImage(i, 0, 0, null); // see javadoc for more info on the parameters \r\n }", "public void update(Graphics g) {\n // Note: Since the paint method is going to draw an\n // image that covers the complete area of the component we\n // do not fill the component with its background color\n // here. This avoids flickering.\n paint(g);\n }", "@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.setColor(new Color(255, 0, 0));\r\n\t\tg.drawOval(mp1.getX(), mp1.getY(), 3*length, 3*length);\r\n\t\tg.setColor(new Color(0,0,255));\r\n\t\tg.drawOval(enenmy.getX(), enenmy.getY(), 3, 3);\r\n\t}", "public void repaint();", "@Override\r\n public void actionPerformed(ActionEvent e) {\n progress_stack = progress_stack_bkup;\r\n\r\n rec_points = rec_points_bkup;\r\n rec_colors = rec_colors_bkup;\r\n\r\n squ_points = squ_points_bkup;\r\n squ_colors = squ_colors_bkup;\r\n\r\n ell_points = ell_points_bkup;\r\n ell_colors = ell_colors_bkup;\r\n\r\n cir_points = cir_points_bkup;\r\n cir_colors = cir_colors_bkup;\r\n\r\n str_points = str_points_bkup;\r\n str_colors = str_colors_bkup;\r\n\r\n poly_points = poly_points_bkup;\r\n poly_colors = poly_colors_bkup;\r\n\r\n handdraw_points = handdraw_points_bkup;\r\n handdraw_colors = handdraw_colors_bkup;\r\n\r\n\r\n if(rec_colors.size()>0){\r\n repaint_shapes(\"rec\", rec_colors, rec_points);\r\n }\r\n\r\n //repaint circle\r\n if(cir_colors.size()>0){\r\n repaint_shapes(\"cir\", cir_colors, cir_points);\r\n }\r\n\r\n //repaint square\r\n if(squ_colors.size()>0){\r\n repaint_shapes(\"squ\", squ_colors, squ_points);\r\n }\r\n\r\n //repaint ellipse\r\n if(ell_colors.size()>0){\r\n repaint_shapes(\"ell\", ell_colors, ell_points);\r\n }\r\n\r\n //repaint straight line\r\n if(str_colors.size()>0){\r\n repaint_shapes(\"str\", str_colors, str_points);\r\n }\r\n\r\n //repaint polygons\r\n if(poly_colors.size()>0){\r\n //polygon repaint\r\n ArrayList<Integer> separate_index = get_separate_index(poly_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n\r\n //other shapes\r\n for (int j = 0; j < separate_index.size()-1; j++) {\r\n Color polygon_color = poly_colors.get(j);\r\n //each shape repaint\r\n int begin_index = separate_index.get(j);\r\n int end_index = separate_index.get(j+1);\r\n\r\n //get polygon points arraylist\r\n for (int k = (begin_index+1); k < end_index; k++) {\r\n points.add(poly_points.get(k));\r\n\r\n }\r\n System.out.println(points);\r\n\r\n //repaint one polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int k = 0; k < line_num; k++) {\r\n int begin_point = k*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(polygon_color);\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n }\r\n points.clear();\r\n }\r\n\r\n //the last polygon\r\n //get last shape points arraylist\r\n int index = separate_index.get(separate_index.size()-1);\r\n for (int j = index+1; j < poly_points.size(); j++) {\r\n points.add(poly_points.get(j));\r\n }\r\n System.out.println(points);\r\n //using points to repaint polygon\r\n int line_num = points.size()/2 - 1 ;\r\n for (int j = 0; j < line_num; j++) {\r\n int begin_point = j*2;\r\n x1 = points.get(begin_point);\r\n y1 = points.get(begin_point + 1);\r\n x2 = points.get(begin_point + 2);\r\n y2 = points.get(begin_point + 3);\r\n\r\n g.setColor(poly_colors.get(poly_colors.size()-1));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n }\r\n\r\n //repaint freehand lines\r\n if(handdraw_colors.size()>0){\r\n //repaint all handdraw\r\n ArrayList<Integer> separate_index = get_separate_index(handdraw_points);\r\n ArrayList<Integer> points = new ArrayList<Integer>();\r\n for (int i = 0; i < handdraw_colors.size(); i++) {\r\n //each handdraw\r\n //take all points in one draw\r\n if(i == 0){\r\n //first draw\r\n int begin_index = 0;\r\n int end_index = separate_index.get(i);\r\n //get all points in first drawing\r\n for (int j = begin_index; j < end_index; j++) {\r\n points.add(handdraw_points.get(j));\r\n }\r\n //repaint first drawing\r\n System.out.println(points);\r\n\r\n int line_num = points.size()/2 - 1;\r\n for (int j = 0; j < line_num; j++) {\r\n //draw each short line\r\n begin_index = j*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n points.clear();\r\n\r\n }else{\r\n //draw other handdraws\r\n for (int j = 0; j < handdraw_colors.size()-1; j++) {\r\n //draw each drawing\r\n\r\n int begin_index = separate_index.get(j)+1;\r\n int end_index = separate_index.get(j+1);\r\n //get all points in one drawing\r\n for (int k = begin_index; k < end_index; k++) {\r\n points.add(handdraw_points.get(k));\r\n }\r\n System.out.println(points);\r\n\r\n //repaint drawing\r\n int line_num = points.size()/2 - 1;\r\n for (int k = 0; k < line_num; k++) {\r\n //each line\r\n begin_index = k*2;\r\n\r\n x1 = points.get(begin_index);\r\n y1 = points.get(begin_index + 1);\r\n x2 = points.get(begin_index + 2);\r\n y2 = points.get(begin_index + 3);\r\n\r\n g.setColor(handdraw_colors.get(i));\r\n g.drawLine(x1, y1, x2, y2);\r\n\r\n canvas.repaint();\r\n\r\n }\r\n\r\n points.clear();\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n }", "@Override\n\tpublic void draw(Graphics canvas) {}", "@Override\r\n public void repaint(final Rectangle r) {\r\n }", "public void paintComponent(Graphics g){ \r\n Graphics2D g2 = (Graphics2D)g;\r\n \r\n if(rev == true){\r\n int[] xCord = new int[]{x, x-25, x-50, x-100, x-50, x-25, x};\r\n int[] yCord = new int[]{y, y+25, y+10, y+45, y+65, y+50, y+75};\r\n setColor(g2);\r\n g2.drawPolygon(xCord, yCord, xCord.length);\r\n g2.fillPolygon(xCord, yCord, xCord.length); \r\n \r\n \r\n }\r\n else{\r\n int[] xCord = new int[]{x, x+25, x+50, x+100, x+50, x+25, x};\r\n int[] yCord = new int[]{y, y+25, y+10, y+45, y+65, y+50, y+75};\r\n setColor(g2);\r\n g2.drawPolygon(xCord, yCord, xCord.length);\r\n g2.fillPolygon(xCord, yCord, xCord.length); \r\n } \r\n }", "public void paint (Graphics g)\r\n {\n }", "@Override\n public void paintComponent(final Graphics theGraphics) {\n super.paintComponent(theGraphics);\n final Graphics2D g2d = (Graphics2D) theGraphics; \n g2d.setPaint(PowerPaintMenus.getDrawColor());\n g2d.setStroke(new BasicStroke(PowerPaintMenus.getThickness()));\n if (!myFinishedDrawings.isEmpty()) {\n for (final Drawings drawing : myFinishedDrawings) {\n g2d.setColor(drawing.getColor());\n g2d.setStroke(drawing.getStroke());\n if (PowerPaintMenus.isFilled()) {\n g2d.fill(drawing.getShape());\n } else {\n g2d.draw(drawing.getShape()); \n }\n }\n }\n if (myHasShape) {\n g2d.draw(myCurrentShape);\n }\n }", "private void repaint() {\n\t\tclear();\n\t\tfor (PR1Model.Shape c : m.drawDataProperty()) {\n\t\t\tif(!c.getText().equals(defaultshape))\n\t\t\t\tdrawShape(c, false);\n\t\t}\n\t\tif (getSelection() != null) {\n\t\t\tdrawShape(getSelection(), true);\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) \r\n\t\t\t{\n\t\t\t\tpaintComponent(getGraphics(), player);\r\n\t\t\t}", "public abstract void paint(Graphics g);", "public void paint(Graphics g) {\n }", "public void paint(Graphics g) {\n }", "public void repaint(Rectangle r) {}", "public void paintComponent(Graphics g)\n {\n int xRange = Integer.parseInt(xLabel);\n \n // Udhezimi per kthimin e vleres se variablave x1-6 ne proporcion me gjatsine e boshtit x te shprehur ne pixela\n int propX1 = ((x1*axisLength)/xRange)+xPos;\n int propX2 = ((x2*axisLength)/xRange)+xPos;\n int propX3 = ((x3*axisLength)/xRange)+xPos;\n int propX4 = ((x4*axisLength)/xRange)+xPos;\n int propX5 = ((x5*axisLength)/xRange)+xPos;\n int propX6 = ((x6*axisLength)/xRange)+xPos;\n \n g.setColor(Color.white);\n g.fillRect(0,0,width,height);\n g.setColor(Color.black);\n \n // Boshti x dhe y me gjatesi prej axisLength\n g.drawLine(xPos+2, yPos, xPos+axisLength, yPos);\n g.drawLine(xPos, yPos, xPos, yPos-axisLength);\n \n // Paraqitja e pikes max te boshtit x(xLabel) dhe boshtit y(yLabel)\n g.drawString(xLabel, xPos+axisLength, yPos+20);\n g.drawString(yLabel, xPos-20, yPos-axisLength);\n g.drawString(\"0\", xPos+5,yPos+20);\n g.drawString(\"0\", xPos-15,yPos-5);\n \n // Udhezimi per paraqitjen grafike te pikave ne panel\n g.fillOval(propX1,propY1-3,4,4);\n g.fillOval(propX2,propY2-3,4,4);\n g.fillOval(propX3,propY3-3,4,4);\n g.fillOval(propX4,propY4-3,4,4);\n g.fillOval(propX5,propY5-3,4,4);\n g.fillOval(propX6,propY6-3,4,4);\n \n // Udhezimi per paraqitjen e drejtezave te cilat lidhin pikat x1-5\n g.drawLine(propX1, propY1, propX2 ,propY2);\n g.drawLine(propX2, propY2, propX3, propY3);\n g.drawLine(propX3, propY3, propX4, propY4);\n g.drawLine(propX4, propY4, propX5, propY5);\n g.drawLine(propX5, propY5, propX6, propY6);\n }", "protected void paintComponent(Graphics g){\n g.drawOval(110,110,50,50);\n }", "public void update(Graphics g){\n paint(g);\n }", "@Override\n public void redraw() {\n firePropertyChange(AVKey.LAYER, null, this);\n }", "public void paint(Graphics g) {\n\tupdate(g);\n }", "@Override\r\n\t\tpublic void paint(Graphics g) {\n\t\t\tsuper.paint(g);\r\n\t\t}", "@Override\n\tpublic void paintComponent(Graphics g){\n\t\tsuper.paintComponent(g);\n\t\tg.setColor(indicateColor);\n\t\tg.fillOval(0, 0, checkerSize, checkerSize);\t\n\t\t\n\t}", "protected void paintComponent(Graphics g) {\n \t\n \tif(refreshRate != 0)//if FPS is set to 0, this will simulate a 'frozen' state\n \tt.setDelay(1000 / refreshRate);//creates desired FPS\n \t//if-else statement used for incrementing and resetting repaintCount, and used for calculating the FPS which is displaye dby fpsPanel.java\n \tif (repaintCount++ > 0) {\n long curTime = System.currentTimeMillis();\n long elapseTime = curTime - startTime;\n rate = ((double)(repaintCount - 1)) / (elapseTime / 1000.0);\n } else {\n startTime = System.currentTimeMillis();\n }\n super.paintComponent(g);\n g.setColor(backColor);//backcolor controls the color of the background\n g.fillRect(0, 0, getWidth(), getHeight());\n g.setColor(objectColor);//objectColor controls the color of the shape\n if(oval)\n \tg.drawArc(x, y, width, height, 0, 360);\n if (rect)\n \tg.drawRect(x, y, width, height);\n if (rectround){\n RoundRectangle2D roundedRectangle = new RoundRectangle2D.Float(x, y, width, height,5,5);\n ((Graphics2D) g).draw(roundedRectangle); \n }\n g.setColor(textColor);//textColor controls the color of the text\n g.setFont(f);\n if (small)\n \tg.drawString(\"(\"+x+\",\"+y+\")\",x-15,y+13);//positioned properly for all small sizes\n if(medium)\n \tg.drawString(\"(\"+x+\",\"+y+\")\",x+1,y+16);//coordinates position properaly for all medium sizes\n if(large)\n \tg.drawString(\"(\"+x+\",\"+y+\")\",x+50,y+25);//coordinates position properly for all large sizes\n \t\n }", "@Override\n\t\t\tpublic void paintControl(PaintEvent arg0) {\n\t\t\t\tgc.drawImage(background,0,0);\n\t\t\t}", "@Override\n public void update(Observable o, Object arg) {\n boardView.repaint();\n }", "public void paint(Graphics g){\n\t\t\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n Graphics2D g2d = (Graphics2D) g;\n drawAxis(g2d);\n \n drawCurve(g2d);\n \n drawPoints(g2d);\n \n // drawObject(g2d); **\n // El panel, por defecto no es \"focusable\". \n // Hay que incluir estas líneas para que el panel pueda\n // agregarse como KeyListsener.\n this.setFocusable(true);\n this.requestFocusInWindow();\n }", "public void repaint() {\n if ( clock != null && clock.isPaused() ) {\n super.repaint();\n }\n }", "@Override\n public void propertyChange(PropertyChangeEvent e) {\n this.updateCoords();\n }", "@Override\r\n \tpublic void paintComponent(Graphics g) {\r\n \t\tsuper.paintComponent(g);\r\n \t\tdrawSnake(g);\r\n \t}", "@Override\n\tpublic void paintComponent(java.awt.Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tg.setColor(java.awt.Color.green);\n\t\tg.fillOval(x, y, 50, 50);\n\t\tg.setColor(java.awt.Color.black);\n\t\tg.drawOval(x, y, 50, 50);\n\t}", "@Override\r\n public void paintComponent(Graphics brush)\r\n {\r\n super.paintComponent(brush);\r\n Graphics2D g2 = (Graphics2D) brush;\r\n /*Faster Rendering for mouse interaction*/\r\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\r\n \r\n \r\n if (!wps.getWalls().isEmpty())\r\n {\r\n x = INITIAL_X;\r\n int wallNo = 1;\r\n /*Iterate for all Walls*/\r\n for (Wall wa : wps.getWalls())\r\n {\r\n /*Rectangle counters*/\r\n int rectangles = 0;\r\n for (int bays : wa.getBaysArray())\r\n {\r\n y = INITIAL_Y;\r\n for (int i=0; i<bays;i++)\r\n {\r\n brush.drawRect(x,y, SLEEPER_W, SLEEPER_H);\r\n brush.setFont(f);\r\n //Centering the Name\r\n brush.drawString(\"Wall \"+wallNo, x+28, y+16);\r\n y = y - SLEEPER_H;\r\n }\r\n \r\n /*Painting rectangles to simulate at entire bay*/\r\n if(wps.getWalls().get(wallNo-1).getArrayRect().size() != wps.getWalls().get(wallNo-1).getBaysArray().size())\r\n {\r\n wps.getWalls().get(wallNo-1).getArrayRect().add(new Rectangle(x,y+SLEEPER_H, SLEEPER_W, (SLEEPER_H*bays)));\r\n }\r\n g2.draw(wps.getWalls().get(wallNo-1).getArrayRect().get(rectangles));\r\n rectangles++;\r\n x = x + SLEEPER_W;\r\n \r\n }\r\n wallNo++;\r\n }\r\n }\r\n \r\n if (x> 830)\r\n {\r\n this.setPreferredSize(new Dimension(x+20,560));\r\n this.revalidate();\r\n }\r\n }", "public void paintComponent(Graphics page)\n {\n super.paintComponent(page);\n\n //set color, then draw a rectangle\n page.setColor(currentColor);\n\n page.drawRect(x1, y1, currentWidth, currentHeight);\n }", "@Override\r\n\tpublic void paintComponent(Graphics g)\r\n\t{\r\n\t\t// Get the width and height of the component window\r\n\t\twidth = getWidth();\r\n\t\theight = getHeight();\t\t\t\t\r\n\t\t\r\n\t\tGraphics2D g2 = (Graphics2D) g;\r\n\t\tgenerateCircles();\r\n\t\tdrawCircles(g2);\r\n\t}", "public void repaint(ColorMixerModel.ColorItem c){\n cmUI.repaint(c.getBound());\n }", "@Override\n\tpublic void paintComponent(Graphics g){\n\t\tsuper.paintComponent(g);\n\t\tanimateFace((int)circle.x, (int)circle.y, (int)circle2.x, (int)circle2.y);\n\t\tdrawFace(g);\n\t}", "@Override\r\n\tpublic void paintComponent(Graphics g)\r\n {\r\n\t\tsuper.paintComponent(g);\r\n\t\tg.setColor(getForeground());\r\n\t\tg.fillOval(0,0, this.getWidth(),this.getHeight());\r\n }", "@Override\n public void repaint() {\n this.jLabel2.setText(Float.toString(this.c.getVd()));\n this.jLabel4.setText(df.format(this.c.getUu()));\n this.jLabel6.setText(this.c.getSmax());\n this.jLabel8.setText(Float.toString(this.c.getAs()));\n this.jLabel10.setText(df.format(this.c.getVc()));\n this.jLabel11.setText(this.c.getSecc());\n this.jLabel12.setText(this.c.getE());\n this.jLabel13.setText(df.format(this.c.getEval()));\n }", "@Override\n protected void applyChangesTo(Component component) {\n component.revalidate();\n component.repaint();\n }", "public void paintComponent(Graphics g){\n\t\tg.drawImage(bf, 0, 0, this);\n\t}", "public void repaint(Graphic graphic, Rectangle2D objectiveArea, Rectangle displayArea) {\n }", "@Override\n\tpublic void update(IObservable observable, Object args) {\n\t\tthis.repaint();\n\t}", "@Override\n\tpublic void paint(Graphics2D g2d, float interpolation) \n\t{\n\t\tthis.paint(g2d);\n\t}", "public void paintComponent(Graphics g) {\n\t\tDate end = new Date();\n\t\tlong points = end.getTime() - start.getTime();\n\t\t\n\t\tsuper.paintComponent(g);\n\t\tthis.setBackground(new Color(164, 242, 245));\n\t\tg.setColor(new Color(54, 140, 22));\n\t\tg.fill3DRect(0, 400, 500, 100, true); //\n\t\tfor (int i = 0; i < elements.length; i++) {\n\t\t\telements[i].draw(g);\n//\t\t\t elements[i].jump();\n\t\t\tif (player.checkCollision(elements[i])){\n\t\t\t\tanimation.stop();\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Izgubio si\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tplayer.draw(g);\n\t\tg.drawString(Long.toString(points), 50, 50);\n\t}" ]
[ "0.6989575", "0.6914383", "0.68881166", "0.6818618", "0.68079025", "0.68012583", "0.67611706", "0.67562443", "0.67430216", "0.67338187", "0.66987014", "0.669261", "0.66907895", "0.663735", "0.6623218", "0.6623218", "0.6578271", "0.65712595", "0.65402687", "0.65315866", "0.65251315", "0.65205336", "0.65175736", "0.6511642", "0.65003943", "0.64852166", "0.6482265", "0.645893", "0.6450872", "0.6415189", "0.6410844", "0.6406946", "0.6368235", "0.63648105", "0.6353066", "0.63370407", "0.63354534", "0.6313672", "0.6305923", "0.6304798", "0.6300676", "0.6297172", "0.6296681", "0.62966585", "0.6290405", "0.6287337", "0.62812674", "0.6273794", "0.62712157", "0.62712157", "0.62602276", "0.62562627", "0.6248837", "0.62459284", "0.62288946", "0.6218365", "0.6202989", "0.62026614", "0.6198901", "0.6192208", "0.6178623", "0.61740243", "0.61642134", "0.61634517", "0.6162126", "0.6157984", "0.6144304", "0.6127171", "0.61251515", "0.61250716", "0.61250716", "0.61202985", "0.61159116", "0.6115223", "0.6110881", "0.6107975", "0.6107698", "0.61051303", "0.6094564", "0.60868204", "0.60856545", "0.60828227", "0.6080253", "0.60748535", "0.6070386", "0.60697067", "0.60605353", "0.6060284", "0.6052644", "0.60507745", "0.6044101", "0.60419106", "0.60414255", "0.6018479", "0.6017201", "0.6015604", "0.6007169", "0.6003595", "0.6000937", "0.6000104", "0.5993921" ]
0.0
-1
Output this graph as XML
public void save(XMLWriter aWriter) throws IOException { aWriter.writeElement("min", fMin); aWriter.writeElement("max", fMax); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String exportXML() {\n\n\t\tXStream xstream = new XStream();\n\t\txstream.setMode(XStream.NO_REFERENCES);\n\n\t\treturn xstream.toXML(this);\n\t}", "public String toXML() {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter, true);\n toXML(printWriter);\n return stringWriter.toString();\n }", "protected String getXML() {\n\n StringBuffer b = new StringBuffer(\"title =\\\"\");\n b.append(title);\n b.append(\"\\\" xAxisTitle=\\\"\");\n b.append(xAxisTitle);\n b.append(\"\\\" yAxisTitle=\\\"\");\n b.append(yAxisTitle);\n b.append(\"\\\" xRangeMin=\\\"\");\n b.append(xRangeMin);\n b.append(\"\\\" xRangeMax=\\\"\");\n b.append(xRangeMax);\n b.append(\"\\\" xRangeIncr=\\\"\");\n b.append(xRangeIncr);\n b.append(\"\\\" yRangeMin=\\\"\");\n b.append(yRangeMin);\n b.append(\"\\\" yRangeMax=\\\"\");\n b.append(yRangeMax);\n b.append(\"\\\" yRangeIncr=\\\"\");\n b.append(yRangeIncr);\n b.append(\"\\\" >\\n\");\n\n for (int i = 0, n = dataSources.size(); i < n; i++) {\n GuiChartDataSource ds = (GuiChartDataSource)dataSources.get(i);\n b.append(ds.toXML());\n b.append(\"\\n\");\n }\n\n return b.toString();\n }", "protected abstract void toXml(PrintWriter result);", "public void outputForGraphviz() {\n\t\tString label = \"\";\n\t\tfor (int j = 0; j <= lastindex; j++) {\n\t\t\tif (j > 0) label += \"|\";\n\t\t\tlabel += \"<p\" + ptrs[j].myname + \">\";\n\t\t\tif (j != lastindex) label += \"|\" + String.valueOf(keys[j+1]);\n\t\t\t// Write out any link now\n\t\t\tBTree.writeOut(myname + \":p\" + ptrs[j].myname + \" -> \" + ptrs[j].myname + \"\\n\");\n\t\t\t// Tell your child to output itself\n\t\t\tptrs[j].outputForGraphviz();\n\t\t}\n\t\t// Write out this node\n\t\tBTree.writeOut(myname + \" [shape=record, label=\\\"\" + label + \"\\\"];\\n\");\n\t}", "public String printToXml()\n {\n XMLOutputter outputter = new XMLOutputter();\n outputter.setFormat(org.jdom.output.Format.getPrettyFormat());\n return outputter.outputString(this.toXml());\n }", "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "public void writeXML(String xml){\n\t\ttry {\n\t\t\t\n\t\t\t\n\t\t\tDocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder documentBuilder = documentFactory.newDocumentBuilder(); \n\t\t\t// define root elements \n\t\t\tDocument document = documentBuilder.newDocument(); \n\t\t\tElement rootElement = document.createElement(\"graph\"); \n\t\t\tdocument.appendChild(rootElement);\n\t\t\t\n\t\t\tfor(int i=0;i<Rel.getChildCount();i++){\n\t\t\t\tif(Rel.getChildAt(i).getTag() != null){\n\t\t\t\t\tif(Rel.getChildAt(i).getTag().toString().compareTo(\"node\") == 0){\n\t\t\t\t\t\tArtifact artifact = (Artifact) Rel.getChildAt(i);\n\t\t\t\t\t\tElement node = addElement(rootElement, \"node\", document);\n\t\t\t\t\t\tElement id = addAttribute(\"id\",artifact.getId()+\"\", document); //we create an attribute for a node\n\t\t\t\t\t\tnode.appendChild(id);//and then we attach it to the node\n\t\t\t\t\t\t\n\t\t\t\t\t\tArrayList <Artifact> fathers = artifact.getFathers();\n\t\t\t\t\t\tif(fathers != null){\n\t\t\t\t\t\t\taddElement(node, \"fathers\", document);//for complex attribute like array of fathers we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<fathers.size();j++){\n\t\t\t\t\t\t\t\tElement father = addAttribute(\"father\",fathers.get(j).getId()+\"\", document);//inside this element created in the node we add all its fathers as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(father);\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\tArrayList <Artifact> sons = artifact.getSons();\n\t\t\t\t\t\tif(sons != null){\n\t\t\t\t\t\t\taddElement(node, \"sons\", document);//for complex attribute like array of sons we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<sons.size();j++){\n\t\t\t\t\t\t\t\tElement son = addAttribute(\"son\",sons.get(j).getId()+\"\", document);//inside this element created in the node we add all its sons as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(son);\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\tElement label = addAttribute(\"label\", artifact.getText()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(label);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement age = addAttribute(\"age\", artifact.getAge()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(age);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement type = addAttribute(\"type\", artifact.getType()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(type);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement information = addAttribute(\"information\", artifact.getInformation()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(information);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement position = addAttribute(\"position\", artifact.getPosition()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(position);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// creating and writing to xml file \n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance(); \n\t\t\tTransformer transformer = transformerFactory.newTransformer(); \n\t\t\tDOMSource domSource = new DOMSource(document); \n\t\t\tStreamResult streamResult = new StreamResult(new File(xml)); \n\t\t\ttransformer.transform(domSource, streamResult);\n \n \n }catch(Exception e){\n \tLog.v(\"error writing xml\",e.toString());\n }\n\t\t\n\t\t\n\t}", "public String toXml() {\n\t\treturn(toString());\n\t}", "public String toString() {\r\n\t\tStringBuilder buffer = new StringBuilder();\r\n\t\t\r\n\t\tbuffer.append(\"<\" + xmltag + \" subgraph=\\\"\" + subgraph + \"\\\">\" + newline);\r\n\t\t\r\n\t\tfor (Variable currentVariable : variables) {\r\n\t\t\tbuffer.append(\"\\t\\t\\t\\t\\t\" + currentVariable);\r\n\t\t}\r\n\t\t\r\n\t\tbuffer.append(\"\\t\\t\\t\\t</\" + xmltag + \">\" + newline);\r\n\t\t\r\n\t\treturn buffer.toString();\r\n\t}", "public String\ttoXML()\t{\n\t\treturn toXML(0);\n\t}", "public void writeGraph (String outputFileName) {\n\t\ttry\r\n\t\t{\r\n\t\t\tFileOutputStream fileOutputStream = new FileOutputStream(outputFileName);\r\n\t\t\tBufferedOutputStream bufferedOutputStream = new BufferedOutputStream(\r\n\t\t\t\t\tfileOutputStream);\r\n\t\t\tPrintStream printStream = new PrintStream(bufferedOutputStream);\r\n\r\n\r\n\t\t\tfor(Integer i : adjacencyMatrix.keySet())\r\n\t\t\t{\r\n\t\t\t\tfor(Integer j : adjacencyMatrix.get(i))\r\n\t\t\t\t{\r\n\t\t\t\t\tprintStream.println(i+\",\"+j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tprintStream.close();\r\n\t\t} \r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(\"ERROR: An io exception occurred while writing file \"+outputFileName);\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\tcatch ( Exception e ){\r\n\t\t\tSystem.out.println(e.toString());\r\n\t\t\tSystem.out.println(\"ERROR: An exception occurred while writing file\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "public String toXML() {\n return null;\n }", "public String toXML() {\n return null;\n }", "void toXml(OutputStream out, boolean format) throws IOException;", "public String toXML()\n\t{\n\t\treturn toXML(0);\n\t}", "public String toXML()\n\t{\n\t\treturn toXML(0);\n\t}", "@Override\n public String toString() {\n String str = \"graph [\\n\";\n\n Iterator<Node<E>> it = iterator();\n\n //Node display\n while(it.hasNext()){\n Node n = it.next();\n\n str += \"\\n\\tnode [\";\n str += \"\\n\\t\\tid \" + n;\n str += \"\\n\\t]\";\n }\n\n //Edge display\n it = iterator();\n\n while(it.hasNext()){\n Node n = it.next();\n\n Iterator<Node<E>> succsIt = n.succsOf();\n while(succsIt.hasNext()){\n Node succN = succsIt.next();\n\n str += \"\\n\\tedge [\";\n str += \"\\n\\t\\tsource \" + n;\n str += \"\\n\\t\\ttarget \" + succN;\n str += \"\\n\\t\\tlabel \\\"Edge from node \" + n + \" to node \" + succN + \" \\\"\";\n str += \"\\n\\t]\";\n }\n }\n\n str += \"\\n]\";\n\n return str;\n }", "@Override\n public void toXml(XmlContext xc) {\n\n }", "public java.lang.String toString() {\n // call toString() with includeNS true by default and declareNS false\n String xml = this.toString(true, false);\n return xml;\n }", "Element toXML();", "public final String toString() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"<?xml version=\\\"1.0\\\"?>\").append(br());\n toXML(sb, 0);\n return sb.toString();\n }", "public String toXML() {\n StringBuilder xml = new StringBuilder();\n\n //just do the decomposition facts (not the surrounding element) - to keep life simple\n xml.append(super.toXML());\n\n for (YParameter parameter : _enablementParameters.values()) {\n xml.append(parameter.toXML());\n }\n for (YAWLServiceReference service : _yawlServices.values()) {\n xml.append(service.toXML());\n }\n return xml.toString();\n }", "@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"使用xml方式存储\");\n\t}", "void printGraph();", "public void printToXML() {\n String fileString = \"outputDisposal.xml\";\n //Creating the path object of the file\n Path filePath = Paths.get(fileString);\n if (Files.notExists(filePath)) {\n try {\n Files.createFile(filePath);\n } catch (IOException e1) {\n\n e1.printStackTrace();\n }\n }\n //Converting the path object to file to use in the FileWriter constructor \n File newFile = filePath.toFile();\n\n /*\n Typical try-with-resources block that features three streams: FileWriter,BufferedWriter and PrintWriter.\n The FileWriter object connects the file tho the stream.\n The BufferedWriter object \n */\n try ( PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(newFile)))) {\n for (PickUp pck : pickups) {\n out.print(pck);\n }\n\n } catch (IOException e) {\n System.err.println(e);\n }\n\n }", "void serialize(OutputStream output, Object graph);", "public String generateXML() \n { \n \n String xml = new String();\n \n String nodetype = new String();\n if (type.equals(\"internal\")){\n nodetype = \"INTERNAL\"; //change this for change in XML node name\n }\n else {\n nodetype = \"LEAF\"; //change this for change in XML node name\n }\n \n xml = \"<\" + nodetype;\n if (!name.equals(\"\")){\n xml = xml + \" name = \\\"\" + name + \"\\\"\";\n }\n if (length >0){\n xml = xml + \" length = \\\"\" + length + \"\\\"\";\n }\n //Section below tests tree size and depths\n // if (level > 0){\n // xml = xml + \" level = \\\"\" + level + \"\\\"\";\n // }\n //if (depth > 0){\n // xml = xml + \" depth = \\\"\" + depth + \"\\\"\";\n //}\n //if (newicklength > 0){\n // xml = xml + \" newicklength = \\\"\" + newicklength + \"\\\"\";\n //}\n // if (treesize > 0){\n // xml = xml + \" treesize = \\\"\" + treesize + \"\\\"\";\n //}\n //if (startxcoord >= 0){\n // xml = xml + \" startx = \\\"\" + startxcoord + \"\\\"\";\n //}\n //if (endxcoord >= 0){\n // xml = xml + \" endx = \\\"\" + endxcoord + \"\\\"\";\n //}\n //Test section done\n xml = xml + \">\";\n \n if (!children.isEmpty()){ //if there are children in this node's arraylist\n Iterator it = children.iterator();\n while(it.hasNext()){\n Node child = (Node) it.next();\n xml = xml + child.generateXML(); //The recursive coolness happens here!\n }\n }\n xml = xml + \"</\" + nodetype + \">\";\n \n return xml;\n }", "public abstract StringBuffer toXML();", "private void exportGraphML()\r\n {\r\n // Create the file filter.\r\n SimpleFileFilter[] filters = new SimpleFileFilter[] {\r\n new SimpleFileFilter(\"xml\", \"Graph ML (*.xml)\")\r\n };\r\n \r\n // Save the file.\r\n String file = openFileChooser(false, filters);\r\n \r\n // Write the file.\r\n if (file != null)\r\n {\r\n String extension = file.substring(file.length() - 4);\r\n if (!extension.equals(\".xml\")) file = file + \".xml\";\r\n Writer.writeGraphML(m_graph, file);\r\n }\r\n }", "public void writeXML(OutputStream stream) throws IOException {\n\t\tPrintWriter out = new PrintWriter(stream);\n\t\tout.println(\"<?xml version=\\\"1.0\\\"?>\");\n\t\tout.println(\"<VLDocking version=\\\"2.1\\\">\");\n\t\tfor(int i = 0; i < desktops.size(); i++) {\n\t\t\tWSDesktop desktop = (WSDesktop) desktops.get(i);\n\t\t\tdesktop.writeDesktopNode(out);\n\t\t}\n\t\tout.println(\"</VLDocking>\");\n\n\t\tout.flush();\n\t}", "@Override\n public String toXML() {\n if (_xml == null)\n _xml = String.format(XML, getStanzaId(), to);\n return _xml;\n }", "public String toString() {\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\n\t\tDocument document = XMLUtils.newDocument();\n\t\tdocument.appendChild(toXML(document));\n\t\tXMLUtils.write(bos, document);\n\n\t\treturn bos.toString();\n\t}", "private String toXML(){\n\tString buffer = \"<xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\">\\n\";\n\tfor(Room[] r : rooms)\n\t for(Room s : r)\n\t\tif(s != null)\n\t\t buffer += s.toXML();\n\tbuffer += \"</xml>\";\n\treturn buffer;\n }", "public String toXMLTag() {\n\t\tfinal StringBuffer buffer = new StringBuffer();\n\t\ttoXMLTag(buffer,0);\n\t\treturn buffer.toString();\n\t}", "public abstract StringBuffer toXML ();", "public static void exportRouteGraph() {\n try {\n var nodeRouteNr = new ArrayList<Integer>();\n var links = new ArrayList<Pair<Integer, Integer>>();\n\n int[] idx = {0};\n Files.lines(Path.of(Omnibus.class.getResource(\"segments.txt\").getFile())).forEach(line -> {\n String[] parts = line.split(\",\");\n int routeNr = Integer.parseInt(parts[0]) - 1;\n nodeRouteNr.add(routeNr);\n if (parts.length > 5) {\n String[] connections = parts[5].split(\";\");\n for (String c : connections)\n links.add(new Pair(idx[0], Integer.parseInt(c)));\n }\n ++idx[0];\n });\n\n\n File f = Paths.get(\"route-graph.graphml\").toFile();\n var out = new PrintStream(f);\n out.println(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n out.println(\"<graphml xmlns=\\\"http://graphml.graphdrawing.org/xmlns\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd\\\">\");\n out.println(\"<key attr.name=\\\"r\\\" attr.type=\\\"int\\\" for=\\\"node\\\" id=\\\"r\\\"/>\");\n out.println(\"<key attr.name=\\\"g\\\" attr.type=\\\"int\\\" for=\\\"node\\\" id=\\\"g\\\"/>\");\n out.println(\"<key attr.name=\\\"b\\\" attr.type=\\\"int\\\" for=\\\"node\\\" id=\\\"b\\\"/>\");\n out.println(\"<graph id=\\\"G\\\" edgedefault=\\\"directed\\\">\");\n for (int n = 0; n < nodeRouteNr.size(); ++n) {\n out.println(\"<node id=\\\"n\" + n + \"\\\">\");\n out.println(\"<data key=\\\"r\\\">\" + (COLOR[nodeRouteNr.get(n)]>>16) + \"</data>\");\n out.println(\"<data key=\\\"g\\\">\" + ((COLOR[nodeRouteNr.get(n)]>>8)&0xff) + \"</data>\");\n out.println(\"<data key=\\\"b\\\">\" + (COLOR[nodeRouteNr.get(n)]&0xff) + \"</data>\");\n out.println(\"</node>\");\n }\n int e = 0;\n for (var link : links)\n out.println(\"<edge id=\\\"e\" + (e++) + \"\\\" source=\\\"n\" + link.p + \"\\\" target=\\\"n\" + link.q + \"\\\"/>\");\n out.println(\"</graph>\");\n out.println(\"</graphml>\");\n out.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public abstract String rawGraphToString();", "public void writeElement(StringBuffer buffer)\n\t{\n//\t\tbuffer.append(\"<node id=\\\"\" + id + \"\\\">\\r\");\n//\t\tif(nodes.size() > 0)\n//\t\t\tbuffer.append(\"<graph id=\\\"\"+id+\"\\\" edgeids=\\\"true\\\" edgemode=\\\"directed\\\">\\r\");\n//\t\twriteAttributes(buffer);\n//\t\tfor(int clusterIndex = 0;clusterIndex<nodes.size(); clusterIndex++)\n//\t\t{\n//\t\t\tNodeElement subCluster = nodes.get(clusterIndex);\n//\t\t\tsubCluster.writeElement(buffer);\n//\t\t}\n//\t\t\n//\t\tfor(int edgeIndex = 0; edgeIndex < edges.size(); edgeIndex++)\n//\t\t\tedges.get(edgeIndex).writeElement(buffer);\n//\t\t\n//\t\tif(nodes.size() > 0)\n//\t\t\tbuffer.append(\"</graph>\\r\");\n//\t\t\n//\t\tbuffer.append(\"</node>\\r\");\n//\t\t\n\t}", "static public void writeNamedGraph(Graph G, String file) {\n\t\ttry {\n\t\t\tPrintWriter out = new PrintWriter(file);\n\t\t\tout.println(G.numNodes());\n\t\t\tfor (int i = 0; i < G.numNodes(); i++)\n\t\t\t\tout.println(G.getName(i));\n\t\t\tfor (int i = 0; i < G.numNodes(); i++) {\n\t\t\t\tArrayList<Pair<Integer, Double>> P = G.adjacentNodes(i);\n\t\t\t\tfor (Pair<Integer, Double> j : P) {\n\t\t\t\t\tif (i < j.first) {\n\t\t\t\t\t\tout.println(G.getName(i) + \" \" + G.getName(j.first) + \" \" + j.second);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tout.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "static public void writeGraph(Graph G, String file) {\n\t\ttry {\n\t\t\tPrintWriter out = new PrintWriter(file);\n\t\t\tout.println(G.numNodes());\n\t\t\tfor (int i = 0; i < G.numNodes(); i++) {\n\t\t\t\tArrayList<Pair<Integer, Double>> P = G.adjacentNodes(i);\n\t\t\t\tfor (Pair<Integer, Double> j : P) {\n\t\t\t\t\tif (i < j.first) {\n\t\t\t\t\t\tout.println(i + \" \" + j.first + \" \" + j.second);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tout.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static HashMap<String, String> OutputXml() {\n\t\treturn methodMap(\"xml\");\n\t}", "public void print (){\r\n for (int i = 0; i < graph.size(); ++i){\r\n graph.get(i).print();\r\n }\r\n }", "void printGraph() {\n for (Vertex u : this) {\n System.out.print(u + \": \");\n for (Edge e : u.Adj) {\n System.out.print(e);\n }\n System.out.println();\n }\n }", "public void writeXML(OutputStream stream) throws IOException {\n\t\tPrintWriter out = new PrintWriter(stream);\n\t\tout.println(\"<?xml version=\\\"1.0\\\"?>\");\n\t\tout.println(\"<VLToolBars version=\\\"1.0\\\">\");\n\t\txmlWriteContainer(out);\n\n\t\tout.println(\"</VLToolBars>\");\n\t\tout.flush();\n\t}", "String toXmlString() throws IOException;", "public void printDGraph(){\n System.out.println(this.toString());\n }", "@Get(\"xml\")\n public Representation toXml() {\n\n \tString status = getRequestFlag(\"status\", \"valid\");\n \tString access = getRequestFlag(\"location\", \"all\");\n\n \tList<Map<String, String>> metadata = getMetadata(status, access,\n \t\t\tgetRequestQueryValues());\n \tmetadata.remove(0);\n\n List<String> pathsToMetadata = buildPathsToMetadata(metadata);\n\n String xmlOutput = buildXmlOutput(pathsToMetadata);\n\n // Returns the XML representation of this document.\n StringRepresentation representation = new StringRepresentation(xmlOutput,\n MediaType.APPLICATION_XML);\n\n return representation;\n }", "public void printGraphStructure() {\n\t\tSystem.out.println(\"Vector size \" + nodes.size());\n\t\tSystem.out.println(\"Nodes: \"+ this.getSize());\n\t\tfor (int i=0; i<nodes.size(); i++) {\n\t\t\tSystem.out.print(\"pos \"+i+\": \");\n\t\t\tNode<T> node = nodes.get(i);\n\t\t\tSystem.out.print(node.data+\" -- \");\n\t\t\tIterator<EDEdge<W>> it = node.lEdges.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEDEdge<W> e = it.next();\n\t\t\t\tSystem.out.print(\"(\"+e.getSource()+\",\"+e.getTarget()+\", \"+e.getWeight()+\")->\" );\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public String toXMLString() {\n\t\treturn toXMLString(XML_TAB, XML_NEW_LINE);\n\t}", "public void writeXML() throws IOException {\n OutputFormat format = OutputFormat.createPrettyPrint();//th format of xml file\n XMLWriter xmlWriter =new XMLWriter( new FileOutputStream(file), format);\n xmlWriter.write(document);//write the new xml into the file\n xmlWriter.flush();\n }", "public void printGraph() {\n\t\tStringJoiner j = new StringJoiner(\", \");\n\t\tfor(Edge e : edgeList) {\n\t\t\tj.add(e.toString());\n\t\t}\n\t\t\n\t\tSystem.out.println(j.toString());\n\t}", "protected void toXMLImpl(XMLStreamWriter out) throws XMLStreamException {\n // Start element:\n out.writeStartElement(getXMLElementTagName());\n\n out.writeAttribute(\"id\", getId());\n out.writeAttribute(\"accelerator\", getKeyStrokeText(getAccelerator()));\n\n out.writeEndElement();\n }", "@Override\n\tpublic byte[] generateOutput() {\n\t\tthis.plainOut = new PlainOutputConversion();\n\n\t\tString output = \"\";\n\t\ttry {\n\t\t\toutput = constructTextfromXML(this.rootXML, true);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn output.getBytes();\n\t}", "public XMLOutputter() {\r\n }", "public void printGraph(){\n\t\tSystem.out.println(\"[INFO] Graph: \" + builder.nrNodes + \" nodes, \" + builder.nrEdges + \" edges\");\r\n\t}", "@Override\n public final String toString() {\n final StringBuilder nodes = new StringBuilder();\n nodes.append(this.sizeNodes()).append(\" Nodes: {\");\n final StringBuilder edges = new StringBuilder();\n edges.append(this.sizeEdges()).append(\" Edges: {\");\n for (final Node<N> node : this.getNodes()) {\n nodes.append(node.toString()).append(',');\n }\n for (final Edge<N, E> edge : this.getEdges()) {\n edges.append(edge.toString()).append(',');\n }\n final String newLine = System.getProperty(\"line.separator\");\n nodes.append('}').append(newLine).append(edges).append('}').append(newLine);\n return nodes.toString();\n }", "public String toString() {\n\n StringBuilder sb = new StringBuilder();\n sb.append(\"\\nApplication Graph for \" + this.getClass().getCanonicalName() + \"\\n\");\n Map<PEMaker, Collection<StreamMaker>> pe2streamMap = pe2stream.asMap();\n for (Map.Entry<PEMaker, Collection<StreamMaker>> entry : pe2streamMap.entrySet()) {\n sb.append(toString(entry.getKey()) + \"=> \");\n for (StreamMaker sm : entry.getValue()) {\n sb.append(toString(sm));\n }\n sb.append(\"\\n\");\n }\n\n Map<StreamMaker, Collection<PEMaker>> stream2peMap = stream2pe.asMap();\n for (Map.Entry<StreamMaker, Collection<PEMaker>> entry : stream2peMap.entrySet()) {\n sb.append(toString(entry.getKey()) + \"=> \");\n for (PEMaker pm : entry.getValue()) {\n sb.append(toString(pm));\n }\n sb.append(\"\\n\");\n }\n\n return sb.toString();\n\n }", "@Override\n\tpublic String getFormat() {\n\t\treturn \"xml\";\n\t}", "public String apGraph() {\n if(root != null){\n root.nameAvl();\n return doBigGraph();\n }else{\n return \"\";\n }\n }", "public static void exportXml(JButton inputButton, LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName)\r\n {\r\n inputButton.addActionListener((ActionEvent e) -> \r\n {\r\n JFileChooser fileChooser = new JFileChooser();\r\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"xml\", \"xml\"));\r\n String selectedExtension = fileChooser.getFileFilter().getDescription();\r\n Document resultDoc = null;\r\n int option = fileChooser.showSaveDialog(null);\r\n if(option == JFileChooser.APPROVE_OPTION)\r\n {\r\n try\r\n {\r\n resultDoc = generateXmlFile(inputData, elementInGraph, graphName);\r\n } \r\n catch (ParserConfigurationException ex)\r\n {\r\n Logger.getLogger(drawMusicData_Utils.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n //Salvataggio nuovo file XML prendendo il file selezionato dal chooser e concatenando l'estensione\r\n Result output = new StreamResult(new File(fileChooser.getSelectedFile().getAbsolutePath()+\".\"+selectedExtension));\r\n Source input = new DOMSource(resultDoc);\r\n try\r\n {\r\n TransformerFactory tf = TransformerFactory.newInstance();\r\n Transformer t;\r\n t = tf.newTransformer();\r\n t.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n t.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"3\");\r\n t.transform(input, output);\r\n }\r\n catch (IllegalArgumentException | TransformerException ex)\r\n {\r\n \r\n }\r\n }\r\n }); \r\n }", "public void writeXMLFinisher() {\n\t\tJavaIO.createXMLFile(getCurrentPath(), \"coveragePriorJ.xml\", \"</list>\", true);\n\t}", "public XmlExporter(final XmlExportOptions options)\n {\n this(options, System.out);\n }", "public String doBigGraph(){\n NodoAvl tmp = root;\n StringBuilder sb = new StringBuilder();\n sb.append(\"subgraph {\");\n sb.append(\"node [shape = record];\\n\");\n sb.append(getLabelNodeAvl());\n sb.append(\"}\");\n Log.logger.info(sb.toString());\n return sb.toString();\n }", "@Override\n public String toString() {\n return InternalNodeSerializer.toString(this);\n }", "public void generateDotFile(String filename) {\n\t\ttry {\n\t\t\tPrintWriter out = new PrintWriter(filename);\n\t\t\tout.println(\"digraph Heap {\\n\\tnode [shape=record]\\n\");\n\n\t\t\tfor (int i = 0; i < currentSize; i++) {\n\t\t\t\tout.println(\"\\tnode\" + i + \" [label = \\\"<f0> |<f1> \" + array[i] + \"|<f2> \\\"]\");\n\t\t\t\tif (((i * 2) + 1) < currentSize)\n\t\t\t\t\tout.println(\"\\tnode\" + i + \":f0 -> node\" + ((i * 2) + 1) + \":f1\");\n\t\t\t\tif (((i * 2) + 2) < currentSize)\n\t\t\t\t\tout.println(\"\\tnode\" + i + \":f2 -> node\" + ((i * 2) + 2) + \":f1\");\n\t\t\t}\n\n\t\t\tout.println(\"}\");\n\t\t\tout.close();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "public void createOAGDot(){\r\n\t\ttry {\r\n\t\t\tFileWriter writer = new FileWriter(new File(\"OAGGraph.dot\"));\r\n\t\t\twriter.write(\"digraph G{\\n\");\r\n\t\t\tint subCounter = 0;\r\n\t\t\t// Add all vertices\r\n\t\t\t\r\n\t\t\tfor (IFace iface : interfaces){\r\n\t\t\t\taddOAGDotIFace(iface, writer, subCounter);\r\n\t\t\t\tsubCounter++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (Class cls : classes){\r\n\t\t\t\taddOAGDotCls(cls, writer, subCounter);\r\n\t\t\t\tsubCounter++;\r\n\t\t\t}\r\n\r\n\t\t\t// Add edges\r\n\t\t\tfor (Vertex source : graphEdges.keySet()){\r\n\t\t\t\tString sourceName = source.getParent().getName() + \"_\" + source.getExtVar();\r\n\t\t\t\tHashMap<Vertex, EdgeType> dests = graphEdges.get(source);\r\n\t\t\t\tif (dests != null){\r\n\t\t\t\t\tfor (Vertex dest : dests.keySet()){\r\n\t\t\t\t\t\tString destName = dest.getParent().getName() + \"_\" + dest.getExtVar();\r\n\t\t\t\t\t\tString edgeStr = \"\\t\" + sourceName + \" -> \" + destName;\r\n\t\t\t\t\t\tif (dests.get(dest) == EdgeType.INDIRECT)\r\n\t\t\t\t\t\t\tedgeStr += \"[style=dotted]\";\r\n\t\t\t\t\t\twriter.write(edgeStr + \";\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twriter.write(\"}\");\r\n\t\t\twriter.close();\r\n\t\t}\r\n\t\tcatch (IOException e){\r\n\t\t\tSystem.err.println(\"Error: IOException detected\");\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "public void dump( Result out ) throws JAXBException;", "@Override\n public String toString() {\n\n // Add schema location attribute\n this.addSchemaLocation(\"http://www.w3.org/2001/XMLSchema-instance\", \"schemaLocation\", \"xsi\",\n \"http://xsd.sepamail.eu/1206/ xsd/sepamail_missive.xsd \");\n\n // XML options instance\n XmlOptions options = new XmlOptions();\n\n // Set the properties of the XML options\n options.setSavePrettyPrint();\n options.setSaveSuggestedPrefixes(this.suggestedPrefixes);\n options.setUseCDataBookmarks();\n\n try {\n\n // Build XML document using the constructed XML object\n SAXBuilder sxb = new SAXBuilder();\n Document xmlDocument =\n sxb.build(new InputStreamReader(new ByteArrayInputStream(missiveDocument.xmlText(options).getBytes()),\n \"UTF-8\"));\n\n // Pretty print the XML document\n XMLOutputter xmlOutputter = new XMLOutputter(Format.getPrettyFormat());\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n xmlOutputter.output(xmlDocument, output);\n\n // String with XML content\n return new String(output.toByteArray());\n\n } catch ( JDOMException | IOException ex) {\n\n // TODO: error logging\n System.out.println(ex.getMessage());\n }\n\n return null;\n }", "public String asXmlStream() {\n String outXml = this.tblXmlStream.toXML(structuralErrors);\n\n return outXml;\n }", "public void printOWLModel(){\n\t\tmodel.write(System.out, \"RDF/XML\");\t\t\n\t}", "private String toXML(){\n return \"<paint>\\n\"+\"\\t<background_color>\" + this.backgroundColor +\n \"</background_color>\\n\" + touchArea.toXML() + \"</paint>\\n\";\n }", "protected String toXMLFragment() {\n StringBuffer xml = new StringBuffer();\n if (isSetStepConfig()) {\n StepConfig stepConfig = getStepConfig();\n xml.append(\"<StepConfig>\");\n xml.append(stepConfig.toXMLFragment());\n xml.append(\"</StepConfig>\");\n } \n if (isSetExecutionStatusDetail()) {\n StepExecutionStatusDetail executionStatusDetail = getExecutionStatusDetail();\n xml.append(\"<ExecutionStatusDetail>\");\n xml.append(executionStatusDetail.toXMLFragment());\n xml.append(\"</ExecutionStatusDetail>\");\n } \n return xml.toString();\n }", "public String toXml()\n\t{\n\t\ttry {\n\t\t\tTransformer transformer = TransformerFactory.newInstance().newTransformer();\n\t\t\tStringWriter buffer = new StringWriter();\n\t\t\ttransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"yes\");\n\t\t\ttransformer.transform(new DOMSource(conferenceInfo), new StreamResult(buffer));\n\t\t\treturn buffer.toString();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public void createFile(){\r\n JFileChooser chooser = new JFileChooser();\r\n chooser.setAcceptAllFileFilterUsed(false);\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Only XML Files\", \"xml\");\r\n chooser.addChoosableFileFilter(filter);\r\n chooser.showSaveDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (!f.getName().endsWith(\".xml\")){\r\n f = new File(f.getAbsolutePath().concat(\".xml\"));\r\n }\r\n try {\r\n BufferedWriter bw = new BufferedWriter(new FileWriter(f));\r\n try (PrintWriter pw = new PrintWriter(bw)) {\r\n pw.println(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\r\n pw.println(\"<osm>\");\r\n for (Node node : this.getListNodes()) {\r\n if(node.getType() == TypeNode.INCENDIE){\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" intensity=\\\"\"+node.getFire()+\"\\\" />\");\r\n } else {\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" />\");\r\n }\r\n }\r\n for (Edge edge : this.getListEdges()) {\r\n pw.println(\" <edge nd1=\\\"\"+edge.getNode1().getId()+\"\\\" nd2=\\\"\"+edge.getNode2().getId()+\"\\\" type=\\\"\"+edge.getType()+\"\\\" />\");\r\n }\r\n pw.println(\"</osm>\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"Writing Error : \" + e.getMessage());\r\n }\r\n }", "private void exportTreeML()\r\n {\r\n // Create the file filter.\r\n// SimpleFileFilter[] filters = new SimpleFileFilter[] {\r\n// new SimpleFileFilter(\"xml\", \"Tree ML (*.xml)\")\r\n// };\r\n// \r\n// // Save the file.\r\n// String file = openFileChooser(false, filters);\r\n// \r\n// // Write the file.\r\n// if (file != null)\r\n// {\r\n// String extension = file.substring(file.length() - 4);\r\n// if (!extension.equals(\".xml\")) file = file + \".xml\";\r\n// Writer.writeTreeML(m_gtree, file);\r\n// }\r\n }", "@Override\n\tpublic CharSequence toXML() {\n\t\treturn null;\n\t}", "private String printXML(Node target){\n\t\treturn \"\";\n\t}", "public java.lang.String getXml();", "private void printGraphModel() {\n System.out.println(\"Amount of nodes: \" + graphModel.getNodes().size() +\n \" || Amount of edges: \" + graphModel.getEdges().size());\n System.out.println(\"Nodes:\");\n int i = 0;\n for (Node n : graphModel.getNodes()) {\n System.out.println(\"#\" + i + \" \" + n.toString());\n i++;\n }\n System.out.println(\"Edges:\");\n i = 0;\n for (Edge e : graphModel.getEdges()) {\n System.out.println(\"#\" + i + \" \" + e.toString());\n i++;\n }\n }", "public String getXML() {\n\t\treturn getXML(false);\n\t}", "public String getXML() {\n\t\tString xml = \"\";\n\t\ttry {\n\t\t\tJAXBContext jc = JAXBContext.newInstance( QuotaUserRs.class );\n\t\t\tMarshaller m = jc.createMarshaller();\n\t\t\tStringWriter stringWriter = new StringWriter();\n\t\t\tm.marshal(this, stringWriter);\n\t\t\txml = stringWriter.toString();\n\t\t} catch (JAXBException ex) {}\n\t\treturn xml;\n\t}", "public String toXml( String inEncoding )\n\t{\n\t\tDocument doc = DocumentHelper.createDocument();\n\t\tElement root = doc.addElement(getName());\n\t\tappendXml(this,root);\n\t\tStringWriter text = new StringWriter();\n\t\tOutputFormat format = OutputFormat.createPrettyPrint();\n\t\tformat.setEncoding(inEncoding);\n\t\tXMLWriter out = new XMLWriter(text, format);\n\t\ttry\n\t\t{\n\t\t\tout.write(doc);\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t\tthrow new OpenEditRuntimeException(ex);\n\t\t}\n\t\treturn text.toString();\n\t}", "public ExportGraph()\n {\n }", "@Override\n public void toXML(Node node)\n {\n super.toXML(node);\n\n Document document = node.getOwnerDocument();\n\n Element e = document.createElement(\"lethal-range\");\n e.setTextContent(String.valueOf(this.getLethalRange()));\n node.appendChild(e);\n\n e = document.createElement(\"pk\");\n e.setTextContent(String.valueOf(this.getPk()));\n node.appendChild(e);\n\n e = document.createElement(\"max-gs\");\n e.setTextContent(String.valueOf(this.getMaxGs()));\n node.appendChild(e);\n }", "@Override\n public String toString() { return root.toString(); }", "public static void outputXMLdoc() throws Exception {\n // transform the Document into a String\n DOMSource domSource = new DOMSource(doc);\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer transformer = tf.newTransformer();\n transformer.setOutputProperty(OutputKeys.METHOD, \"xml\");\n transformer.setOutputProperty(OutputKeys.ENCODING,\"UTF-8\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"4\");\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n java.io.StringWriter sw = new java.io.StringWriter();\n StreamResult sr = new StreamResult(sw);\n transformer.transform(domSource, sr);\n String xml = sw.toString();\n\n\tSystem.out.println(xml);\n\n }", "private String getAllConfigsAsXML() {\n StringBuilder configOutput = new StringBuilder();\n //getConfigParams\n configOutput.append(Configuration.getInstance().getXmlOutput());\n //getRocketsConfiguration\n configOutput.append(RocketsConfiguration.getInstance().getXmlOutput());\n //getCountries\n CountriesList countriesList = (CountriesList) AppContext.getContext().getBean(AppSpringBeans.COUNTRIES_BEAN);\n configOutput.append(countriesList.getListInXML());\n //getWeaponConfiguration\n configOutput.append(WeaponConfiguration.getInstance().getXmlOutput());\n //getPerksConfiguration\n configOutput.append(\"\\n\");\n configOutput.append(PerksConfiguration.getInstance().getXmlOutput());\n //getRankingRules\n ScoringRules scoreRules = (ScoringRules) AppContext.getContext().getBean(AppSpringBeans.SCORING_RULES_BEAN);\n configOutput.append(scoreRules.rankingRulesXml());\n\n configOutput.append(AchievementsConfiguration.getInstance().getXmlOutput());\n\n configOutput.append(\"\\n\");\n configOutput.append(AvatarsConfiguration.getInstance().getXmlOutput());\n\n\n return configOutput.toString();\n }", "public String getXML() //Perhaps make a version of this where the header DTD can be manually specified\n { //Also allow changing of generated tags to user specified values\n \n String xml = new String();\n xml= \"<?xml version = \\\"1.0\\\"?>\\n\";\n xml = xml + generateXML();\n return xml;\n }", "private String generateXml(List list)\n {\n StringBuffer buf = new StringBuffer( );\n for ( Iterator it = list.iterator( ); it.hasNext( ); )\n {\n DRLJavaEmitter emitter = (DRLJavaEmitter) it.next( );\n buf.append( emitter.toXML( ) );\n }\n return buf.toString( );\n }", "public String getXML() {\n\t\tString xml = \"\";\n\t\ttry {\n\t\t\tJAXBContext jc = JAXBContext.newInstance( VolumeRs.class );\n\t\t\tMarshaller m = jc.createMarshaller();\n\t\t\tStringWriter stringWriter = new StringWriter();\n\t\t\tm.marshal(this, stringWriter);\n\t\t\txml = stringWriter.toString();\n\t\t} catch (JAXBException ex) {}\n\t\treturn xml;\n\t}", "public void exportGraphForClade(String clade_name, String out_filepath){\n \t\tIndexHits<Node> foundNodes = findTaxNodeByName(clade_name);\n \t\tNode firstNode = null;\n \t\tif (foundNodes.size() < 1) {\n System.out.println(\"name '\" + clade_name + \"' not found. quitting.\");\n \t\t\treturn;\n \t\t} else if (foundNodes.size() > 1) {\n \t\t System.out.println(\"more than one node found for name '\" + clade_name + \"'not sure how to deal with this. quitting\");\n \t\t} else {\n \t\t for (Node n : foundNodes) {\n \t\t firstNode = n;\n \t\t }\n \t\t}\n \t\t//TraversalDescription CHILDOF_TRAVERSAL = Traversal.description().relationships(RelTypes.TAXCHILDOF,Direction.INCOMING );\n \t\tPrintWriter out_file;\n \t\ttry {\n \t\t\tout_file = new PrintWriter(new FileWriter(out_filepath));\n \t\t\tout_file.write(\"strict digraph {\\n\\trankdir = RL ;\\n\");\n \t\t\tHashMap<String, String> src2style = new HashMap<String, String>();\n \t\t\tHashMap<Node, String> nd2dot_name = new HashMap<Node, String>();\n \t\t\tint count = 0;\n \t\t\tfor (Node nd : firstNode.traverse(Traverser.Order.BREADTH_FIRST, \n \t\t\t\t\t\t\t\t\t\t\t StopEvaluator.END_OF_GRAPH,\n \t\t\t\t\t\t\t\t\t\t\t ReturnableEvaluator.ALL,\n \t\t\t\t\t\t\t\t\t\t\t RelTypes.TAXCHILDOF,\n \t\t\t\t\t\t\t\t\t\t\t Direction.INCOMING)) {\n \t\t\t\tfor(Relationship rel : nd.getRelationships(RelTypes.TAXCHILDOF,Direction.INCOMING)) {\n \t\t\t\t\tcount += 1;\n \t\t\t\t\tNode rel_start = rel.getStartNode();\n \t\t\t\t\tString rel_start_name = ((String) rel_start.getProperty(\"name\"));\n \t\t\t\t\tString rel_start_dot_name = nd2dot_name.get(rel_start);\n \t\t\t\t\tif (rel_start_dot_name == null){\n \t\t\t\t\t\trel_start_dot_name = \"n\" + (1 + nd2dot_name.size());\n \t\t\t\t\t\tnd2dot_name.put(rel_start, rel_start_dot_name);\n \t\t\t\t\t\tout_file.write(\"\\t\" + rel_start_dot_name + \" [label=\\\"\" + rel_start_name + \"\\\"] ;\\n\");\n \t\t\t\t\t}\n \t\t\t\t\tNode rel_end = rel.getEndNode();\n \t\t\t\t\tString rel_end_name = ((String) rel_end.getProperty(\"name\"));\n \t\t\t\t\tString rel_end_dot_name = nd2dot_name.get(rel_end);\n \t\t\t\t\tif (rel_end_dot_name == null){\n \t\t\t\t\t\trel_end_dot_name = \"n\" + (1 + nd2dot_name.size());\n \t\t\t\t\t\tnd2dot_name.put(rel_end, rel_end_dot_name);\n \t\t\t\t\t\tout_file.write(\"\\t\" + rel_end_dot_name + \" [label=\\\"\" + rel_end_name + \"\\\"] ;\\n\");\n \t\t\t\t\t}\n \t\t\t\t\tString rel_source = ((String) rel.getProperty(\"source\"));\n \t\t\t\t\tString edge_style = src2style.get(rel_source);\n \t\t\t\t\tif (edge_style == null) {\n \t\t\t\t\t\tedge_style = \"color=black\"; // @TMP\n \t\t\t\t\t\tsrc2style.put(rel_source, edge_style);\n \t\t\t\t\t}\n \t\t\t\t\tout_file.write(\"\\t\" + rel_start_dot_name + \" -> \" + rel_end_dot_name + \" [\" + edge_style + \"] ;\\n\");\n \t\t\t\t}\n \t\t\t}\n \t\t\tout_file.write(\"}\\n\");\n \t\t\tout_file.close();\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}", "private <T extends BaseGraph<?, ?>> void printGraphs(final List<T> graphs) {\n final int writeFirstGraphWithSizeSmallerThan = 50;\n\n try ( final PrintStream graphWriter = new PrintStream(graphOutputPath) ) {\n graphWriter.println(\"digraph assemblyGraphs {\");\n for ( final T graph : graphs ) {\n if ( debugGraphTransformations && graph.getKmerSize() >= writeFirstGraphWithSizeSmallerThan ) {\n logger.info(\"Skipping writing of graph with kmersize \" + graph.getKmerSize());\n continue;\n }\n\n graph.printGraph(graphWriter, false, pruneFactor);\n\n if ( debugGraphTransformations )\n break;\n }\n\n graphWriter.println(\"}\");\n }\n catch ( IOException e ) {\n throw new UserException.CouldNotCreateOutputFile(graphOutputPath, e);\n }\n }", "public String getXml()\n {\n StringBuffer result = new StringBuffer(256);\n\n result.append(\"<importOptions>\");\n\n result.append(m_fileOptions.asXML());\n result.append(getOtherXml());\n\n result.append(\"</importOptions>\");\n\n return result.toString();\n }", "public void write(Writer out) throws IOException {\n\t\t/*\n\t\t * get the first interresting node, ie the deepest one that is an\n\t\t * ancestor of every selected node, in the schema and corresponding\n\t\t * nodes in the the document\n\t\t */\n\t\tsetXmlRoot();\n\t\tfirstElement = true;\n\t\t/* marshall once for title */\n\t\tout.write(getTitle(lineNode) + \"\\n\");\n\t\tout.flush();\n\t\t// writeNode(lineNode, (Element) lineElements.get(0), TITLE, out);\n\t\t//\t\tout.write(\"\\n\");\n\t\tfirstElement = true;\n\t\t/* marshall each element */\n\t\tfor (int i = 0; i < lineElements.size(); i++) {\n\t\t\tfirstElement = true;\n\t\t\twriteNode(lineNode, (Element) lineElements.get(i), out, false);\n\t\t\tout.write(\"\\n\");\n\t\t\tout.flush();\n\t\t}\n\t}", "public String toString() {\r\n StringBuffer buffer = new StringBuffer();\r\n for (int i = 0; i < defaultFormat.lineSeparator.length(); i++) {\r\n char ch = defaultFormat.lineSeparator.charAt( i);\r\n switch (ch) {\r\n case '\\r': buffer.append(\"\\\\r\");\r\n break;\r\n case '\\n': buffer.append(\"\\\\n\");\r\n break;\r\n case '\\t': buffer.append(\"\\\\t\");\r\n break;\r\n default: buffer.append(\"[\" + ((int)ch) + \"]\");\r\n break;\r\n }\r\n }\r\n\r\n return (\r\n \"XMLOutputter[omitDeclaration = \" + omitDeclaration + \", \" +\r\n \"encoding = \" + encoding + \", \" +\r\n \"omitEncoding = \" + omitEncoding + \", \" +\r\n \"indent = '\" + defaultFormat.indent + \"'\" + \", \" +\r\n \"expandEmptyElements = \" + defaultFormat.expandEmptyElements + \", \" +\r\n \"newlines = \" + defaultFormat.newlines + \", \" +\r\n \"lineSeparator = '\" + buffer.toString() + \"', \" +\r\n \"trimAllWhite = \" + defaultFormat.trimAllWhite +\r\n \"textTrim = \" + defaultFormat.textTrim +\r\n \"textNormalize = \" + defaultFormat.textNormalize + \"]\"\r\n );\r\n }", "public interface OutputHandler\n{\n\n public abstract void printKeyAttributes(GraphMLWriteContext graphmlwritecontext, XmlWriter xmlwriter);\n\n public abstract void printKeyOutput(GraphMLWriteContext graphmlwritecontext, XmlWriter xmlwriter);\n\n public abstract void printDataAttributes(GraphMLWriteContext graphmlwritecontext, XmlWriter xmlwriter);\n\n public abstract void printDataOutput(GraphMLWriteContext graphmlwritecontext, XmlWriter xmlwriter);\n}", "@Override\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"node:\\n\").append(nodeJo);\n\t\tsb.append(\"\\nedges:\\n\").append(edgesJa);\n\t\treturn sb.toString();\n\t}", "private static Document generateXmlFile(LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName) throws ParserConfigurationException\r\n {\r\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\r\n Document doc = docBuilder.newDocument();\r\n \r\n Date date = new Date();\r\n long time = date.getTime();\r\n Timestamp ts = new Timestamp(time);\r\n \r\n //Nodo Radice export_results\r\n Element export_results = doc.createElement(\"export_results\");\r\n export_results.setAttribute(\"date\", \"\"+ts);\r\n doc.appendChild(export_results);\r\n \r\n //Figlo del nodo radice export_results\r\n Element graph = doc.createElement(\"graph\");\r\n graph.setAttribute(\"name\", graphName);\r\n export_results.appendChild(graph);\r\n \r\n //Popolo iterando sulla mappa i nodi interni del TAG graph\r\n for(String mapKey : inputData.keySet())\r\n {\r\n //System.out.println(\"Key: \" + mapKey + \" - - Value: \" + inputData.get(mapKey));\r\n \r\n Element singleElementInGraph = doc.createElement(elementInGraph);\r\n singleElementInGraph.setTextContent(Integer.toString(inputData.get(mapKey)));\r\n singleElementInGraph.setAttribute(\"type\", mapKey);\r\n graph.appendChild(singleElementInGraph);\r\n }\r\n return doc;\r\n }" ]
[ "0.72354716", "0.6814071", "0.6793153", "0.6779082", "0.67279917", "0.6726516", "0.6679229", "0.6679229", "0.6679229", "0.65976256", "0.6527317", "0.6505935", "0.64374566", "0.6365184", "0.63595027", "0.6353651", "0.63383937", "0.62186396", "0.62186396", "0.62166315", "0.6186706", "0.61397773", "0.6136622", "0.6120886", "0.6116349", "0.6099713", "0.60842943", "0.6081712", "0.60743", "0.60270315", "0.6026821", "0.60267735", "0.602497", "0.60092884", "0.5998661", "0.59935445", "0.59897923", "0.594517", "0.59313726", "0.5929301", "0.5927476", "0.5919379", "0.5919139", "0.58838505", "0.5878731", "0.5874664", "0.5866687", "0.5858415", "0.5843182", "0.5839532", "0.5836207", "0.58260286", "0.58155036", "0.5797638", "0.5785021", "0.5779363", "0.5776646", "0.57674056", "0.575321", "0.57518905", "0.57451814", "0.57230693", "0.57225156", "0.5722245", "0.5720827", "0.57107717", "0.5692052", "0.5689991", "0.56844795", "0.56821746", "0.5678662", "0.5678029", "0.56698287", "0.5669524", "0.56673235", "0.5662557", "0.566233", "0.56598306", "0.5658477", "0.56463116", "0.5644519", "0.56439906", "0.5639414", "0.56371325", "0.56364363", "0.5635851", "0.5629136", "0.5617326", "0.5615018", "0.5614308", "0.56091064", "0.5608056", "0.5606097", "0.560126", "0.55923164", "0.5588944", "0.55833375", "0.55804956", "0.5564769", "0.55558604", "0.555446" ]
0.0
-1
Be sure the menus are current
public void updateMenus() { System.out.println("BarGraphDisplayer.updateMenus"); CommandRegistrar.gRegistrar.checkAction("barGraph"); CommandRegistrar.gRegistrar.enableAction("viewOptions"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkMenuItemStatus() {\n\t\tif (VozCache.instance().getCookies() == null) { // not logged in yet\n\t\t\tlogoutMenu.setVisible(false);\t\t\t\n\t\t\tloginMenu.setVisible(true);\n\t\t\tloginWithPresetMenu.setVisible(true);\n\t\t} else { // logged in\n\t\t\tlogoutMenu.setVisible(true);\t\t\t\n\t\t\tloginMenu.setVisible(false);\n\t\t\tloginWithPresetMenu.setVisible(false);\n\t\t}\t\t\n\t\tif (VozCache.instance().canShowReplyMenu()) {\n\t\t\tif(VozCache.instance().getCookies() != null) {// logged in\n\t\t\t\tquickRepMenu.setVisible(true);\n\t\t\t} else {\n\t\t\t\tquickRepMenu.setVisible(false);\n\t\t\t}\n\t\t} else {\n\t\t\tquickRepMenu.setVisible(false);\n\t\t}\n\t\t\n\t\tif (canShowPinnedMenu()) {\n\t\t\tpinMenu.setVisible(true);\n\t\t} else {\n\t\t\tpinMenu.setVisible(false);\n\t\t}\n\t\t\n\t\tif (canShowUnpinnedMenu()) {\n\t\t\tunpinMenu.setVisible(true);\n\t\t} else {\n\t\t\tunpinMenu.setVisible(false);\n\t\t}\n\t}", "private static void returnMenu() {\n\t\t\r\n\t}", "public void onMenuNew() {\n handleMenuOpen(null);\n }", "private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }", "public void updateMenu() {\n updateMenuGroupError = true;\n if (menu.updateMenu()) {\n deleteMenuError = false;\n createMenuError = false;\n updateMenuError = true;\n } else {\n setName(menu.name);\n updateMenuError = false;\n }\n }", "public void initMenu(){\n\t}", "private void updateMenus()\n {\n m_KernelMenu.updateMenu();\n m_AgentMenu.updateMenu();\n }", "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}", "@Test\n public void testMenu() {\n MAIN_MENU[] menusDefined = MAIN_MENU.values();\n\n // get menu items\n List<String> menuList = rootPage.menu().items();\n _logger.debug(\"Menu items:{}\", menuList);\n // check the count\n Assert.assertEquals(menuList.size(), menusDefined.length, \"Number of menus test\");\n // check the names\n for (String item : menuList) {\n Assert.assertNotNull(MAIN_MENU.fromText(item), \"Checking menu: \" + item);\n }\n // check the navigation\n for (MAIN_MENU item : menusDefined) {\n _logger.debug(\"Testing menu:[{}]\", item.getText());\n rootPage.menu().select(item.getText());\n Assert.assertEquals(item.getText(), rootPage.menu().selected());\n }\n }", "public boolean isOnMenu ();", "@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}", "private Boolean setUp() {\n\t\twhile(!this.menu());\n\t\treturn true;\n\t}", "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 ifLose() {\n LoseMenu.setVisible(true);\n }", "private void updateMenuItems(){\n String awayState = mStructure.getAway();\n MenuItem menuAway = menu.findItem(R.id.menu_away);\n if (KEY_AUTO_AWAY.equals(awayState) || KEY_AWAY.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_home);\n } else if (KEY_HOME.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_away);\n }\n }", "boolean isMenuShowing() {\n return game.r != null;\n }", "private void updateEnableStatus()\n {\n this.menu.setEnabled(this.menu.getItemCount() > 0);\n }", "public static void updateMainMenu() {\n instance.updateMenu();\n }", "public void menu() {\n\t\tstate.menu();\n\t}", "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 boolean updateMenu() {\n selectedMotifNames=panel.getSelectedMotifNames();\n if (selectedMotifNames==null) return false;\n for (JMenuItem item:limitedToOne) {\n item.setEnabled(selectedMotifNames.length==1);\n }\n selectMotifsFromMenu.removeAll();\n selectOnlyMotifsFromMenu.removeAll(); \n for (String collectionName:engine.getNamesForAllDataItemsOfType(MotifCollection.class)) {\n JMenuItem subitem=new JMenuItem(collectionName);\n subitem.addActionListener(selectFromCollectionListener);\n selectMotifsFromMenu.add(subitem);\n JMenuItem subitem2=new JMenuItem(collectionName);\n subitem2.addActionListener(clearAndselectFromCollectionListener);\n selectOnlyMotifsFromMenu.add(subitem2);\n } \n for (String partitionName:engine.getNamesForAllDataItemsOfType(MotifPartition.class)) {\n Data data=engine.getDataItem(partitionName);\n if (data instanceof MotifPartition) {\n JMenu selectMotifsFromMenuCluster=new JMenu(data.getName()); \n JMenu selectOnlyMotifsFromMenuCluster=new JMenu(data.getName()); \n for (String cluster:((MotifPartition)data).getClusterNames()) { \n JMenuItem subitem=new JMenuItem(cluster);\n subitem.setActionCommand(partitionName+\".\"+cluster);\n subitem.addActionListener(selectFromCollectionListener);\n selectMotifsFromMenuCluster.add(subitem);\n JMenuItem subitem2=new JMenuItem(cluster);\n subitem2.setActionCommand(partitionName+\".\"+cluster);\n subitem2.addActionListener(clearAndselectFromCollectionListener);\n selectOnlyMotifsFromMenuCluster.add(subitem2);\n }\n selectMotifsFromMenu.add(selectMotifsFromMenuCluster);\n selectOnlyMotifsFromMenu.add(selectOnlyMotifsFromMenuCluster);\n }\n } \n selectMotifsFromMenu.setEnabled(selectMotifsFromMenu.getMenuComponentCount()>0);\n selectOnlyMotifsFromMenu.setEnabled(selectOnlyMotifsFromMenu.getMenuComponentCount()>0);\n dbmenu.updateMenu((selectedMotifNames.length==1)?selectedMotifNames[0]:null,true);\n if (selectedMotifNames.length==1) {\n displayMotif.setText(DISPLAY_MOTIF+\" \"+selectedMotifNames[0]);\n displayMotif.setVisible(true);\n compareMotifToOthers.setText(\"Compare \"+selectedMotifNames[0]+\" To Other Motifs\");\n compareMotifToOthers.setVisible(true);\n saveMotifLogo.setVisible(true);\n dbmenu.setVisible(true);\n } else { \n displayMotif.setVisible(false);\n compareMotifToOthers.setVisible(true);\n saveMotifLogo.setVisible(true);\n dbmenu.setVisible(false);\n }\n return true;\n }", "@Test\n\tpublic void addMenuTest() throws Exception {\n\t\tif (Configuration.shufflerepeat &&\n\t\tConfiguration.featureamp&&\n\t\tConfiguration.playengine&&\n\t\tConfiguration.choosefile&&\n\t\tConfiguration.gui&&\n\t\tConfiguration.skins&&\n\t\tConfiguration.light\n\t\t) {\t\n\t\t\tstart();\n\t\t\tgui.addMenu();\n\t\t\tJMenu menu = (JMenu) MemberModifier.field(Application.class, \"menu\").get(gui);\n\t\t\tassertNotNull(menu);\n\n\t\t}\n\t}", "public void returnToMenu()\n\t{\n\t\tchangePanels(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (initMenu() == 0) {\n getMenuInflater().inflate(R.menu.menu_null, menu);\n } else {\n getMenuInflater().inflate(this.initMenu(), menu);\n }\n return true;\n }", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "private void voltarMenu() {\n\t\tmenu = new TelaMenu();\r\n\t\tmenu.setVisible(true);\r\n\t\tthis.dispose();\r\n\t}", "public static void activateMenu() {\n instance.getMenu().show();\n }", "@Override\n public List<MMenu> getMenus()\n {\n return null;\n }", "@Override\n public boolean onPrepareOptionsMenu (Menu menu) {\n \n return super.onPrepareOptionsMenu (menu);\n \n }", "public void createMenus()\n {\n EventQueueUtilities.runOnEDT(this::createMenusNow);\n }", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n this.menu = menu;\n publicMenuItem = menu.findItem(R.id.action_public_invites);\n privateMenuItem = menu.findItem(R.id.action_private_invites);\n if(savedDbQuery){\n publicMenuItem.setVisible(true);\n privateMenuItem.setVisible(false);\n }else{\n publicMenuItem.setVisible(false);\n privateMenuItem.setVisible(true);\n }\n publicMenuItem = menu.findItem(R.id.action_public_invites);\n privateMenuItem = menu.findItem(R.id.action_private_invites);\n return true;\n }", "public void exitToMenu()\n {\n exitToMenuFlag = true;\n }", "private void updateMenuItems()\r\n\t {\r\n\t\t setListAdapter(new ArrayAdapter<String>(this,\r\n\t\t android.R.layout.simple_list_item_1, home_menu));\r\n\t\t \t \r\n\t }", "public void menu(){\n super.goToMenuScreen();\n }", "public void \n updateMenus()\n {\n UIMaster master = UIMaster.getInstance();\n UICache cache = master.getUICache(pChannel);\n try {\n String tname = cache.getCachedDefaultToolsetName();\n master.updateEditorPluginField(pChannel, tname, pField);\n }\n catch(PipelineException ex) {\n master.showErrorDialog(ex);\n }\n }", "public void menuItemHasChanged(Object sender, MenuItem item) {\n // Called every time any menu item changes\n }", "public void test_setMenuLorg_eclipse_swt_widgets_Menu () {\n\tcontrol.setMenu(null);\n\n\tMenu m = new Menu(control);\n\tcontrol.setMenu(m);\n\tassertEquals(m, control.getMenu());\n}", "private void displayMenu() {\r\n\t\tif (this.user instanceof Administrator) {\r\n\t\t\tnew AdminMenu(this.database, (Administrator) this.user);\r\n\t\t} else {\r\n\t\t\tnew BorrowerMenu(this.database);\r\n\t\t}\r\n\t}", "private void updateMenuTitles() {\n boolean isFollow = MainActivity.discussionsImIn.contains(discussionTableName);\n menu.findItem(R.id.settings_follow).setVisible(!isFollow);\n menu.findItem(R.id.settings_unfollow).setVisible(isFollow);\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n if (fragments[SELECTION].isVisible()) {\n if (menu.size() == 0) {\n settings = menu.add(R.string.settings);\n }\n return true;\n } else {\n menu.clear();\n settings = null;\n }\n return false;\n }", "@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}", "public boolean useInternalMenu() {\n return _use_internal_menu;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n menu.clear();\n getMenuInflater().inflate(R.menu.top_menu, menu);\n return true;\n }", "protected void createMenus(Activity activity, boolean isEntryPoint){\n \t\t\n \t\t//myTts = new TextToSpeechBeta(this, ttsInitListener);\n \t\t\n \t\tthis.isEntryPoint = isEntryPoint;\n \t\tthis.activity = activity;\n \t\t\n \t\tApplicationData applicationData = SplashActivity.getApplicationData();\n \t\tActiveMenus activeMenus = applicationData.getMenu();\n \t\t\n \t\t//TOP MENU\n \t\tif(activeMenus.getTopMenu() != null){\n \t\t\tRelativeLayout topLayout = (RelativeLayout) findViewById(R.id.topLayout);\n \t\t\tcreateCurrentMenu(topLayout, activeMenus.getTopMenu());\n \t\t}\n \t\t\n \t\t//BOTTOM MENU\n \t\tRelativeLayout bottomLayout = (RelativeLayout) findViewById(R.id.bottomLayout);\t\n \t\tif(activeMenus.getBottomMenu() != null){\n \t\t\tcreateCurrentMenu(bottomLayout, activeMenus.getBottomMenu());\n \t\t}else{\n \t\t\tbottomLayout.setVisibility(0);\n \t\t}\n \t\t\n \t\t//CONTEXT MENU\n \t\tif(activeMenus.getContextMenu() != null){\n \t\t\tthis.contextMenuXmlFileName = activeMenus.getContextMenu();\n \t\t}\n \t\t\n \t\t//SIDE MENU\n \t\tif(activeMenus.getSideMenu() != null){\n \t\t\tinitializeSideMenuList(activeMenus.getSideMenu());\n \t\t}\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.order_list_actions,menu);\n if(isFinalized){\n MenuItem item = menu.findItem(R.id.action_finalized);\n item.setVisible(false);\n //this.invalidateOptionsMenu();\n }\n return super.onCreateOptionsMenu(menu);\n }", "private static void menu() {\n\t\tboolean finished = false;\n\t\tdo {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"If you would like to view a current the movies on the movie list, please type \\\"all\\\" \\nIf you would like to see a list of the initial possible categories, please type \\\"categories\\\" \\n\\nTo search for films by category, please type the category, now\\nTo exit the program, just type \\\"no\\\"\");\n\t\t\tString menAns = read.nextLine();\n\t\t\tif (menAns.equalsIgnoreCase(\"all\")) {\n\t\t\t\tlistFormat();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"categories\") || menAns.equalsIgnoreCase(\"cats\")) {\n\t\t\t\tcatList();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"no\")) {\n\t\t\t\tfinished = true;\n\t\t\t} else {\n\t\t\t\tseachCats(menAns);\n\t\t\t}\n\t\t} while (!finished);\n\n\t}", "private void createMenus() {\r\n\t\t// File menu\r\n\t\tmenuFile = new JMenu(Constants.C_FILE_MENU_TITLE);\r\n\t\tmenuBar.add(menuFile);\r\n\t\t\r\n\t\tmenuItemExit = new JMenuItem(Constants.C_FILE_ITEM_EXIT_TITLE);\r\n\t\tmenuItemExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tactionOnClicExit();\t\t// Action triggered when the Exit item is clicked.\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuFile.add(menuItemExit);\r\n\t\t\r\n\t\t// Help menu\r\n\t\tmenuHelp = new JMenu(Constants.C_HELP_MENU_TITLE);\r\n\t\tmenuBar.add(menuHelp);\r\n\t\t\r\n\t\tmenuItemHelp = new JMenuItem(Constants.C_HELP_ITEM_HELP_TITLE);\r\n\t\tmenuItemHelp.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemHelp);\r\n\t\t\r\n\t\tmenuItemAbout = new JMenuItem(Constants.C_HELP_ITEM_ABOUT_TITLE);\r\n\t\tmenuItemAbout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicAbout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemAbout);\r\n\t\t\r\n\t\tmenuItemReferences = new JMenuItem(Constants.C_HELP_ITEM_REFERENCES_TITLE);\r\n\t\tmenuItemReferences.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicReferences();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemReferences);\r\n\t}", "private void fixMenus() {\n\t\tfixFileOption();\n\t\tfixDelayOption();\n\t\tfixFormatOption();\n\t\tfixHelpOption();\n\t\t\n\t}", "private void createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (isLoggedIn()) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n } else {\n return false;\n }\n }", "public void initializeMenuItems() {\n\t\tuserMenuButton = new MenuButton();\n\t\tmenu1 = new MenuItem(bundle.getString(\"mVmenu1\")); //\n\t\tmenu2 = new MenuItem(bundle.getString(\"mVmenu2\")); //\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n mOption = menu;\n getMenuInflater().inflate(R.menu.menu, menu);\n int menunya = sharedpreferences.getInt(\"menu\", 0);\n SharedPreferences.Editor editor = sharedpreferences.edit();\n if (menunya == 0) {\n editor.putInt(\"menu\", 2);\n editor.commit();\n f2.setVisibility(View.VISIBLE);\n f3.setVisibility(View.GONE);\n navigation.setSelectedItemId(R.id.navigation_dashboard);\n } else if (menunya == 2) {\n f2.setVisibility(View.VISIBLE);\n f3.setVisibility(View.GONE);\n navigation.setSelectedItemId(R.id.navigation_dashboard);\n } else if (menunya == 3) {\n f2.setVisibility(View.GONE);\n f3.setVisibility(View.VISIBLE);\n navigation.setSelectedItemId(R.id.navigation_notifications);\n } else {\n editor.putInt(\"menu\", 2);\n editor.commit();\n f2.setVisibility(View.VISIBLE);\n f3.setVisibility(View.GONE);\n }\n return true;\n }", "public void prepareIdemen(ActionEvent event) {\n Submenu selected = this.getSelected();\n if (selected != null && idemenController.getSelected() == null) {\n idemenController.setSelected(selected.getIdemen());\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.admin_login, menu);\n if(sharedPreferences.getString(\"clearanceLevel\",\"\")!=null){\n menu.removeItem(R.id.action_admin_login);\n }else{\n menu.removeItem(R.id.action_admin_logout);\n }\n return true;\n }", "private void updateMenu() {\n if(customMenu || !menuDirty) {\n return;\n }\n \n // otherwise, reset up the menu.\n menuDirty = false;\n menu.removeAll();\n Icon emptyIcon = null; \n for(Action action : actions) {\n if(action.getValue(Action.SMALL_ICON) != null) {\n emptyIcon = new EmptyIcon(16, 16);\n break;\n }\n }\n \n selectedComponent = null;\n selectedLabel = null;\n \n for (Action action : actions) {\n \n // We create the label ourselves (instead of using JMenuItem),\n // because JMenuItem adds lots of bulky insets.\n\n ActionLabel menuItem = new ActionLabel(action);\n JComponent panel = wrapItemForSelection(menuItem);\n \n if (action != selectedAction) {\n panel.setOpaque(false);\n menuItem.setForeground(UIManager.getColor(\"MenuItem.foreground\"));\n } else {\n selectedComponent = panel;\n selectedLabel = menuItem;\n selectedComponent.setOpaque(true);\n selectedLabel.setForeground(UIManager.getColor(\"MenuItem.selectionForeground\"));\n }\n \n if(menuItem.getIcon() == null) {\n menuItem.setIcon(emptyIcon);\n }\n attachListeners(menuItem);\n decorateMenuComponent(menuItem);\n menuItem.setBorder(BorderFactory.createEmptyBorder(0, 6, 2, 6));\n\n menu.add(panel);\n }\n \n if (getText() == null) {\n menu.add(Box.createHorizontalStrut(getWidth()-4));\n } \n \n for(MenuCreationListener listener : menuCreationListeners) {\n listener.menuCreated(this, menu);\n }\n }", "@Test\n\tpublic void addMenu_2Test() throws Exception {\n\t\tif (Configuration.shufflerepeat &&\n\t\t\t\tConfiguration.featureamp&&\n\t\t\t\tConfiguration.playengine&&\n\t\t\t\tConfiguration.gui&&\n\t\t\t\tConfiguration.skins&&\n\t\t\t\tConfiguration.light &&\n\t\t\t\t!Configuration.loadfolder &&\n\t\t\t\t!Configuration.choosefile &&\n\t\t\t\t!Configuration.saveandloadplaylist) {\t\n\t\t\tstart();\n\t\t\tgui.addMenu();\n\t\t\tJMenu menu = (JMenu) MemberModifier.field(Application.class, \"menu\").get(gui);\n\t\t\tassertNotNull(menu);\n\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t//a partir de aqui comenzar a llamar a los layouts \t\t\n\t\tcurrent_location();\n\t\t\n\t\t\n\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n return super.onPrepareOptionsMenu(menu);\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n return super.onPrepareOptionsMenu(menu);\n }", "public static void proManagerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Project Manager's Information\");\n System.out.println(\"2 - Would you like to search for a Project Manager's information\");\n System.out.println(\"3 - Adding a new Project Manager's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "public boolean validateMenuItems(CwSession cwSession){\n idAnyNonExistingCpMenuItem(cwSession)\n .ifPresent(id -> {throw new RecordNotFoundException(String.format(MENU_ITEM_NOT_FOUND_WITH_ID,id));});\n return true;\n }", "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 }", "@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\treturn super.onPrepareOptionsMenu(menu);\n\t}", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n //boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n //menu.findItem(<MENU_ITEMS>).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(uk.echosoft.garage.opener.R.menu.menu_status, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (navItemIndex == 0) {\n getMenuInflater().inflate(R.menu.main, menu);\n }\n\n // when fragment is notifications, load the menu created for notifications\n if (navItemIndex == 3) {\n// getMenuInflater().inflate(R.menu.notifications, menu);\n }\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.empty_menu, menu);\n return true;\n }", "public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.seach_history_menu, menu);\n\n menu.findItem(R.id.clean_history);\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(android.view.Menu menu) {\n super.onCreateOptionsMenu(menu);\n MenuInflater blowUp = getMenuInflater();\n blowUp.inflate(R.menu.menu_start, menu);\n return true;\n }", "public startingMenu() {\r\n initComponents();\r\n }", "public void clearMenuItems() {\n menuItemNames.clear();\n menuItemPrices.clear();\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.empty_menu, menu);\r\n\t\treturn true;\r\n\t}", "public void menu()\r\n\t{\r\n\t\t//TODO\r\n\t\t//Exits for now\r\n\t\tSystem.exit(0);\r\n\t}", "private void initMenuBar() {\r\n\t\t// file menu\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic(KeyEvent.VK_F);\r\n\t\tadd(fileMenu);\r\n\r\n\t\tJMenuItem fileNewMenuItem = new JMenuItem(new NewAction(parent, main));\r\n\t\tfileNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileNewMenuItem);\r\n\t\tJMenuItem fileOpenMenuItem = new JMenuItem(new OpenAction(parent, main));\r\n\t\tfileOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileOpenMenuItem);\r\n\r\n\t\tJMenuItem fileSaveMenuItem = new JMenuItem(new SaveAction(main));\r\n\t\tfileSaveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveMenuItem);\r\n\t\tJMenuItem fileSaveAsMenuItem = new JMenuItem(new SaveAsAction(main));\r\n\t\tfileSaveAsMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveAsMenuItem);\r\n\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.addSeparator();\r\n\r\n\t\tJMenuItem exitMenuItem = new JMenuItem(new ExitAction(main));\r\n\t\texitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(exitMenuItem);\r\n\r\n\t\t// tools menu\r\n\t\tJMenu toolsMenu = new JMenu(\"Application\");\r\n\t\ttoolsMenu.setMnemonic(KeyEvent.VK_A);\r\n\t\tadd(toolsMenu);\r\n\r\n\t\tJMenuItem defineCategoryMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineCategoryAction());\r\n\t\tdefineCategoryMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_C, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineCategoryMenuItem);\r\n\t\tJMenuItem defineBehaviorNetworkMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineBehaviorNetworkAction());\r\n\t\tdefineBehaviorNetworkMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_B, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineBehaviorNetworkMenuItem);\r\n\t\tJMenuItem startSimulationMenuItem = new JMenuItem(\r\n\t\t\t\tnew StartSimulationAction(main));\r\n\t\tstartSimulationMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_E, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(startSimulationMenuItem);\r\n\r\n\t\t// help menu\r\n\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\thelpMenu.setMnemonic(KeyEvent.VK_H);\r\n\t\tadd(helpMenu);\r\n\r\n\t\tJMenuItem helpMenuItem = new JMenuItem(new HelpAction(parent));\r\n\t\thelpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\thelpMenu.add(helpMenuItem);\r\n\r\n\t\t// JCheckBoxMenuItem clock = new JCheckBoxMenuItem(new\r\n\t\t// ScheduleSaveAction(parent));\r\n\t\t// helpMenu.add(clock);\r\n\t\thelpMenu.addSeparator();\r\n\t\tJMenuItem showMemItem = new JMenuItem(new ShowMemAction(parent));\r\n\t\thelpMenu.add(showMemItem);\r\n\r\n\t\tJMenuItem aboutMenuItem = new JMenuItem(new AboutAction(parent));\r\n\t\thelpMenu.add(aboutMenuItem);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);\r\n FirebaseUser currentUser = mAuth.getCurrentUser();\r\n MenuItem itemLogin = menu.findItem(R.id.login);\r\n MenuItem itemLogout = menu.findItem(R.id.logout);\r\n if (currentUser != null) {\r\n itemLogin.setVisible(false);\r\n itemLogout.setVisible(true);\r\n } else {\r\n itemLogin.setVisible(true);\r\n itemLogout.setVisible(false);\r\n }\r\n return true;\r\n }", "@Override\n public void menuSelected(MenuEvent e) {\n \n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n itemIdMSCSM = menu.findItem(R.id.action_registration);\n itemAutoReg = menu.findItem(R.id.action_auto_reg);\n itemExit = menu.findItem(R.id.action_exit);\n itemRegister = menu.findItem(R.id.action_register);\n if (registered) {\n itemIdMSCSM.setVisible(false);\n itemAutoReg.setVisible(false);\n itemExit.setVisible(false);\n } else {\n itemIdMSCSM.setVisible(true);\n itemAutoReg.setVisible(true);\n itemExit.setVisible(true);\n }\n return true;\n }", "private void comparisonMenu() {\n comparisonMenuOptions();\n\n try {\n handeComparisonMenuCommands();\n } catch (Exception ex) {\n System.out.println(\"\\nYou must create the array first\\n\");\n }\n }", "private void MenuHOOKS() {\n drawerLayout = findViewById(R.id.drawer_layout);\n navigationView = findViewById(R.id.navigation_view);\n burger_icon = findViewById(R.id.burger_icon);\n contentView = findViewById(R.id.content);\n\n //Navigation Drawer\n navigationView.bringToFront();\n navigationView.setNavigationItemSelectedListener(this);\n navigationView.setCheckedItem(R.id.nav_home);\n\n burger_icon.setOnClickListener(this);\n\n //Animation Function\n animateNavigationDrawer();\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_sys, menu);\n return true;\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n\treturn super.onPrepareOptionsMenu(menu);\n\n }", "private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(\"About\");\n \n bar.add(fileMenu);\n bar.add(crawlerMenu);\n bar.add(aboutMenu);\n \n exit = new JMenuItem(\"Exit\");\n preferences = new JMenuItem(\"Preferences\");\n author = new JMenuItem(\"Author\");\n startCrawlerItem = new JMenuItem(\"Start\");\n stopCrawlerItem = new JMenuItem(\"Stop\");\n newIndexItem = new JMenuItem(\"New index\");\n openIndexItem = new JMenuItem(\"Open index\");\n \n stopCrawlerItem.setEnabled(false);\n \n fileMenu.add(newIndexItem);\n fileMenu.add(openIndexItem);\n fileMenu.add(exit);\n aboutMenu.add(author);\n crawlerMenu.add(startCrawlerItem);\n crawlerMenu.add(stopCrawlerItem);\n crawlerMenu.add(preferences);\n \n author.addActionListener(this);\n preferences.addActionListener(this);\n exit.addActionListener(this);\n startCrawlerItem.addActionListener(this);\n stopCrawlerItem.addActionListener(this);\n newIndexItem.addActionListener(this);\n openIndexItem.addActionListener(this);\n \n frame.setJMenuBar(bar);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_commonone, menu);\n MenuItem item3 = menu.findItem(R.id.messager);\n MenuItem item4 = menu.findItem(R.id.search);\n item3.setIcon(R.drawable.openmessage);\n item4.setIcon(R.drawable.search);\n try{\n if (loggedIn.equals(\"noValue\")) {\n\n\n item3.setVisible(false);\n\n } else {\n\n item3.setVisible(true);\n\n }}\n catch (Exception e){\n\n }\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (currentFragment == HOME_FRAGMENT) {\n getMenuInflater().inflate(R.menu.main, menu);\n }\n return true;\n }", "private void backToMenu()\n\t{\n\t\t//switch to menu screen\n\t\tgame.setScreen(new MenuScreen(game));\n\t}", "private void init() {\n StateManager.setState(new MenuState());\n }", "private void prepareNavigationMenu() {\n navigationView.setNavigationItemSelectedListener(this);\n\n Menu menu = navigationView.getMenu();\n if(routeSelected != -1) {\n menu.findItem(R.id.nav_map).setVisible(true);\n }\n menu.findItem(R.id.nav_userpanel).setVisible(false);\n }", "protected boolean onMenuItemSelected(int menuItemId) {\r\n\t\treturn false;\r\n\t}", "public void checkEnabled(Activity context) {\r\n if(menuShown)\r\n this.show(context,false);\r\n }", "private void menuSetup()\n {\n menuChoices = new String []\n {\n \"Add a new product\",\n \"Remove a product\",\n \"Rename a product\",\n \"Print all products\",\n \"Deliver a product\",\n \"Sell a product\",\n \"Search for a product\",\n \"Find low-stock products\",\n \"Restock low-stock products\",\n \"Quit the program\" \n };\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.other_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_availability, menu);\n return true;\n }", "private void setupMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t// Build the first menu.\n\t\tJMenu menu = new JMenu(Messages.getString(\"Gui.File\")); //$NON-NLS-1$\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenuBar.add(menu);\n\n\t\t// a group of JMenuItems\n\t\tJMenuItem menuItem = new JMenuItem(openAction);\n\t\tmenu.add(menuItem);\n\n\t\t// menuItem = new JMenuItem(openHttpAction);\n\t\t// menu.add(menuItem);\n\n\t\t/*\n\t\t * menuItem = new JMenuItem(crudAction); menu.add(menuItem);\n\t\t */\n\n\t\tmenuItem = new JMenuItem(showLoggingFrameAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(quitAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuBar.add(menu);\n\n\t\tJMenu optionMenu = new JMenu(Messages.getString(\"Gui.Options\")); //$NON-NLS-1$\n\t\tmenuItem = new JCheckBoxMenuItem(baselineModeAction);\n\t\toptionMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(toggleButtonsAction);\n\t\toptionMenu.add(menuItem);\n\n\t\tmenuBar.add(optionMenu);\n\t\tJMenu buttonMenu = new JMenu(Messages.getString(\"Gui.Buttons\")); //$NON-NLS-1$\n\t\tmenuItem = new JMenuItem(wrongAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(attendingAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(independentAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(verbalAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(modelingAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(noAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuBar.add(buttonMenu);\n\t\tframe.setJMenuBar(menuBar);\n\n\t\tframe.pack();\n\n\t\tframe.setVisible(true);\n\t}", "private void goToMenu() {\n\t\tgame.setScreen(new MainMenuScreen(game));\n\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.patients_not_seen, menu);\n\t\treturn true;\n\t\t\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.fake_main, menu);\n this.menu = 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 }" ]
[ "0.72351044", "0.70034194", "0.7001473", "0.69131553", "0.6865396", "0.68343145", "0.67816955", "0.67761445", "0.6752392", "0.67431295", "0.6711238", "0.6669647", "0.6603265", "0.65867203", "0.6549892", "0.6538394", "0.652291", "0.6519407", "0.651574", "0.6429915", "0.64180773", "0.63776714", "0.637754", "0.63337654", "0.6325445", "0.632508", "0.6322631", "0.63150436", "0.6294667", "0.62942934", "0.62893856", "0.628536", "0.6269479", "0.6264986", "0.6258566", "0.6239448", "0.623492", "0.6234885", "0.6233703", "0.62107193", "0.6205359", "0.6185005", "0.6183978", "0.6183015", "0.61624527", "0.6155301", "0.6148818", "0.6148072", "0.6147894", "0.614652", "0.61377954", "0.6137395", "0.6136177", "0.6114743", "0.61111504", "0.61097723", "0.6107669", "0.61061144", "0.6091087", "0.6091087", "0.60907", "0.6080431", "0.60798585", "0.6076925", "0.6075087", "0.60748327", "0.60729384", "0.60675365", "0.60667485", "0.6066373", "0.60636055", "0.60545766", "0.6054101", "0.6053559", "0.60523975", "0.6050188", "0.6049344", "0.60478103", "0.60470355", "0.6041666", "0.60343367", "0.60330164", "0.60324925", "0.6029315", "0.6023316", "0.60214144", "0.6020809", "0.6015911", "0.6014414", "0.60120904", "0.60112005", "0.60104114", "0.600793", "0.600762", "0.60073066", "0.6006996", "0.60034794", "0.6001618", "0.59994537", "0.5995897" ]
0.6334683
23
ViewOptionsDialog Set up the fields and show the dialog
public void setupAndShow() { fMaxTextField.setText(BarGraphDisplayer.this.getMaxLabel()); fMinTextField.setText(BarGraphDisplayer.this.getMinLabel()); fMinTextField.selectAll(); fMinTextField.requestFocus(); this.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "public void viewOptions()\r\n {\r\n SetupScreen setupScreen = new SetupScreen();\r\n pushScreen(setupScreen);\r\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\toptionsDialog();\r\n\t\t\t}", "public void showOptions() {\n frame.showOptions();\n }", "public void showOptions()\n {\n //make the options window visible\n optionsScreen.setVisible(true);\n }", "private static void viewOptions() {\n\t\tlog.info(\"Enter 0 to Exit.\");\n\t\tlog.info(\"Enter 1 to Login.\");\n\t}", "public void showViewAddDirection(){\n JDialog dialogAddDirections = new JDialog();\n\n \n dialogAddDirections.setContentPane(addressView);\n new AddressController(addressView);\n dialogAddDirections.setLocationRelativeTo(null);\n dialogAddDirections.pack();\n dialogAddDirections.setVisible(true);\n }", "private DialogJoinOptions showOptionsDialog() {\n DialogJoinOptions optionsDialog = new DialogJoinOptions();\n\n // Load and init dialog options from preferences\n optionsDialog.setGlue(Preferences.getJoinGlue());\n\n optionsDialog.addComponentListener(new ComponentListenerDialog(Preferences.ID_DIALOG_JOIN));\n UtilsEnvironment.setDialogVisible(editor, Preferences.ID_DIALOG_JOIN, optionsDialog, StaticTexts.MESSAGE_TITLE_JOIN);\n\n return optionsDialog;\n }", "public DriftSwing() {\n initComponents();\n \n // Create an invisible options dialog to initialize options\n options = new OptionsDialog(this);\n }", "public void showOptions() {\n\t\tCIVLTable tbl_optionTable = (CIVLTable) getComponentByName(\"tbl_optionTable\");\n\t\tDefaultTableModel optionModel = (DefaultTableModel) tbl_optionTable\n\t\t\t\t.getModel();\n\n\t\tif (optionModel.getRowCount() != 0) {\n\t\t\toptionModel.setRowCount(0);\n\t\t\ttbl_optionTable.clearSelection();\n\t\t\ttbl_optionTable.revalidate();\n\t\t}\n\n\t\tGMCSection section = currConfig.getGmcConfig().getSection(\n\t\t\t\tGMCConfiguration.ANONYMOUS_SECTION);\n\t\tObject[] opts = currConfig.getGmcConfig().getOptions().toArray();\n\t\tCollection<Option> options = currConfig.getGmcConfig().getOptions();\n\t\tIterator<Option> iter_opt = options.iterator();\n\t\tList<Object> vals = new ArrayList<Object>();\n\n\t\twhile (iter_opt.hasNext()) {\n\t\t\tOption curr = iter_opt.next();\n\t\t\tvals.add(section.getValueOrDefault(curr));\n\t\t}\n\n\t\t// Sets all of the default-ize buttons\n\t\tnew ButtonColumn(tbl_optionTable, defaultize, 2);\n\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tOption currOpt = (Option) opts[i];\n\t\t\t/*\n\t\t\t * if (currOpt.name().equals(\"sysIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"sysIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t * \n\t\t\t * else if (currOpt.name().equals(\"userIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"userIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t */\n\t\t\t// else {\n\t\t\toptionModel\n\t\t\t\t\t.addRow(new Object[] { currOpt, vals.get(i), \"Default\" });\n\t\t\t// }\n\t\t}\n\t}", "@Override\n\tpublic FileSelectDialog setView(View view) {\n\t\tthrow new Error(\"You cannot customize the view of a FileSelectDialog, \" +\n\t\t\t\t\"this feature would override the actual list\");\n\t}", "private void editArguments() {\n\t\tDialog d = new EditArgumentsDialog(creator.modpack.minecraft.arguments, frame, true);\n\t\td.setVisible(true);\n\t}", "public void showOptions() {\n this.popupWindow.showAtLocation(this.layout, 17, 0, 0);\n this.customview.findViewById(R.id.dialog).setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n this.pdf.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity discussionActivity = DiscussionActivity.this;\n discussionActivity.type = \"pdf\";\n discussionActivity.showPdfChooser();\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n this.img.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity discussionActivity = DiscussionActivity.this;\n discussionActivity.type = ContentTypes.EXTENSION_JPG_1;\n discussionActivity.showImageChooser();\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n this.cancel.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n }", "@DISPID(1610743816) //= 0x60020008. The runtime will prefer the VTID if present\r\n @VTID(15)\r\n int viewOptions();", "public void openOptionsWindow() {\n\t\tthis.dispose();\t//built-in method to destroy this GUI.\n\t\tnew SARMain().setVisible(true);\n\t}", "private void showHelpDialog() {\n\n view.helpDialog();\n }", "public SelectionDialog(HarmonyModel harmonyModel, Integer mode)\r\n\t{\r\n\t\tsuper((mode==SELECT ? \"Select\" : \"Remove\") + \" Links\");\r\n\t\tthis.harmonyModel = harmonyModel;\r\n\t\tthis.mode = mode;\r\n\t\t\r\n\t\t// Initialize the type filter\r\n\t\ttypeFilter = new OptionPane(\"Type\",new String[]{\"All\",\"User\",\"System\"});\r\n\t\ttypeFilter.setBorder(new EmptyBorder(0,20,0,0));\r\n\t\ttypeFilter.setSelectedButton(\"All\");\r\n\t\t\r\n\t\t// Initialize the focus filter\r\n\t\tfocusFilter = new OptionPane(\"Focus\",new String[]{\"All\",\"Focused\",\"Unfocused\"});\r\n\t\tfocusFilter.setBorder(new EmptyBorder(0,13,0,0));\r\n\t\tfocusFilter.setSelectedButton(mode==SELECT ? \"Focused\" : \"All\");\r\n\t\tfocusFilter.setEnabled(mode==DELETE);\r\n\r\n\t\t// Initialize the visibility filter\r\n\t\tvisibilityFilter = new OptionPane(\"Visibility\",new String[]{\"All\",\"Visible\",\"Hidden\"});\t\t\r\n\t\tvisibilityFilter.setSelectedButton(mode==SELECT ? \"Visible\" : \"All\");\r\n\t\tvisibilityFilter.setEnabled(mode==DELETE);\r\n\t\t\r\n\t\t// Create the info pane\r\n\t\tJPanel infoPane = new JPanel();\r\n\t\tinfoPane.setBorder(new CompoundBorder(new EmptyBorder(5,5,0,5),new CompoundBorder(new LineBorder(Color.gray),new EmptyBorder(5,5,5,5))));\r\n\t\tinfoPane.setLayout(new GridLayout(3,1));\r\n\t\tinfoPane.add(typeFilter);\r\n\t\tinfoPane.add(focusFilter);\r\n\t\tinfoPane.add(visibilityFilter);\r\n\t\t\r\n\t\t// Generate the main dialog pane\r\n\t\tJPanel pane = new JPanel();\r\n\t\tpane.setBorder(BorderFactory.createLineBorder(Color.black));\r\n\t\tpane.setLayout(new BorderLayout());\r\n\t\tpane.add(infoPane,BorderLayout.CENTER);\r\n\t\tpane.add(new ButtonPane(),BorderLayout.SOUTH);\r\n\t\t\r\n\t\t// Initialize the dialog parameters\r\n\t\tsetContentPane(pane);\r\n\t\tsetSize(200,250);\r\n\t\tpack();\r\n\t\tsetVisible(true);\r\n\t}", "public void options() {\n\n audio.playSound(LDSound.SMALL_CLICK);\n if (canViewOptions()) {\n Logger.info(\"HUD Presenter: options\");\n uiStateManager.setState(GameUIState.OPTIONS);\n }\n }", "public ViewDetalleVentas() {\n initComponents();\n }", "public void RefreshOptions() {\n setContentView(mMainView);\n mSolitaireView.RefreshOptions();\n }", "public void showOptionsPanel(){\n optionsPanel.showOptionsPanel();\n if(!optionsPanel.isVisible() && iconPanel.isVisible()) iconPanel.setVisible(false);\n if(optionsPanel.isVisible()&& mapTypePanel.isVisible()) mapTypePanel.setVisible(false);\n if(routePanel.isVisible()) routePanel.setVisible(false); closeDirectionList();\n canvas.repaint();\n }", "public void initView() {\n JPanel pane= new JPanel();\n panel = new JPanel();\n this.getFile(pane);\n JScrollPane scp = new JScrollPane(pane);\n scp.setPreferredSize(new Dimension(500, 280));\n scp.setVisible(true);\n enter.setPreferredSize(new Dimension(100, 50));\n enter.setVisible(true);\n enter.setActionCommand(\"enter\");\n enter.addActionListener(this);\n send.setPreferredSize(new Dimension(80, 50));\n send.setVisible(true);\n send.setActionCommand(\"sendOptions\");\n send.addActionListener(this);\n send.setEnabled(true);\n back.setVisible(true);\n back.setActionCommand(\"back\");\n back.addActionListener(this);\n back.setPreferredSize(new Dimension(80, 50));\n \n panel.add(scp);\n panel.add(send);\n panel.add(enter);\n panel.add(back);\n Launch.frame.add(panel);\n }", "public void showVerifyTravelExpenseDialog() {\n\n\t\t\tverifyTravelExpenseDialogBox = new DialogBox(true);\n\t\t\tverifyTravelExpenseDialogBox.setGlassEnabled(true);\n\t\t\tverifyTravelExpenseDialogBox.setText(\"Comprobación de Viáticos.\");\n\n\t\t\tVerticalPanel vp = new VerticalPanel();\n\t\t\tvp.setSize(\"400px\", \"100px\");\n\t\t\tverifyTravelExpenseDialogBox.setWidget(vp);\n\n\t\t\tUiRequisitionCheekingCostsForm uiRequisitionCheekingCostsForm = new UiRequisitionCheekingCostsForm(getUiParams(), vp, bmoRequisition);\n\t\t\tuiRequisitionCheekingCostsForm.show();\n\n\t\t\tverifyTravelExpenseDialogBox.center();\n\t\t\tverifyTravelExpenseDialogBox.show();\n\t\t}", "public View() {\n initComponents();\n Paypal.setVisible(false);\n MasterCard.setVisible(false);\n Visa.setVisible(false);\n setLocationRelativeTo(null);\n setResizable(false);\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n generarFacturaBoton.setVisible(false);\n }", "private void showAboutDialog() {\n\n view.aboutDialog();\n }", "public Devolucao_View() {\n initComponents();\n devrecebido.setVisible(false);\n }", "public OptionPane() {\n\t\t\n\t\tinit();\n\t}", "public OptionsPanel() {\n initComponents();\n }", "public OptionsMenu() {\n\t\tsuper(OPTIONS_WINDOW_TITLE);\n\t\tQ = new Quoridor();\n\t\tinitialize();\n\t\tsetVisible(true);\n\t}", "public SchemaViewController( SchemaView view )\n {\n this.view = view;\n viewer = view.getViewer();\n \n initActions();\n initToolbar();\n initMenu();\n initContextMenu();\n initProjectsHandlerListener();\n initDoubleClickListener();\n initAuthorizedPrefs();\n initPreferencesListener();\n }", "public OPTION() {\n initComponents();\n setVisible(true);\n setBounds(500,190,575,400);\n }", "public StartSettingsView() {\n\n super();\n super.setTitle(\"Settings\");\n\n this.createPatientsComboBox();\n this.createButtons();\n\n super.setLayouts(0.2f, 0.2f,0,0.6f);\n\n\t}", "public SimulatorHelpDialog() {\n super((Frame)null, true);\n initComponents();\n initialize();\n }", "public frmVerzamelingBeheer() {\n try {\n initComponents();\n \n lblId.setVisible(false);\n\n pnlEdit.setVisible(false);\n\n for (VerzamelingsType type : TypeService.GetAllTypes()) {\n cmbType.addItem(new VerzamelingsType(type.getId(), type.getNaam()));\n cmbEditType.addItem(new VerzamelingsType(type.getId(), type.getNaam()));\n }\n\n \n for (Categorie categorie : CategorieService.GetAllCategories()) {\n cmbCategorie.addItem(new Categorie(categorie.getId(), categorie.getNaam()));\n cmbEditCategorie.addItem(new Categorie(categorie.getId(), categorie.getNaam()));\n }\n \n //vertaling voor JOptionpane\n UIManager.put(\"OptionPane.cancelButtonText\", \"Annuleren\");\n UIManager.put(\"OptionPane.noButtonText\", \"Nee\");\n UIManager.put(\"OptionPane.okButtonText\", \"Oke\");\n UIManager.put(\"OptionPane.yesButtonText\", \"Ja\");\n \n this.setTitle(\"Verzamelingen beheren - Verzamelingenbeheer\");\n \n ShowEditItems(false);\n RefreshList();\n }\n catch (ExceptionInInitializerError ex)\n {\n JOptionPane.showMessageDialog(null, \"Er kan geen verbinding worden gemaakt met de database (\" + ex.getMessage() + \").\", \"Fout\", ERROR_MESSAGE);\n System.exit(1);\n }\n\n }", "public PromotionForm(PromotionView promotionView, BookingRepository bookingRepo) {\n\t\tthis.promotionView = promotionView;\n\n\t\tselect.setLeftColumnCaption(\"Available options\");\n\t\tselect.setRightColumnCaption(\"Selected options\");\n\n\t\tbinder.bind(description, Promotion::getDescription, Promotion::setDescription);\n\t\tbinder.bind(type, Promotion::getType, Promotion::setType);\n\t\tbinder.bind(discount, Promotion::getDiscount, Promotion::setDiscount);\n\t\tbinder.bind(customer_quota, Promotion::getCustomer_quota, Promotion::setCustomer_quota);\n\t\tbinder.bind(overall_quota, Promotion::getOverall_quota, Promotion::setOverall_quota);\n\n\t\t//Get relevant tour offering ids\n\t\tList<Booking> bookings = bookingRepo.findAll();\n\t\tList<String> bookingIds = new ArrayList<>();\n\t\tfor(Booking booking: bookings) {\n\t\t\tbookingIds.add(booking.getBooking_id());\n\t\t}\n\t\tselect.setItems(bookingIds);\n\n\t\t// Few items, so we can set rows to match item count\n\t\tselect.setRows(5);\n\n\t\tsetSizeUndefined();\n\t\tHorizontalLayout buttons = new HorizontalLayout(save, close);\n\t\tHorizontalLayout row1 = new HorizontalLayout(description, type, discount);\n\t\tdescription.setSizeFull();\n\t\tHorizontalLayout row2 = new HorizontalLayout(deadline, customer_quota,\n\t\t\t\toverall_quota);\n\n\t\taddComponents(row1, row2, select,buttons);\n\n\t\tsave.setStyleName(ValoTheme.BUTTON_PRIMARY);\n\t\tsave.setClickShortcut(KeyCode.ENTER);\n\n\t\tsave.addClickListener(e -> save());\n\t\tclose.addClickListener(e -> setVisible(false));\n\n\t}", "public void openDialogCreateVisual(){\n DataHeader[] tabHeader = dataset.getListDataHeaderDouble(true);\n TypeVisualization[] tabVis = getListTypeVisualization(tabHeader.length);\n DataHeader[] tabHeaderLabel = dataset.getListDataHeaderDouble(false);\n CreateDataVisualDialog dialog = new CreateDataVisualDialog(this, tabVis, tabHeader, tabHeaderLabel);\n dialog.setVisible(true);\n }", "public void initDialogBoxViews(View mView) {\n trailName = (EditText) mView.findViewById(R.id.TrailNametxt);\n trailCode = (EditText) mView.findViewById(R.id.TrailCodetxt);\n module = (EditText) mView.findViewById(R.id.Moduletxt);\n trailDate = (EditText) mView.findViewById(R.id.datetxt);\n addtrailBtn = (Button) mView.findViewById(R.id.CreateBtn);\n }", "private AssignFSADialog() {\r\n super(Hub.getMainWindow(), Hub.string(\"TD_assignFSATitle\"));\r\n addWindowListener(new WindowAdapter() {\r\n @Override\r\n public void windowClosing(WindowEvent e) {\r\n onEscapeEvent();\r\n }\r\n });\r\n this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\r\n this.setMinimumSize(new Dimension(300, 10));\r\n\r\n Box mainBox = Box.createHorizontalBox();\r\n mainBox.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\r\n Box newBox = Box.createVerticalBox();\r\n newBox.add(new JLabel(\" \"));\r\n newBox.add(new JButton(new NewFSAAction()));\r\n mainBox.add(newBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n openModelsCombo = new JComboBox();\r\n openModelsCombo.setRenderer(new JLabelListRenderer());\r\n Box modelsBox = Box.createVerticalBox();\r\n Box titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_openModels\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n modelsBox.add(titleBox);\r\n modelsBox.add(openModelsCombo);\r\n mainBox.add(modelsBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n templatesCombo = new JComboBox();\r\n templatesCombo.setRenderer(new JLabelListRenderer());\r\n Box templatesBox = Box.createVerticalBox();\r\n titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_templates\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n templatesBox.add(titleBox);\r\n templatesBox.add(templatesCombo);\r\n mainBox.add(templatesBox);\r\n\r\n getContentPane().add(mainBox);\r\n\r\n }", "private void init() {\n \n dialog = new JDialog(this.owner, charField.getName() + \" Post Composition\");\n compFieldPanel = new FieldPanel(false,false, null, this.selectionManager, this.editManager, null); // (searchParams)?\n //compFieldPanel.setSearchParams(searchParams);\n \n // MAIN GENUS TERM\n genusField = CharFieldGui.makePostCompTermList(charField,\"Genus\",minCompChars);\n genusField.setSelectionManager(this.selectionManager); // ??\n //genusField.setListSelectionModel(this.selectionModel);\n compFieldPanel.addCharFieldGuiToPanel(genusField);\n\n // REL-DIFF - put in 1 differentia\n addRelDiffGui();\n\n setGuiFromSelectedModel();\n\n // override FieldPanel preferred size which will set window size\n compFieldPanel.setPreferredSize(null);//new Dimension(700,160));\n dialog.add(compFieldPanel);\n addButtons();\n dialog.pack();\n dialog.setLocationRelativeTo(owner);\n dialog.setVisible(true);\n\n compCharChangeListener = new CompCharChangeListener();\n this.editManager.addCharChangeListener(compCharChangeListener);\n compCharSelectListener = new CompCharSelectListener();\n this.selectionModel.addListSelectionListener(compCharSelectListener);\n }", "public menuFornecedorView() {\n initComponents();\n botoes(true,true,false,true,false,false);\n campos(false,true,false,false,false,false);\n }", "public NewCityDialog(MainWindow owner, boolean showCancelOption) {\r\n\t\tsetText(owner.guiStrings.get(\"welcome.caption\"));\r\n\t\tthis.owner = owner;\r\n\t\t\r\n\t\tVerticalPanel vp1 = new VerticalPanel();\r\n\t\tHorizontalPanel hp1 = new HorizontalPanel();\r\n\t\tvp1.add(hp1);\r\n\t\t\r\n\t\tCanvas canvas = Canvas.createIfSupported();\r\n\t\tif (canvas == null){\r\n\t\t\tWindow.alert(\"canvs not suported\");\r\n\t\t}\r\n\t\tcanvas.setWidth(\"360px\");\r\n\t\tcanvas.setCoordinateSpaceWidth(360);\r\n\r\n\t\tcanvas.setHeight(\"300px\");\r\n\t\tcanvas.setCoordinateSpaceHeight(300);\r\n\t\t\r\n\t\thp1.add(canvas);\r\n\t\t\r\n\t\tVerticalPanel levelBox = new VerticalPanel();\r\n\t\thp1.add(levelBox);\r\n\t\t\r\n\t\tHorizontalPanel buttonPane = new HorizontalPanel();\r\n\t\tvp1.add(buttonPane);\r\n\r\n\t\tengine = new Micropolis();\r\n\t\tnew MapGenerator(engine).generateNewCity();\r\n\t\t\r\n\t\tmapPane = new OverlayMapView(engine,canvas);\r\n\t\t\r\n\t\t//drawArea.add(mapPane, BorderLayout.CENTER);*/\r\n\t\t\r\n\t\tRadioButton radioBtn;\r\n\t\tfor (int lev = GameLevel.MIN_LEVEL; lev <= GameLevel.MAX_LEVEL; lev++) {\r\n\t\t\tfinal int x = lev;\r\n\t\t\tradioBtn = new RadioButton(\"level\",owner.guiStrings.get(\"menu.difficulty.\" + lev));\r\n\t\t\tradioBtn.addClickHandler(new ClickHandler() {\r\n\t\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\tsetGameLevel(x);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tlevelBox.add(radioBtn);\r\n\t\t\tlevelBtns.put(lev, radioBtn);\r\n\t\t}\r\n\t\tsetGameLevel(GameLevel.MIN_LEVEL);\r\n\r\n\t\tButton btn;\r\n\t\tbtn = new Button(owner.guiStrings.get(\"welcome.previous_map\"),new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tonPreviousMapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPane.add(btn);\r\n\t\tbtn.setEnabled(false);\r\n\t\tpreviousMapBtn = btn;\r\n\r\n\t\tbtn = new Button(owner.guiStrings.get(\"welcome.next_map\"),new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tonNextMapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPane.add(btn);\r\n\r\n\t\tbtn = new Button(owner.guiStrings.get(\"welcome.load_city\"),new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tmicropolis.client.Micropolis.mainWindow.loadGame();\r\n\t\t\t\thide();\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (!micropolis.client.Micropolis.userInfo.logined){\r\n\t\t\tbtn.setEnabled(false);\r\n\t\t}\r\n\t\tbuttonPane.add(btn);\r\n\r\n\t\tbtn = new Button(owner.guiStrings.get(\"welcome.play_this_map\"),new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tonPlayClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPane.add(btn);\r\n\t\tbtn.setFocus(true);\r\n\t\tif (showCancelOption) {\r\n\t\t\tbtn = new Button(owner.guiStrings.get(\"welcome.cancel\"),new ClickHandler() {\r\n\t\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t\tonCancelClicked();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbuttonPane.add(btn);\r\n\t\t}else{\r\n\t\t\tbtn = new Button(owner.guiStrings.get(\"welcome.quit\"),new ClickHandler() {\r\n\t\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t\tonQuitClicked();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbuttonPane.add(btn);\r\n\t\t}\r\n\t\tadd(vp1);\r\n\t}", "private void toggleOptions() {\r\n if (_optionsHidden) {\r\n // Update the button to \"Hide Options\"\r\n _optionsBtn.setLabel(\"Hide Options\");\r\n\r\n // Show connection options\r\n add(_optionFieldsManager);\r\n _optionsHidden = false;\r\n\r\n } else {\r\n // Update the button to \"Show Options\"\r\n _optionsBtn.setLabel(\"Show Options\");\r\n\r\n // Hide connection options\r\n delete(_optionFieldsManager);\r\n _optionsHidden = true;\r\n }\r\n }", "private void popupWindowOfOptions(View v) {\n \t \n \t\tOrderManager.clearOption();\n \t\t\n \t\tint nOrderBoardTextId = v.getId();\n \tOrder _Order = (Order) ResourceManager.get(nOrderBoardTextId);\n \tint nMenuDbId = _Order.MENU_ID;\n \tint nMenuResourceId = MenuManager.getResourceIdByDbId(nMenuDbId);\n \tMenu mMenu = MenuManager.getMenuByResourceId(nMenuResourceId);\n \t\n \tint nTempIdForCurrentOrder = IdManager.getRandomId();\n \tIdManager.setTemporaryId(nTempIdForCurrentOrder);\n \tResourceManager.put(nTempIdForCurrentOrder, _Order);\n \t\n try {\n \t\n \tint nPopupHeight = 760;\n \t\tint nPopupWith = 520;\n \t\n \tint nSubTitleHeight = 40;\n \tint nOptionListLayoutHeight = 210;\n \t\n \tString strMenuNameEng = mMenu.NAME_ENG;\n \tString strMenuNameOth = mMenu.NAME_OTH;\n \t\n \t// Popup layout\n LinearLayout popLayout = new LinearLayout(this);\n popLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));\n popLayout.setGravity(Gravity.CENTER);\n popLayout.setBackgroundColor(0x22000000);\n \n \t // Inner layout\n \t LinearLayout innerLayout = new LinearLayout(this);\n \t innerLayout.setLayoutParams(new LayoutParams(nPopupWith-20,nPopupHeight-20));\n \t innerLayout.setPadding(10,10,10,10);\n \t innerLayout.setOrientation(LinearLayout.VERTICAL);\n \t innerLayout.setGravity(Gravity.CENTER);\n \t innerLayout.setBackgroundColor(0xddffffff);\n \t\t \n \t\t // title eng\n \t\t TextView tvTitleEng = new TextView(this);\n \t\t tvTitleEng.setGravity(Gravity.CENTER);\n \t\t tvTitleEng.setText(strMenuNameEng);\n \t\t tvTitleEng.setTextColor(0xff000000);\n \t\t tvTitleEng.setTextSize(23);\n \t\t tvTitleEng.setHeight(50);\n \t\t tvTitleEng.setWidth(470);\n \t\t \n \t\t // title oth\n \t\t TextView tvTitleOth = new TextView(this);\n \t\t tvTitleOth.setGravity(Gravity.TOP|Gravity.CENTER);\n \t\t tvTitleOth.setText(strMenuNameOth);\n \t\t tvTitleOth.setTextColor(0xff000000);\n \t\t tvTitleOth.setTextSize(13);\n \t\t tvTitleOth.setHeight(55);\n \t\t tvTitleOth.setWidth(470);\n \t\t \n \t\t // common option title\n \t\t TextView tvCO = new TextView(this);\n \t\t tvCO.setText(\"* Common Option\");\n \t\t tvCO.setPadding(10,0,0,0);\n \t\t tvCO.setTextSize(15);\n \t\t tvCO.setTextColor(0xff5f2d09);\n \t\t tvCO.setHeight(nSubTitleHeight);\n \t\t tvCO.setWidth(470);\n \t\t \n \t\t // common option layout\n \t\t ScrollView svCO = new ScrollView(this);\n \t\t svCO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llCO = new LinearLayout(this);\n \t\t llCO.setLayoutParams(new LayoutParams(470,LayoutParams.WRAP_CONTENT));\n \t\t llCO.setPadding(15,10,10,10);\n \t\t llCO.setOrientation(LinearLayout.VERTICAL);\n \t\t llCO.setGravity(Gravity.TOP);\n \t\t \n \t\t showCommonOptions (mMenu, llCO);\n \t\t \t\n \t\t \tsvCO.addView(llCO);\n \t\t \t\n \t\t\t // specific option title\n \t\t\t \n \t\t TextView tvSO = new TextView(this);\n \t\t tvSO.setPadding(10,0,0,0);\n \t\t tvSO.setText(\"* Specific Option\");\n \t\t tvSO.setTextSize(15);\n \t\t tvSO.setTextColor(0xff5f2d09);\n \t\t tvSO.setHeight(nSubTitleHeight);\n \t\t tvSO.setWidth(470);\n \t \n \t\t ScrollView svSO = new ScrollView(this);\n \t\t svSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llSO = new LinearLayout(this);\n \t\t llSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t llSO.setPadding(15,10,10,10);\n \t\t llSO.setOrientation(LinearLayout.VERTICAL);\n \t\t llSO.setGravity(Gravity.TOP);\n \t\n \t\t showSpecificOptions (mMenu, llSO);\n \t\t \n \t\t svSO.addView(llSO);\n \t\t \n \t\t // button group\n \t\t \n \t\t int nButtonHeight = 50;\n \t\t int nButtonWidth = 100;\n \t\t \n \t\t LinearLayout llButtonGroup = new LinearLayout(this);\n \t\t llButtonGroup.setLayoutParams(new LayoutParams(470,80));\n \t\t llButtonGroup.setPadding(10, 0, 10, 4);\n \t\t llButtonGroup.setOrientation(LinearLayout.HORIZONTAL);\n \t\t llButtonGroup.setGravity(Gravity.CENTER|Gravity.BOTTOM);\n \t\t \n \t\t // confirm button\n \t \n \t \tint nConfirmId = IdManager.getRandomId();\n \t\t Button btnConfirm = new Button(this);\n \t\t btnConfirm.setId(nConfirmId);\n \t\t btnConfirm.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnConfirm.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnConfirm.setText(CaptionManager.getCaption().CONFIRM);\n \t\t btnConfirm.setTextSize(13);\n \t\t \n \t\t // add options to an order\n \t\t btnConfirm.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \t\n \t\t\t \tOrder currentOrder = (Order)ResourceManager.get(IdManager.getTemporaryId());\n \t\t\t \t\n \t\t\t \tArrayList<Order> orderList = addOptionsToOrder(currentOrder);\n \t\t\t \tOrderManager.requestUpdateOptions(currentOrder,orderList);\n \t \t\t\t\tloadOrderBoard();\n \t \t\t\t\tOrderManager.clearOption();\n \t \t\t\t\t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // cancel button\n \t\t Button btnCancel = new Button(this);\n \t\t btnCancel.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnCancel.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnCancel.setText(CaptionManager.getCaption().CANCEL);\n \t\t btnCancel.setTextSize(13);\n \t\t btnCancel.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \tOrderManager.clearOption();\n \t\t\t \t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // detail button\n \t\t final int nTempId = 808080;\n \t\t Mapper.put(Integer.valueOf(nTempId), mMenu);\n \t\t \n \t\t Button btnDetail = new Button(this);\n \t\t btnDetail.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnDetail.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnDetail.setText(CaptionManager.getCaption().DETAIL);\n \t\t btnDetail.setTextSize(13);\n \t\t btnDetail.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \n \t\t\t \tMenu menu = (Menu)Mapper.get(Integer.valueOf(808080));\n \t\t\t \tint nMenuRscId = menu.RESOURCE_ID;\n \t\t\t \tpopupWindowDetail(nMenuRscId);\n \t\t\t }\n \t\t });\n \t\t\t \n \t llButtonGroup.addView(btnConfirm);\n \t llButtonGroup.addView(btnCancel);\n \t llButtonGroup.addView(btnDetail);\n \t \n \t\t innerLayout.addView(tvTitleEng);\n \t innerLayout.addView(tvTitleOth);\n \t innerLayout.addView(tvCO);\n \t innerLayout.addView(svCO);\n \t innerLayout.addView(tvSO);\n \t innerLayout.addView(svSO);\n \t innerLayout.addView(llButtonGroup);\n \t \n popLayout.addView(innerLayout);\n\n // show popup\n _PopupWindowOfOptions = new PopupWindow(popLayout, nPopupWith, nPopupHeight, true);\n _PopupWindowOfOptions.showAtLocation(popLayout, Gravity.CENTER, 0, 0);\n \t\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void initView() {\n\n SwingUtilities.invokeLater(() -> {\n view = new MainWindow();\n view.setMinimumSize(new Dimension(1080, 720));\n view.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n view.setVisible(true);\n view.aboutListener(actionEvent -> showAboutDialog());\n view.helpListener(actionEvent -> showHelpDialog());\n view.addComboBox(comboBox);\n\n });\n\n }", "protected String getSettingsDialogTitle() {\r\n return \"Server options\";\r\n }", "PanelOptionsVisual(PanelConfigureProject panel) {\n this.panel = panel;\n\n preInitComponents();\n initComponents();\n postInitComponents();\n }", "public void editOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Modify Actors |\");\n System.out.println(\"\\t\\t| [2] Modify Rating |\");\n System.out.println(\"\\t\\t| [3] Modify Actors & Rating |\");\n System.out.println(\"\\t\\t| [4] Back To Menu |\");\n System.out.println(\"\\t\\t===================================\");\n System.out.print(\"\\t\\t Input the option number : \");\n }", "public void callSetupDialog(JDialog jParent, MainWindow oMain) {\n AllometryParameterEdit oWindow = new AllometryParameterEdit(jParent, m_oManager, oMain, this);\n oWindow.pack();\n oWindow.setLocationRelativeTo(null);\n oWindow.setVisible(true);\n }", "public seViewAnswerUI() {\n initComponents();\n }", "protected void showOptions(){\n mOptionList.setClickable(true);\n mOptionList.setVisibility(View.VISIBLE);\n }", "public void onOptionClick(View v){\r\n\t\tif (v.getId() == R.id.tvChannels) {\r\n\t\t\tif (typeDialog != null)\r\n\t\t\t\ttypeDialog.show();\r\n\t\t\telse {\r\n\t\t\t\tcreateTypeDialog(MyChannelsTabletActivity.this);\r\n\t\t\t\tif (typeDialog != null)\r\n\t\t\t\t\ttypeDialog.show();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void optionsDialog(){\r\n\t\tString title = getString(R.string.select_option);\r\n\t\tString[] options = getResources().getStringArray(R.array.options);\r\n\t\t\r\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\t \r\n\t\t// set the dialog title\r\n\t builder.setTitle(title);\r\n\t \r\n\t // specify the list array\r\n\t builder.setItems(options, new DialogInterface.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tswitch(which){\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\t// open update dialog\r\n\t\t\t\t\tupdateDialog();\r\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\t// open delete dialog\r\n\t\t\t\t\tdeleteDialog();\r\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t \r\n\r\n\t // show dialog\r\n\t\tAlertDialog alert = builder.create();\r\n\t\talert.show();\r\n\t}", "private void setViews() {\n lv.setAdapter(adapter);\n\n dialog2 = new MiddleDialog2(INSTANCE, getResources().getString(R.string.title), getResources().getString(R.string.value), new MiddleDialog2.onBottonListener() {\n @Override\n public void onOk() {\n\n finish();\n }\n },R.style.registDialog);\n }", "@FXML\r\n void ClickOptionsAndSettings(MouseEvent event) throws IOException {\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"OptionsAndSettings.fxml\"));\r\n loader.load();\r\n //Load options and settings page\r\n OptionsAndSettingsController controller = loader.getController();\r\n controller.setUser(user);\r\n //Set user details\r\n Parent root = loader.getRoot();\r\n Scene scene = new Scene(root);\r\n Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "private void comboselection(ActionEvent e) {\n\t\tint selectedIndex = this.combobox.getSelectedIndex();\n\t\tif (selectedIndex == 0) {\n\t\t\tthis.add(field1, BorderLayout.CENTER);\n\t\t\tthis.field2.setVisible(false);\n\t\t\tthis.field3.setVisible(false);\n\t\t\tthis.field1.setVisible(true);\n\t\t} else if (selectedIndex == 1) {\n\t\t\tthis.add(field2, BorderLayout.CENTER);\n\t\t\tthis.field1.setVisible(false);\n\t\t\tthis.field3.setVisible(false);\n\t\t\tthis.field2.setVisible(true);\n\t\t} else {\n\t\t\tthis.add(field3, BorderLayout.CENTER);\n\t\t\tthis.field1.setVisible(false);\n\t\t\tthis.field2.setVisible(false);\n\t\t\tthis.field3.setVisible(true);\n\t\t}\n\t}", "private void showVideoSizeOptionDialog() {\n\t\t// TODO Auto-generated method stub\n\t\tCharSequence title = res.getString(R.string.stream_set_res_vid);\n\n\t\tfinal String[] videoSizeUIString = uiDisplayResource.getVideoSize();\n\t\tif (videoSizeUIString == null) {\n\t\t\tWriteLogToDevice.writeLog(\"[Error] -- SettingView: \",\n\t\t\t\t\t\"videoSizeUIString == null\");\n\t\t\tpreviewHandler\n\t\t\t\t\t.obtainMessage(GlobalApp.MESSAGE_UPDATE_UI_VIDEO_SIZE)\n\t\t\t\t\t.sendToTarget();\n\t\t\treturn;\n\t\t}\n\t\tint length = videoSizeUIString.length;\n\n\t\tint curIdx = 0;\n\t\tUIInfo uiInfo = reflection.refecltFromSDKToUI(\n\t\t\t\tSDKReflectToUI.SETTING_UI_VIDEO_SIZE,\n\t\t\t\tcameraProperties.getCurrentVideoSize());\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tif (videoSizeUIString[i].equals(uiInfo.uiStringInSetting)) {\n\t\t\t\tcurIdx = i;\n\t\t\t}\n\t\t}\n\n\t\tDialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\tfinal String value = (String) reflection.refecltFromUItoSDK(\n\t\t\t\t\t\tUIReflectToSDK.SETTING_SDK_VIDEO_SIZE,\n\t\t\t\t\t\tvideoSizeUIString[arg1]);\n\t\t\t\targ0.dismiss();\n\t\t\t\tif (value.equals(\"2704x1524 15\")\n\t\t\t\t\t\t|| value.equals(\"3840x2160 10\")) {\n\t\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(\n\t\t\t\t\t\t\tcontext);\n\t\t\t\t\tbuilder.setMessage(R.string.not_support_preview);\n\t\t\t\t\tbuilder.setNegativeButton(R.string.setting_no,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\tpreviewHandler\n\t\t\t\t\t\t\t\t\t\t\t.obtainMessage(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_VIDEO_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t.sendToTarget();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\tbuilder.setPositiveButton(R.string.setting_yes,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\tcameraProperties.setVideoSize(value);\n\t\t\t\t\t\t\t\t\tpreviewHandler\n\t\t\t\t\t\t\t\t\t\t\t.obtainMessage(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_VIDEO_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t.sendToTarget();\n\t\t\t\t\t\t\t\t\tsettingValueList = getSettingValue();\n\t\t\t\t\t\t\t\t\tif (optionListAdapter == null) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\toptionListAdapter.notifyDataSetChanged();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\tbuilder.create().show();\n\t\t\t\t} else {\n\t\t\t\t\tcameraProperties.setVideoSize(value);\n\t\t\t\t\tpreviewHandler.obtainMessage(\n\t\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_VIDEO_SIZE)\n\t\t\t\t\t\t\t.sendToTarget();\n\t\t\t\t\tsettingValueList = getSettingValue();\n\t\t\t\t\tif (optionListAdapter == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\toptionListAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\t\t\t\t/**/\n\t\t\t}\n\t\t};\n\t\tshowOptionDialog(title, videoSizeUIString, curIdx, listener, false);\n\t}", "private void showAccessChooserDialog(){\n if (getFragmentManager().findFragmentByTag(ACCESS_RADIAL_FRAGMENT_TAG) != null){\n return;\n }\n AccessRadialDialogFragment fragment = AccessRadialDialogFragment.createFragment(getMainItem());\n fragment.show(getFragmentManager(), ACCESS_RADIAL_FRAGMENT_TAG);\n }", "public OrdemCorteVIEW() {\n initComponents();\n setDefaultCloseOperation(ProdutoVIEW.HIDE_ON_CLOSE);\n setExtendedState(MAXIMIZED_BOTH);\n }", "public SelectFrm() {\r\n\t\tinitComponents();\r\n\t\t//设置窗体居中显示\r\n\t\tthis.setLocationRelativeTo(null);\r\n\t}", "public void setControlView() {\n\t\tif (mControlView != null) {\n\t\t\tmControlView.setRepeat(Const.FILTER_TEXT);\n\t\t\tmControlView.setPhotoTimeType(mLogicManager.getPageNum());\n\t\t\tmControlView.setFileName(mLogicManager\n\t\t\t\t\t.getCurrentFileName(Const.FILTER_TEXT));\n\t\t\tmControlView.setFilePosition(mLogicManager.getTextPageSize());\n\t\t}\n\t\tif(null!=mInfo && mInfo.isShowing())\n\t\t{\n\t\t\tmInfo.setTextView();\n\t\t}\n\t}", "public viewDos() {\n initComponents();\n setTexFieldInList();\n controller= new Controller();\n this.setVisible(true);\n }", "public InitOptionDialog(java.awt.Frame parent, ConfigurationOptions config_,boolean modal) {\n super(parent, modal);\n initComponents();\n this.config_ = config_;\n newConfig_ = new ConfigurationOptions();\n \n try {\n BeanUtils.copyProperties(newConfig_,this.config_);//copy the properties of config into newConfig_\n } catch (IllegalAccessException ex) {\n ReportingUtils.logError(ex, \"Failed to make copy of settings\");\n } catch (InvocationTargetException ex) {\n ReportingUtils.logError(ex, \"Failed to make copy of settings\");\n }\n\n //how to set the drop down menus\n String[] comboItems;\n comboItems= FovFilterConfig.segAlgNames_;\n DefaultComboBoxModel cdm=new DefaultComboBoxModel(comboItems);\n jComboBox_Counting_SelectAlg.setModel(cdm);\n \n comboItems = LocalAlgParam.methodValues;\n cdm=new DefaultComboBoxModel(comboItems);\n jComboBox_Counting_localMethod.setModel(cdm);\n\n //get the acquisition channel list\n comboItems = getAcqChannelList();\n cdm=new DefaultComboBoxModel(comboItems);\n jComboBox_camConf_Camera.setModel(cdm);\n jComboBox_camConf_Camera.setSelectedIndex(combo_camCurrent);\n reloadSettings();\n }", "public void actionPerformed(ActionEvent e)\n {\n new AutoAnswerOptionsDialog(providerService, parentMenu)\n .setVisible(true);\n }", "public void configureGallery(T aView)\n {\n aView.setColCount(12); aView.setPromptText(\"TextField\");\n }", "public InfoDialog() {\r\n\t\tcreateContents();\r\n\t}", "public void testOptions() {\n OptionsOperator optionsOper = OptionsOperator.invoke();\n optionsOper.selectEditor();\n optionsOper.selectFontAndColors();\n optionsOper.selectKeymap();\n optionsOper.selectGeneral();\n // \"Manual Proxy Setting\"\n String hTTPProxyLabel = Bundle.getStringTrimmed(\n \"org.netbeans.core.ui.options.general.Bundle\", \"CTL_Use_HTTP_Proxy\");\n new JRadioButtonOperator(optionsOper, hTTPProxyLabel).push();\n // \"HTTP Proxy:\"\n String proxyHostLabel = Bundle.getStringTrimmed(\n \"org.netbeans.core.ui.options.general.Bundle\", \"CTL_Proxy_Host\");\n JLabelOperator jloHost = new JLabelOperator(optionsOper, proxyHostLabel);\n new JTextFieldOperator((JTextField) jloHost.getLabelFor()).setText(\"www-proxy.uk.oracle.com\"); // NOI18N\n // \"Port:\"\n String proxyPortLabel = Bundle.getStringTrimmed(\n \"org.netbeans.core.ui.options.general.Bundle\", \"CTL_Proxy_Port\");\n JLabelOperator jloPort = new JLabelOperator(optionsOper, proxyPortLabel);\n new JTextFieldOperator((JTextField) jloPort.getLabelFor()).setText(\"80\"); // NOI18N\n optionsOper.ok();\n }", "public ConfigureUpdatesDialog() {\n super(StrangeEons.getWindow(), ModalityType.TOOLKIT_MODAL);\n initComponents();\n AbstractGameComponentEditor.localizeComboBoxLabels(frequencyCombo, null);\n AbstractGameComponentEditor.localizeComboBoxLabels(actionCombo, null);\n banner.setIcon(new ImageIcon(\n ResourceKit.createBleedBanner(((ImageIcon) banner.getIcon()).getImage())\n ));\n setLocationRelativeTo(getParent());\n\n Settings s = Settings.getUser();\n s.set(\"core-dialog-shown\", \"yes\");\n //doNotShowCheck.setSelected( s.getYesNo( \"core-dialog-autoinstall\" ) );\n\n frequencyCombo.setSelectedIndex(AutomaticUpdater.getUpdateFrequency());\n actionCombo.setSelectedIndex(AutomaticUpdater.getUpdateAction() == 0 ? 0 : 1);\n newPluginsCheck.setSelected(AutomaticUpdater.isShowingNewPlugins());\n appUpdateCheck.setSelected(AutomaticUpdater.isShowingAppUpdates());\n doneInit = true;\n }", "public DiffOptionsPanel() {\n initComponents();\n internalDiff.addChangeListener(this);\n externalDiff.addChangeListener(this);\n ignoreWhitespace.addChangeListener(this);\n externalCommand.getDocument().addDocumentListener(this);\n refreshComponents();\n }", "public FrmMainVIEW() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n\n setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(FluidBasicView.class, \"FluidBasicView.border.title\"))); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(FluidBasicView.class, \"FluidBasicView.jLabel1.text\")); // NOI18N\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n jComboBox1.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox1ItemStateChanged(evt);\n }\n });\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Views/OpenFullView.png\"))); // NOI18N\n org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(FluidBasicView.class, \"FluidBasicView.jButton1.text\")); // NOI18N\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 133, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 147, Short.MAX_VALUE)\n .addComponent(jButton1)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n }", "public PropertiesChooserView() {\n initComponents();\n choicesModel = new DefaultListModel();\n chosenModel = new DefaultListModel();\n chooseList.setModel(choicesModel);\n chosenList.setModel(chosenModel);\n }", "public void init() {\n addStringOption(\"extractionId\", \"Extraction ID\", \"\");\n addStringOption(WORKFLOW_ID, \"Workflow ID\", \"\");\n addEditableComboBoxOption(LIMSConnection.WORKFLOW_LOCUS_FIELD.getCode(), \"Locus\", \"None\", SAMPLE_LOCI);\n addDateOption(\"date\", \"Date\", new Date());\n\n\n addComboBoxOption(RUN_STATUS, \"Reaction state\", STATUS_VALUES, STATUS_VALUES[0]);\n\n addLabel(\"\");\n addPrimerSelectionOption(PRIMER_OPTION_ID, \"Forward Primer\", DocumentSelectionOption.FolderOrDocuments.EMPTY, false, Collections.<AnnotatedPluginDocument>emptyList());\n addPrimerSelectionOption(PRIMER_REVERSE_OPTION_ID, \"Reverse Primer\", DocumentSelectionOption.FolderOrDocuments.EMPTY, false, Collections.<AnnotatedPluginDocument>emptyList());\n addPrimersButton = addButtonOption(ADD_PRIMER_TO_LOCAL_ID, \"\", \"Add primers to my local database\");\n\n\n List<OptionValue> cocktails = getCocktails();\n\n cocktailOption = addComboBoxOption(COCKTAIL_OPTION_ID, \"Reaction Cocktail\", cocktails, cocktails.get(0));\n\n updateCocktailOption(cocktailOption);\n\n cocktailButton = new ButtonOption(COCKTAIL_BUTTON_ID, \"\", \"Edit Cocktails\");\n cocktailButton.setSpanningComponent(true);\n addCustomOption(cocktailButton);\n Options.OptionValue[] cleanupValues = new OptionValue[] {new OptionValue(\"true\", \"Yes\"), new OptionValue(\"false\", \"No\")};\n ComboBoxOption cleanupOption = addComboBoxOption(\"cleanupPerformed\", \"Cleanup performed\", cleanupValues, cleanupValues[1]);\n StringOption cleanupMethodOption = addStringOption(\"cleanupMethod\", \"Cleanup method\", \"\");\n cleanupMethodOption.setDisabledValue(\"\");\n addStringOption(\"technician\", \"Technician\", \"\", \"May be blank\");\n cleanupOption.addDependent(cleanupMethodOption, cleanupValues[0]);\n TextAreaOption notes = new TextAreaOption(\"notes\", \"Notes\", \"\");\n addCustomOption(notes);\n\n labelOption = new LabelOption(LABEL_OPTION_ID, \"Total Volume of Reaction: 0uL\");\n addCustomOption(labelOption);\n }", "public FormularioLivroView() {\n initComponents();\n }", "public VendaView() {\n initComponents();\n }", "void showSelectedAgentView();", "public VendaComputadorView() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "private void setUpViews() {\n\n updateFooterCarInfo();\n updateFooterUsrInfo();\n\n\n setResultActionListener(new ResultActionListener() {\n @Override\n public void onResultAction(AppService.ActionType actionType) {\n if (ModelManager.getInstance().getGlobalInfo() != null) {\n GlobalInfo globalInfo = ModelManager.getInstance().getGlobalInfo();\n\n switch (actionType) {\n case CarInfo:\n updateFooterCarInfo();\n break;\n case UsrInfo:\n updateFooterUsrInfo();\n break;\n case Charger:\n updateChargeStationList();\n break;\n }\n }\n }\n });\n }", "protected void showSettingsChangedDialog() {\n new AlertDialog.Builder(getActivity())\n .setTitle(R.string.dialog_settings_changed_title)\n .setMessage(R.string.dialog_settings_changed_description)\n .setPositiveButton(android.R.string.yes, this)\n .setNegativeButton(android.R.string.no, this)\n .show();\n }", "public OptionPanel() {\n initComponents();\n }", "protected void setupUI() {\n\t\t\n\t\tcontentPane = new JPanel();\n\t\tlayerLayout = new CardLayout();\n\t\tcontentPane.setLayout(layerLayout);\n\t\tControlAgendaViewPanel agendaViewPanel = new ControlAgendaViewPanel(layerLayout,contentPane);\n\t\tagendaPanelFactory = new AgendaPanelFactory();\n\t\tdayView = agendaPanelFactory.getAgendaView(ActiveView.DAY_VIEW);\n\t\tweekView = agendaPanelFactory.getAgendaView(ActiveView.WEEK_VIEW);\n\t\tmonthView = agendaPanelFactory.getAgendaView(ActiveView.MONTH_VIEW);\n\t\t\n\t\tcontentPane.add(dayView,ActiveView.DAY_VIEW.name());\n\t\tcontentPane.add(weekView,ActiveView.WEEK_VIEW.name());\n\t\tcontentPane.add(monthView,ActiveView.MONTH_VIEW.name());\n\t\n\t\tJSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,agendaViewPanel, contentPane);\n\t\tthis.setContentPane(splitPane);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\t\n\t\t//MENU\n\t\tJMenu file, edit, help, view;\n\t\t\n\t\t//ITEM DE MENU\n\t\tJMenuItem load, quit, save;\n\t\tJMenuItem display, about;\n\t\tJMenuItem month, week, day;\n\t\t\n\t\t/* File Menu */\n\t\t/** EX4 : MENU : UTILISER L'AIDE FOURNIE DANS LE TP**/\n\t\t//Classe pour les listener des parties non implémentés\n\t\tclass MsgError implements ActionListener {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tJOptionPane.showMessageDialog(null, ApplicationSession.instance().getString(\"info\"), \"info\", JOptionPane.INFORMATION_MESSAGE, null);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t//Menu File\t\n\t\tfile = new JMenu(ApplicationSession.instance().getString(\"file\"));\n\t\t\n\t\tmenuBar.add(file);\n\t\tfile.setMnemonic(KeyEvent.VK_A);\n\t\tfile.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(file);\n\t\t\n\n\t\t//a group of JMenuItems\n\t\tload = new JMenuItem(ApplicationSession.instance().getString(\"load\"),KeyEvent.VK_T);\n\t\tload.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tload.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(load);\n\t\tload.addActionListener(new MsgError());\n\t\t\n\t\tquit = new JMenuItem(ApplicationSession.instance().getString(\"quit\"),KeyEvent.VK_T);\n\t\tquit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tquit.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(quit);\n\t\t\n\t\t//LISTENER QUIT\n\t\tquit.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\t//message box yes/no pour le bouton quitter\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsave = new JMenuItem(new String(ApplicationSession.instance().getString(\"save\")),KeyEvent.VK_T);\n\t\tsave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tsave.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(save);\n\t\tsave.addActionListener(new MsgError());\n\t\t\n\t\t\n\t//Menu Edit \n\t\tedit = new JMenu(new String(ApplicationSession.instance().getString(\"edit\")));\n\t\t\n\t\tmenuBar.add(edit);\n\t\tedit.setMnemonic(KeyEvent.VK_A);\n\t\tedit.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\t\n\t\t//Sous menu View\n\t\t\n\t\tview = new JMenu(new String(ApplicationSession.instance().getString(\"view\")));\n\t\tview.setMnemonic(KeyEvent.VK_A);\n\t\tview.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tedit.add(view);\n\t\t\n\t\tmonth = new JMenuItem(new String(ApplicationSession.instance().getString(\"month\")),KeyEvent.VK_T);\n\t\tmonth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmonth.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(month);\n\t\t\t\t\n\t\tweek = new JMenuItem(new String(ApplicationSession.instance().getString(\"week\")),KeyEvent.VK_T);\n\t\tweek.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tweek.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(week);\n\t\t\n\t\tday = new JMenuItem(new String(ApplicationSession.instance().getString(\"day\")),KeyEvent.VK_T);\n\t\tday.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tday.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(day);\n\t\t\n\t\t//LISTENER VIEW\n\t\t\n\t\t\n\t\tmonth.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.last(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tweek.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\tlayerLayout.next(contentPane);\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t});\n\t\tday.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\n\t//Menu Help\n\t\thelp = new JMenu(new String(ApplicationSession.instance().getString(\"help\")));\n\t\t\n\t\tmenuBar.add(help);\n\t\thelp.setMnemonic(KeyEvent.VK_A);\n\t\thelp.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(help);\n\t\t\n\t\tdisplay = new JMenuItem(new String(ApplicationSession.instance().getString(\"display\")),KeyEvent.VK_T);\n\t\tdisplay.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tdisplay.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(display);\n\t\tdisplay.addActionListener(new MsgError());\n\t\t\n\t\tabout = new JMenuItem(new String(ApplicationSession.instance().getString(\"about\")),KeyEvent.VK_T);\n\t\tabout.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tabout.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(about);\n\t\tabout.addActionListener(new MsgError());\n\t\t\n\t\t\n\n\t\tthis.setJMenuBar(menuBar);\n\t\tthis.pack();\n\t\tlayerLayout.next(contentPane);\n\t}", "private void setUpDialoguebox() {\n\t\tinput = new CTS_GUI_Dialoguebox();\n\t\tinput.setTitle(\"Settings\");\n\t\tBorderPane pane = new BorderPane();\n\t\tLocalTime t = LocalTime.now();\n\t\tLocalDate d = LocalDate.now();\n\t\tuicontrols = new VBox(10);\n\t\tHBox box0 = new HBox(5);\n\t\tbox0.getChildren().addAll(new Label(\"Latitude: \"),new TextField(\"0\"));\n\t\tHBox box1 = new HBox(5);\n\t\tbox1.getChildren().addAll(new Label(\"Longitude: \"),new TextField(\"0\"));\n\t\tHBox box2 = new HBox(5);\n\t\tbox2.getChildren().addAll(new Label(\"Date: \"),new TextField(d.toString()));\n\t\tTextField time = new TextField(t.getHour() + \":\" + t.getMinute() + \":\" + (int) floor(t.getSecond()));\n\t\tHBox box3 = new HBox(5);\n\t\tbox3.getChildren().addAll(new Label(\"Time: \"),time);\n\t\t// Check boxes\n\t\tHBox box5 = new HBox(5);\n\t\tCheckBox c1 = new CheckBox(\"Plot Stars\");\n\t\tc1.setSelected(true);\n\t\tCheckBox c2 = new CheckBox(\"Plot DSOs\");\n\t\tc2.setSelected(true);\n\t\tCheckBox c3 = new CheckBox(\"Plot Constellations\");\n\t\tc3.setSelected(true);\n\t\tCheckBox c4 = new CheckBox(\"Plot Planets\");\n\t\tc4.setSelected(true);\n\t\tbox5.getChildren().addAll(c1,c2,c3,c4);\n\t\t// Color Picker\n\t\t// 0 = Star color, 1 = Low mag star, 2 = Very low mag star.\n\t\t// 3 = DSO, 4 = Sky background, 5 = Circle around sky background\n\t\t// 6 = Overall background, 7 = Lat/long txt color, 8 = Constellation line color.\n\t\tHBox box6 = new HBox(5);\n\t\tTextField colorSet = new TextField(\"255,255,255,1\");\n\t\tButton setcolorbutton = new Button(\"Submit Color\");\n\t\tbox6.getChildren().addAll(new Label(\"Color to Set: \"),colorSet,setcolorbutton,new Label(\"[PREVIEW COLOR]\"));\n\t\tsetcolorbutton.setOnAction((event) -> { colorPickerHander(); });\n MenuBar mainmenu = new MenuBar();\n Menu colorpickermenu = new Menu(\"Set Custom Colors\");\n String[] colorstrs = {\"Star Color\",\"Low Magnituide Star Color\",\"Very Low Magnituide Star Color\", \"Deep Space Object Color\",\"Sky Background Color\",\n \t\t\"Circle Around Sky Background Color\",\"Overall Background Color\", \"Latitude/Longitude Text Color\",\"Constellation Line Color\"};\n for(int x = 0; x < colorstrs.length; x++) {\n \tMenuItem opt = new MenuItem(colorstrs[x]);\n \tint id = x;\n \topt.setOnAction((event) -> { colorSetterId = id; });\n \tcolorpickermenu.getItems().add(opt);\n }\n \n ComboBox<String> consts = new ComboBox<>();\n HashMap<String, String> cdbs = controller.getModelConstellationDBs();\n\n for (String name : cdbs.keySet()) {\n consts.getItems().add(name);\n }\n HBox box7 = new HBox(5);\n box7.getChildren().addAll(new Label(\"Select Constellation Set\"), consts);\n \n consts.getSelectionModel().select(\"Western\");\n mainmenu.getMenus().addAll(colorpickermenu);\n\t\tHBox box4 = new HBox(5);\n\t\tButton but = new Button(\"Cancel\");\n\t\tbut.setPadding(new Insets(5));\n\t\tButton but2 = new Button(\"Submit\");\n\t\tbut2.setPadding(new Insets(5));\n\t\tbox4.getChildren().addAll(but,but2);\n\t\tuicontrols.getChildren().addAll(box0,box1,box2,box3,box5,box6,box7,box4);\n\t\tbut.setOnAction((event) -> { input.close(); });\n\t\tbut2.setOnAction((event) -> {\n\t\t\tuserSelectedConstellationFileName = cdbs.get(consts.getValue());\n\t\t\tlong i = validateInput();\n\t\t\tif (i == 0) {\n\t\t\t\tchartTheStars();\n\t\t\t\tinput.close();\n\t\t\t} else {\n\t\t\t\tGUIerrorout = new Alert(AlertType.ERROR, getGUIErrorMsg(i));\n\t\t\t\tGUIerrorout.showAndWait();\n\t\t\t}\n });\n\t\tpane.setTop(mainmenu);\n\t\tpane.setCenter(uicontrols);\n\t\tpane.setPadding(new Insets(10));\n\t\tScene scene = new Scene(pane, 520, 310);\n\t\tinput.setScene(scene);\n\t}", "public ViewInvoicesGUI() {\n initComponents();\n updateDatabase();\n this.setLocationRelativeTo(null);\n \n }", "private void initDialog() {\n }", "public void goToOptions(View view) {\n\t\tstartActivity(new Intent(this, Options.class));\n\t}", "public vContactosDoctor() {\n initComponents();\n }", "private void setPopUpOptions(Context context, View view, boolean showEdit, int position ) {\n PopupMenu popupMenu = new PopupMenu(context, view);\n popupMenu.getMenuInflater().inflate(R.menu.menu_item_popup, popupMenu.getMenu());\n popupMenu.getMenu().findItem(R.id.menu_edit).setVisible(showEdit);\n\n popupMenu.setOnMenuItemClickListener(item -> {\n switch (item.getItemId()) {\n case R.id.menu_edit:\n new SectionMenuOptionAction( position ).showEditTitleDialog();\n break;\n case R.id.menu_delete:\n// Log.e(\"CLICKED\", \"Delete Clicked\");\n new SectionMenuOptionAction( position ).onDeleteSectionQuery();\n break;\n }\n return true;\n });\n popupMenu.show();\n }", "public void botonOpciones(View view)\n {\n \tmostrarDialogoOpciones();\n }", "public PropertiesView(){\n\n\t\tbtnDescTemplate = new DescTemplateWidget(this);\n\t\tbtnCalculation = new DescTemplateWidget(this);\n\n\t\ttable.setWidget(0, 0, new Label(LocaleText.get(\"text\")));\n\t\ttable.setWidget(1, 0, new Label(LocaleText.get(\"helpText\")));\n\t\ttable.setWidget(2, 0, new Label(LocaleText.get(\"type\")));\n\t\ttable.setWidget(3, 0, new Label(LocaleText.get(\"binding\")));\n\t\ttable.setWidget(4, 0, new Label(LocaleText.get(\"visible\")));\n\t\ttable.setWidget(5, 0, new Label(LocaleText.get(\"enabled\")));\n\t\ttable.setWidget(6, 0, new Label(LocaleText.get(\"locked\")));\n\t\ttable.setWidget(7, 0, new Label(LocaleText.get(\"required\")));\n\t\ttable.setWidget(8, 0, new Label(LocaleText.get(\"defaultValue\")));\n\t\ttable.setWidget(9, 0, new Label(LocaleText.get(\"calculation\")));\n\t\t\n\t\tlblDescTemplate = new Label(LocaleText.get(\"descriptionTemplate\"));\n\t\ttable.setWidget(10, 0, lblDescTemplate);\n\t\ttable.setWidget(11, 0, new Label(LocaleText.get(\"formKey\")));\n\n\t\ttable.setWidget(0, 1, txtText);\n\t\ttable.setWidget(1, 1, txtHelpText);\n\t\ttable.setWidget(2, 1, cbDataType);\n\t\ttable.setWidget(3, 1, txtBinding);\n\t\ttable.setWidget(4, 1, chkVisible);\n\t\ttable.setWidget(5, 1, chkEnabled);\n\t\ttable.setWidget(6, 1, chkLocked);\n\t\ttable.setWidget(7, 1, chkRequired);\n\t\ttable.setWidget(8, 1, txtDefaultValue);\n\n\t\tHorizontalPanel panel = new HorizontalPanel();\n\t\tpanel.add(txtCalculation);\n\t\tpanel.add(btnCalculation);\n\t\tpanel.setCellWidth(btnCalculation, \"20%\");\n\t\tFormUtil.maximizeWidget(txtCalculation);\n\t\tFormUtil.maximizeWidget(panel);\n\t\ttable.setWidget(9, 1, panel);\n\n\t\tpanel = new HorizontalPanel();\n\t\tpanel.add(txtDescTemplate);\n\t\tpanel.add(btnDescTemplate);\n\t\tpanel.setCellWidth(btnDescTemplate, \"20%\");\n\t\tFormUtil.maximizeWidget(txtDescTemplate);\n\t\tFormUtil.maximizeWidget(panel);\n\t\ttable.setWidget(10, 1, panel);\n\t\t\n\t\ttable.setWidget(11, 1, txtFormKey);\n\n\t\ttable.setStyleName(\"cw-FlexTable\");\n\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeText\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeNumber\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDecimal\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDate\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeTime\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDateTime\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeBoolean\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeSingleSelect\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeMultSelect\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeRepeat\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypePicture\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeVideo\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeAudio\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeSingleSelectDynamic\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeGPS\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeBarcode\"));\n\n\t\tFlexCellFormatter cellFormatter = table.getFlexCellFormatter();\n\t\tcellFormatter.setHorizontalAlignment(15, 1, HasHorizontalAlignment.ALIGN_CENTER);\n\n\t\ttable.setWidth(\"100%\");\n\t\tcellFormatter.setWidth(0, 0, \"20%\");\n\t\t//cellFormatter.setColSpan(0, 0, 2);\n\t\t\n\t\t//cellFormatter.setWidth(9, 0, \"20\"+PurcConstants.UNITS);\n\t\t//cellFormatter.setWidth(9, 1, \"20\"+PurcConstants.UNITS);\n\n\t\ttxtText.setWidth(\"100%\");\n\t\ttxtHelpText.setWidth(\"100%\");\n\t\ttxtBinding.setWidth(\"100%\");\n\t\ttxtDefaultValue.setWidth(\"100%\");\n\t\tcbDataType.setWidth(\"100%\");\n\t\ttxtFormKey.setWidth(\"100%\");\n\n\t\tVerticalPanel verticalPanel = new VerticalPanel();\n\t\tverticalPanel.setSpacing(5);\n\t\tverticalPanel.add(table);\n\n\t\tDecoratedTabPanel tabs = new DecoratedTabPanel();\n\t\ttabs.add(skipRulesView, LocaleText.get(\"skipLogic\"));\n\t\ttabs.add(validationRulesView, LocaleText.get(\"validationLogic\"));\n\t\ttabs.add(dynamicListsView, LocaleText.get(\"dynamicLists\"));\n\n\t\ttabs.selectTab(0);\n\t\tverticalPanel.add(tabs);\n\t\tFormUtil.maximizeWidget(tabs);\n\n\t\tFormUtil.maximizeWidget(verticalPanel);\n\t\tinitWidget(verticalPanel);\n\n\t\tsetupEventListeners();\n\n\t\tcbDataType.setSelectedIndex(-1);\n\n\t\tenableQuestionOnlyProperties(false);\n\t\ttxtText.setEnabled(false);\n\t\t//txtDescTemplate.setVisible(false);\n\t\t//btnDescTemplate.setVisible(false);\n\t\tenableDescriptionTemplate(false);\n\t\ttxtCalculation.setEnabled(false);\n\t\tbtnCalculation.setEnabled(false);\n\t\ttxtBinding.setEnabled(false);\n\n\t\ttxtText.setTitle(LocaleText.get(\"questionTextDesc\"));\n\t\ttxtHelpText.setTitle(LocaleText.get(\"questionDescDesc\"));\n\t\ttxtBinding.setTitle(LocaleText.get(\"questionIdDesc\"));\n\t\ttxtDefaultValue.setTitle(LocaleText.get(\"defaultValDesc\"));\n\t\tcbDataType.setTitle(LocaleText.get(\"questionTypeDesc\"));\n\n\t\tDOM.sinkEvents(getElement(), Event.ONKEYDOWN | DOM.getEventsSunk(getElement()));\n\t}", "private void buildView() {\n this.setHeaderInfo(model.getHeaderInfo());\n\n CWButtonPanel buttonPanel = this.getButtonPanel();\n \n buttonPanel.add(saveButton);\n buttonPanel.add(saveAndCloseButton);\n buttonPanel.add(cancelButton);\n \n FormLayout layout = new FormLayout(\"pref, 4dlu, 200dlu, 4dlu, min\",\n \"pref, 2dlu, pref, 2dlu, pref, 2dlu, pref\"); // rows\n\n layout.setRowGroups(new int[][]{{1, 3, 5}});\n \n CellConstraints cc = new CellConstraints();\n this.getContentPanel().setLayout(layout);\n \n this.getContentPanel().add(nameLabel, cc.xy (1, 1));\n this.getContentPanel().add(nameTextField, cc.xy(3, 1));\n this.getContentPanel().add(descLabel, cc.xy(1, 3));\n this.getContentPanel().add(descTextField, cc.xy(3, 3));\n this.getContentPanel().add(amountLabel, cc.xy(1, 5));\n this.getContentPanel().add(amountTextField, cc.xy(3, 5));\n }", "public ViewPerfil() {\n initComponents();\n carregaperfil();\n setLocationRelativeTo(null);\n habilitarDesabilitarCampos(false);\n }", "void showNoneParametersView();", "public TournamentSetting_View(RiskStart_View start_view, boolean modality)\r\n\t{\r\n\t\tsetTitle(\"Setting Tournament Mode\");\r\n setPreferredSize(new Dimension(200, 200));\r\n setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\r\n setResizable(false);\r\n add(tournamentSettingPanel());\r\n setLocationRelativeTo(null);\r\n pack();\r\n\t}", "public ShowView() {\n\t\tsuper(null);\n\t\tcreateActions();\n\t\taddToolBar(SWT.FLAT | SWT.WRAP);\n\t\taddMenuBar();\n\t\taddStatusLine();\n\t}", "private Object displayOptionsPanel(String message, Object[] possibleValues) {\n return JOptionPane.showInputDialog(\n mainPanel, // parentComponent\n message, // message\n \"\", // title\n JOptionPane.QUESTION_MESSAGE, // messageType\n null, // icon\n possibleValues, // selectionValues\n possibleValues[0] // initialSelectionValue\n );\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tRDKitAdjustQueryPropertiesNodeDialog() {\n super.addDialogComponent(new DialogComponentColumnNameSelection(\n createInputColumnNameModel(), \"RDKit Mol column: \", 0,\n RDKitMolValue.class));\n super.addDialogComponent(new DialogComponentString(\n createNewColumnNameModel(), \"New column name: \", true, 40));\n super.addDialogComponent(new DialogComponentBoolean(\n createRemoveSourceColumnsOptionModel(), \"Remove source column\"));\n \n super.addDialogComponent(new DialogComponentSeparator());\n\n SettingsModelBoolean adjustDegreeModel = createAdjustDegreeOptionModel();\n super.addDialogComponent(new DialogComponentBoolean(\n \t\tadjustDegreeModel, \"Adjust degree\"));\n DialogComponentEnumFilterPanel<AdjustQueryWhichFlags> filterPanelDegreeOption = \n \t\tnew DialogComponentEnumFilterPanel(\n \t\tcreateAdjustDegreeFlagsOptionModel(adjustDegreeModel), \n \t\t\"Use the following flags to adjust degree:\",\n \t\tgenerateReducedFlagList(), true) {\n\t\t \tprotected void setEnabledComponents(boolean enabled) {\n\t\t \t\tsuper.setEnabledComponents(enabled);\n\t\t \t\tsetListCellRenderer(enabled ? TOOLTIP_LIST_RENDERER : new DefaultListCellRenderer());\n\t\t \t}\n\t\t };\n super.addDialogComponent(filterPanelDegreeOption);\n filterPanelDegreeOption.setSearchVisible(false);\n filterPanelDegreeOption.setExcludeTitle(\" Do not use \");\n filterPanelDegreeOption.setIncludeTitle(\" Use \");\n filterPanelDegreeOption.setListCellRenderer(TOOLTIP_LIST_RENDERER);\n filterPanelDegreeOption.getComponentPanel().setPreferredSize(new Dimension(550, 135));\n super.addDialogComponent(new DialogComponentSeparator());\n \n SettingsModelBoolean adjustRingCountModel = createAdjustRingCountOptionModel();\n super.addDialogComponent(new DialogComponentBoolean(\n \t\tadjustRingCountModel, \"Adjust ring count\"));\n DialogComponentEnumFilterPanel<AdjustQueryWhichFlags> filterPanelRingCountOption = \n \t\tnew DialogComponentEnumFilterPanel(\n \t\tcreateAdjustRingCountFlagsOptionModel(adjustRingCountModel), \n \t\t\"Use the following flags to adjust ring count:\", \n \t\tgenerateReducedFlagList(), true) {\n \tprotected void setEnabledComponents(boolean enabled) {\n \t\tsuper.setEnabledComponents(enabled);\n \t\tsetListCellRenderer(enabled ? TOOLTIP_LIST_RENDERER : new DefaultListCellRenderer());\n \t}\n };\n super.addDialogComponent(filterPanelRingCountOption);\n filterPanelRingCountOption.setSearchVisible(false);\n filterPanelRingCountOption.setExcludeTitle(\" Do not use \");\n filterPanelRingCountOption.setIncludeTitle(\" Use \");\n filterPanelRingCountOption.setListCellRenderer(TOOLTIP_LIST_RENDERER);\n filterPanelRingCountOption.getComponentPanel().setPreferredSize(new Dimension(550, 135));\n \n super.addDialogComponent(new DialogComponentSeparator());\n \n SettingsModelBoolean makeAtomsGenericModel = createMakeAtomsGenericOptionModel();\n super.addDialogComponent(new DialogComponentBoolean(\n \t\tmakeAtomsGenericModel, \"Make atoms generic\"));\n DialogComponentEnumFilterPanel<AdjustQueryWhichFlags> filterPanelAtomsGenericOption = \n \t\tnew DialogComponentEnumFilterPanel(\n \t\tcreateMakeAtomsGenericFlagsOptionModel(makeAtomsGenericModel), \n \t\t\"Use the following flags to make atoms generic:\", \n \t\tgenerateReducedFlagList(), true) {\n \tprotected void setEnabledComponents(boolean enabled) {\n \t\tsuper.setEnabledComponents(enabled);\n \t\tsetListCellRenderer(enabled ? TOOLTIP_LIST_RENDERER : new DefaultListCellRenderer());\n \t}\n };\n super.addDialogComponent(filterPanelAtomsGenericOption);\n filterPanelAtomsGenericOption.setSearchVisible(false);\n filterPanelAtomsGenericOption.setExcludeTitle(\" Do not use \");\n filterPanelAtomsGenericOption.setIncludeTitle(\" Use \");\n filterPanelAtomsGenericOption.setListCellRenderer(TOOLTIP_LIST_RENDERER);\n filterPanelAtomsGenericOption.getComponentPanel().setPreferredSize(new Dimension(550, 135));\n super.addDialogComponent(new DialogComponentSeparator());\n \n SettingsModelBoolean makeBondsGenericModel = createMakeBondsGenericOptionModel();\n super.addDialogComponent(new DialogComponentBoolean(\n \t\tmakeBondsGenericModel, \"Make bonds generic\"));\n DialogComponentEnumFilterPanel<AdjustQueryWhichFlags> filterPanelBondsGenericOption = \n \t\tnew DialogComponentEnumFilterPanel(\n \t\tcreateMakeBondsGenericFlagsOptionModel(makeBondsGenericModel), \n \t\t\"Use the following flags to make bonds generic:\", \n \t\tgenerateReducedFlagList(), true) {\n \tprotected void setEnabledComponents(boolean enabled) {\n \t\tsuper.setEnabledComponents(enabled);\n \t\tsetListCellRenderer(enabled ? TOOLTIP_LIST_RENDERER : new DefaultListCellRenderer());\n \t}\n };\n super.addDialogComponent(filterPanelBondsGenericOption);\n filterPanelAtomsGenericOption.setSearchVisible(false);\n filterPanelAtomsGenericOption.setExcludeTitle(\" Do not use \");\n filterPanelAtomsGenericOption.setIncludeTitle(\" Use \");\n filterPanelAtomsGenericOption.setListCellRenderer(TOOLTIP_LIST_RENDERER);\n filterPanelAtomsGenericOption.getComponentPanel().setPreferredSize(new Dimension(550, 135));\n super.addDialogComponent(new DialogComponentSeparator());\n \n super.addDialogComponent(new DialogComponentBoolean(\n \t\tcreateMakeDummiesQueriesOptionModel(), \"Make dummies queries\"));\n super.addDialogComponent(new DialogComponentBoolean(\n \t\tcreateAromatizeOptionModel(), \"Aromatize if possible\"));\n super.addDialogComponent(new DialogComponentBoolean(\n \t\tcreateAdjustConjugated5RingsOptionModel(), \"Adjust conjugated 5 rings\"));\n super.addDialogComponent(new DialogComponentBoolean(\n \t\tcreateSetMDL5RingAromaticityOptionModel(), \"Set MDL 5 ring aromaticity\"));\n super.addDialogComponent(new DialogComponentBoolean(\n \t\tcreateAdjustSingleBondsToDegree1NeighborsOptionModel(), \"Adjust single bonds to degree 1 neighbors\"));\n super.addDialogComponent(new DialogComponentBoolean(\n \t\tcreateAdjustSingleBondsBetweenAromaticAtomsOptionModel(), \"Adjust single bonds between aromatic atoms\"));\n super.addDialogComponent(new DialogComponentBoolean(\n \t\tcreateUseStereoCareForBondsOptionModel(), \"Use stereo care for bonds\"));\n\t\n\t}", "AutopsyOptionsPanel() {\n initComponents();\n fileChooser = new JFileChooser();\n fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n fileChooser.setMultiSelectionEnabled(false);\n fileChooser.setAcceptAllFileFilterUsed(false);\n fileChooser.setFileFilter(new GeneralFilter(GeneralFilter.GRAPHIC_IMAGE_EXTS, GeneralFilter.GRAPHIC_IMG_DECR));\n if (!PlatformUtil.is64BitJVM() || Version.getBuildType() == Version.Type.DEVELOPMENT) {\n //32 bit JVM has a max heap size of 1.4 gb to 4 gb depending on OS\n //So disabling the setting of heap size when the JVM is not 64 bit \n //Is the safest course of action\n //And the file won't exist in the install folder when running through netbeans\n memField.setEnabled(false);\n solrMaxHeapSpinner.setEnabled(false);\n }\n systemMemoryTotal.setText(Long.toString(getSystemMemoryInGB()));\n // The cast to int in the following is to ensure that the correct SpinnerNumberModel\n // constructor is called.\n solrMaxHeapSpinner.setModel(new javax.swing.SpinnerNumberModel(UserPreferences.getMaxSolrVMSize(),\n 512, ((int)getSystemMemoryInGB()) * MEGA_IN_GIGA, 512));\n\n textFieldListener = new TextFieldListener();\n agencyLogoPathField.getDocument().addDocumentListener(textFieldListener);\n logFileCount.setText(String.valueOf(UserPreferences.getLogFileCount()));\n }", "public ConditionFrame() \n {\n initComponents(); \n if(StaticData.choice!=3)\n {\n jButton_createView.setVisible(false);\n jTF_Viewname.setVisible(false);\n jLabel_ViewName.setVisible(false);\n }\n setLocationRelativeTo(null);\n getColumnNames();\n validate();\n }", "CartogramWizardOptionsWindow ()\n\t{\n\t\t\n\t\t// Set the window parameters.\n\t\tthis.setTitle(\"Advanced options\");\n\t\t\t\n\t\tthis.setSize(500, 580);\n\t\tthis.setLocation(40, 50);\n\t\tthis.setResizable(false);\n\t\tthis.setLayout(null);\n\t\tthis.setModal(true);\n\t\t\n\t\t\n\t\t\t\t\n\t\t// GRID LAYER CHECK BOX\n\t\tmGridLayerCheckBox = \n\t\t\tnew JCheckBox(\"Create a transformation grid layer\");\n\t\t\n\t\tmGridLayerCheckBox.setSelected(\n\t\t\tAppContext.cartogramWizard.getCreateGridLayer());\n\t\t\t\n\t\tmGridLayerCheckBox.setFont(new Font(null, Font.BOLD, 11));\n\t\tmGridLayerCheckBox.setLocation(20, 20);\n\t\tmGridLayerCheckBox.setSize(300, 26);\n\t\tthis.add(mGridLayerCheckBox);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// DEFORMATION GRID LAYER HELP TEXT\n\t\t\n\t\tClassLoader cldr = this.getClass().getClassLoader();\n\t\t\n\t\tJTextPane deformationGridPane = new JTextPane();\n\t\tString deformationText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"DeformationGridLayerText.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tdeformationText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tdeformationGridPane.setContentType(\"text/html\");\n\t\tdeformationGridPane.setText(deformationText);\n\t\tdeformationGridPane.setEditable(false);\n\t\tdeformationGridPane.addHyperlinkListener(this);\n\t\tdeformationGridPane.setBackground(null);\n\t\tdeformationGridPane.setLocation(45, 45);\n\t\tdeformationGridPane.setSize(400, 30);\n\t\tthis.add(deformationGridPane);\n\t\t\n\t\t\n\t\t\n\t\t// GRID SIZE TEXT FIELD\n\t\tJLabel gridSizeLabel = new JLabel(\"Enter the number of rows:\");\n\t\tgridSizeLabel.setLocation(45, 85);\n\t\tgridSizeLabel.setSize(140, 26);\n\t\tgridSizeLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tthis.add(gridSizeLabel);\n\t\t\n\t\tint gridSize = AppContext.cartogramWizard.getDeformationGridSize();\n\t\tString gridSizeString = \"\" + gridSize;\n\t\tmGridSizeTextField = new JTextField(gridSizeString);\n\t\tmGridSizeTextField.setLocation(240, 85);\n\t\tmGridSizeTextField.setSize(50, 26);\n\t\tmGridSizeTextField.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmGridSizeTextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tthis.add(mGridSizeTextField);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Separator\n\t\tJSeparator separator = new JSeparator(SwingConstants.HORIZONTAL);\n\t\tseparator.setLocation(20, 120);\n\t\tseparator.setSize(460, 10);\n\t\tthis.add(separator);\n\t\t\n\t\t\n\t\t\n\t\t// ADVANCED OPTIONS CHECK BOX\n\t\tmAdvancedOptionsCheckBox = \n\t\t\tnew JCheckBox(\"Define cartogram parameters manually\");\n\t\t\n\t\tmAdvancedOptionsCheckBox.setSelected(\n\t\t\tAppContext.cartogramWizard.getAdvancedOptionsEnabled());\n\t\t\t\n\t\tmAdvancedOptionsCheckBox.setFont(new Font(null, Font.BOLD, 11));\n\t\tmAdvancedOptionsCheckBox.setLocation(20, 140);\n\t\tmAdvancedOptionsCheckBox.setSize(360, 26);\n\t\tmAdvancedOptionsCheckBox.addChangeListener(this);\n\t\tthis.add(mAdvancedOptionsCheckBox);\n\t\t\n\t\t\n\t\t\n\t\t// Manual parameters text\n\t\tmManualParametersPane = new JTextPane();\n\t\tString manualParametersText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"ManualParametersText.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tmanualParametersText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmManualParametersPane.setContentType(\"text/html\");\n\t\tmManualParametersPane.setText(manualParametersText);\n\t\tmManualParametersPane.setEditable(false);\n\t\tmManualParametersPane.addHyperlinkListener(this);\n\t\tmManualParametersPane.setBackground(null);\n\t\tmManualParametersPane.setLocation(45, 170);\n\t\tmManualParametersPane.setSize(400, 30);\n\t\tmManualParametersPane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mManualParametersPane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Grid 1 text\n\t\tmGrid1Pane = new JTextPane();\n\t\tString grid1Text = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"Grid1Text.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tgrid1Text = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmGrid1Pane.setContentType(\"text/html\");\n\t\tmGrid1Pane.setText(grid1Text);\n\t\tmGrid1Pane.setEditable(false);\n\t\tmGrid1Pane.addHyperlinkListener(this);\n\t\tmGrid1Pane.setBackground(null);\n\t\tmGrid1Pane.setLocation(45, 210);\n\t\tmGrid1Pane.setSize(400, 60);\n\t\tmGrid1Pane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mGrid1Pane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Cartogram grid size\n\t\tmCartogramGridSizeLabel = \n\t\t\tnew JLabel(\"Enter the number of grid rows:\");\n\t\t\t\n\t\tmCartogramGridSizeLabel.setLocation(45, 270);\n\t\tmCartogramGridSizeLabel.setSize(170, 26);\n\t\tmCartogramGridSizeLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmCartogramGridSizeLabel.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mCartogramGridSizeLabel);\n\t\t\n\t\tint cgGridSizeX = AppContext.cartogramWizard.getCartogramGridSizeInX();\n\t\tint cgGridSizeY = AppContext.cartogramWizard.getCartogramGridSizeInY();\n\t\tint cgGridSize = Math.max(cgGridSizeX, cgGridSizeY);\n\t\tString cgGridSizeString = \"\" + cgGridSize;\n\t\tmCartogramGridSizeTextField = new JTextField(cgGridSizeString);\n\t\tmCartogramGridSizeTextField.setLocation(240, 270);\n\t\tmCartogramGridSizeTextField.setSize(50, 26);\n\t\tmCartogramGridSizeTextField.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmCartogramGridSizeTextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tmCartogramGridSizeTextField.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mCartogramGridSizeTextField);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Grid 2 text\n\t\tmGrid2Pane = new JTextPane();\n\t\tString grid2Text = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"Grid2Text.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tgrid2Text = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmGrid2Pane.setContentType(\"text/html\");\n\t\tmGrid2Pane.setText(grid2Text);\n\t\tmGrid2Pane.setEditable(false);\n\t\tmGrid2Pane.addHyperlinkListener(this);\n\t\tmGrid2Pane.setBackground(null);\n\t\tmGrid2Pane.setLocation(45, 315);\n\t\tmGrid2Pane.setSize(400, 50);\n\t\tmGrid2Pane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mGrid2Pane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Diffusion grid size\n\t\tmDiffusionGridSizeLabel = new JLabel(\"Diffusion grid size:\");\n\t\tmDiffusionGridSizeLabel.setLocation(45, 365);\n\t\tmDiffusionGridSizeLabel.setSize(170, 26);\n\t\tmDiffusionGridSizeLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmDiffusionGridSizeLabel.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mDiffusionGridSizeLabel);\n\t\t\n\t\tmDiffusionGridMenu = new JComboBox();\n\t\tmDiffusionGridMenu.setBounds(240, 365, 100, 26);\n\t\tmDiffusionGridMenu.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmDiffusionGridMenu.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tmDiffusionGridMenu.addItem(\"64\");\n\t\tmDiffusionGridMenu.addItem(\"128\");\n\t\tmDiffusionGridMenu.addItem(\"256\");\n\t\tmDiffusionGridMenu.addItem(\"512\");\n\t\tmDiffusionGridMenu.addItem(\"1024\");\n\t\t\n\t\tString strGridSize = \n\t\t\t\"\" + AppContext.cartogramWizard.getDiffusionGridSize();\n\t\t\t\n\t\tmDiffusionGridMenu.setSelectedItem(strGridSize);\n\t\t\n\t\tthis.add(mDiffusionGridMenu);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Iterations text\n\t\tmIterPane = new JTextPane();\n\t\tString iterText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"GastnerIterationsText.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\titerText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmIterPane.setContentType(\"text/html\");\n\t\tmIterPane.setText(iterText);\n\t\tmIterPane.setEditable(false);\n\t\tmIterPane.addHyperlinkListener(this);\n\t\tmIterPane.setBackground(null);\n\t\tmIterPane.setLocation(45, 405);\n\t\tmIterPane.setSize(400, 45);\n\t\tmIterPane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mIterPane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Iterations of diffusion algorithm\n\t\tmIterationsLabel = \n\t\t\tnew JLabel(\"Enter the number of iterations:\");\n\t\t\t\n\t\tmIterationsLabel.setLocation(45, 450);\n\t\tmIterationsLabel.setSize(190, 26);\n\t\tmIterationsLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmIterationsLabel.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mIterationsLabel);\n\n\t\tmDiffusionIterationsTextField = new JTextField(\n\t\t\t\"\" + AppContext.cartogramWizard.getDiffusionIterations());\n\t\tmDiffusionIterationsTextField.setLocation(240, 450);\n\t\tmDiffusionIterationsTextField.setSize(50, 26);\n\t\tmDiffusionIterationsTextField.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmDiffusionIterationsTextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tmDiffusionIterationsTextField.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mDiffusionIterationsTextField);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Cancel button\n\t\tJButton cancelButton = new JButton(\"Cancel\");\n\t\tcancelButton.setLocation(270, 510);\n\t\tcancelButton.setSize(100, 26);\n\t\t\n\t\tcancelButton.addActionListener(new \n\t\t\tCartogramWizardAdvancedOptionsAction(\n\t\t\t\"closeDialogWithoutSaving\", this));\n\t\t\t\n\t\tthis.add(cancelButton);\n\t\t\n\t\t\n\t\t// Ok button\n\t\tJButton okButton = new JButton(\"OK\");\n\t\tokButton.setLocation(380, 510);\n\t\tokButton.setSize(100, 26);\n\t\t\n\t\tokButton.addActionListener(new \n\t\t\tCartogramWizardAdvancedOptionsAction(\n\t\t\t\"closeDialogWithSaving\", this));\n\t\t\t\n\t\tthis.add(okButton);\n\t\t\n\n\n\n\t\t// ADD THE HELP BUTTON\n\t\t\t\t\n\t\tjava.net.URL imageURL = cldr.getResource(\"help-22.png\");\n\t\tImageIcon helpIcon = new ImageIcon(imageURL);\n\n\t\tJButton helpButton = \n\t\t\tnew JButton(helpIcon);\n\t\t\n\t\thelpButton.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\thelpButton.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\thelpButton.setSize(30, 30);\n\t\thelpButton.setLocation(20, 510);\n\t\thelpButton.setFocusable(false);\n\t\thelpButton.setContentAreaFilled(false);\n\t\thelpButton.setBorderPainted(false);\n\t\t\n\t\thelpButton.addActionListener(new CartogramWizardShowURL(\n\t\t\t\"http://chorogram.choros.ch/scapetoad/help/c-transformation-parameters.php#advanced-options\"));\n\t\t\n\t\tthis.add(helpButton);\n\n\n\n\t\n\t}", "public InfoOptions() {\n\t\tHelpOpt = new ArrayList<String>();\n\t\tDisplayOpt = new ArrayList<String>();\n\t\tNoteOpt = new ArrayList<String>();\n\t\tDelOpt = new ArrayList<String>();\n\t\tChangeNameOpt = new ArrayList<String>();\n\t\tsetDisplay();\n\t\tsetHelp();\n\t\tsetNote();\n\t\tsetDel();\n\t\tsetChangeName();\n\t}", "public OptionsMenu() {\n initComponents();\n }", "private void setUpOptionButtons() {\n setUpOptionOneButton();\n setUpOptionTwoButton();\n setUpOptionThreeButton();\n setUpProfileButton();\n setUpSignOutButton();\n }" ]
[ "0.6723532", "0.669481", "0.62011033", "0.62007374", "0.6199818", "0.61182934", "0.61121273", "0.60970235", "0.6092189", "0.6027891", "0.6022103", "0.59785813", "0.5973544", "0.5947241", "0.59271944", "0.5909007", "0.5845336", "0.5795282", "0.57905406", "0.5785127", "0.5778756", "0.57727236", "0.57453966", "0.571595", "0.5709966", "0.5706031", "0.5668852", "0.56667674", "0.5658305", "0.5621787", "0.5601438", "0.55952907", "0.55730397", "0.55718005", "0.5570882", "0.55553424", "0.5546452", "0.5545674", "0.5531574", "0.5523524", "0.55155724", "0.5515562", "0.55007535", "0.54949695", "0.54900175", "0.5465776", "0.5458895", "0.54461926", "0.54438365", "0.5438705", "0.54371476", "0.543567", "0.5426714", "0.54172707", "0.54172105", "0.54169196", "0.5411569", "0.54016507", "0.54014", "0.5399007", "0.5394801", "0.5390456", "0.53807986", "0.53804535", "0.5378385", "0.53783196", "0.53761905", "0.53743476", "0.53727734", "0.53722864", "0.5369678", "0.5367921", "0.5360497", "0.5356881", "0.5343705", "0.53421336", "0.5337789", "0.5337275", "0.5335644", "0.53291225", "0.5326214", "0.53242344", "0.5322213", "0.53213364", "0.5320876", "0.53201485", "0.53178304", "0.53176373", "0.5315088", "0.53092414", "0.52986765", "0.5298619", "0.5298066", "0.5295662", "0.5291651", "0.5291613", "0.5290383", "0.52818036", "0.52767444", "0.5275768", "0.52714163" ]
0.0
-1
/ Takes the users current money level and adds what they received for working a job
public static void setMoney(Integer payment) { money.moneyLevel += payment; money.save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addMoney(double profit){\n money+=profit;\n }", "public void updateMoney()\n\t\t{\n\t\t\t\n\t\t\tFPlayer p1 = this.viewer;\n\t\t\tFPlayer p2 = (p1.equals(this.t.p1)) ? this.t.p2 : this.t.p1;\n\t\t\t\n\t\t\tItemStack om = new ItemStack(Material.GREEN_WOOL,1);\n\t\t\tItemMeta it = om.getItemMeta();\n\t\t\tit.setDisplayName(ChatColor.DARK_GREEN+ChatColor.BOLD.toString()+\"Money in trade:\");\n\t\t\tit.setLore(Arrays.asList(new String[] {\"\",Util.getMoney(this.t.getMoneyTraded(p1)),\"\",\"Click to add/remove money from trade\"}));\n\t\t\tom.setItemMeta(it);\n\t\t\t\n\t\t\tif (this.canAdd()) super.contents.put(0,new ItemSwapMenu(this,om,new MenuMoney(super.viewer,this.t)));\n\t\t\telse super.contents.put(0,new ItemDummy(this,om));\n\t\t\t\n\t\t\t// Trader money in trade\n\t\t\tItemStack tm = new ItemStack(Material.GREEN_WOOL,1);\n\t\t\tit = tm.getItemMeta();\n\t\t\tit.setDisplayName(ChatColor.DARK_GREEN+ChatColor.BOLD.toString()+\"Money in trade:\");\n\t\t\tit.setLore(Arrays.asList(new String[] {\"\",Util.getMoney(this.t.getMoneyTraded(p2))}));\n\t\t\ttm.setItemMeta(it);\n\t\t\tsuper.contents.put(8,new ItemDummy(this,tm));\n\t\t\tthis.composeInv();\n\t\t}", "public static BigDecimal calcTotalMoney()\n {\n SharedPreferences defaultSP;\n defaultSP = PreferenceManager.getDefaultSharedPreferences(MainActivity.mActivity);\n manualTime = Integer.valueOf(defaultSP.getString(\"moneyMode\", \"4\"));\n boolean plus = PolyApplication.plus;\n PolyApplication app = ((PolyApplication) MainActivity.mActivity.getApplication());\n\n if(!plus)\n {\n\n if (manualTime == 4 && app.user.getMeals() > 0)\n {\n today.setToNow();\n int minutes = (today.hour * 60) + today.minute;\n if (minutes >= 420 && minutes <= 599)\n {\n money = mealWorth[0];\n } else if (minutes >= 600 && minutes <= 1019)\n {\n money = mealWorth[1];\n } else if (minutes >= 1020 && minutes <= 1214)\n {\n money = mealWorth[2];\n } else\n {\n money = mealWorth[3];\n }\n return money.subtract(moneySpent).setScale(2);\n } else if(app.user.getMeals() > 0)\n {\n return mealWorth[manualTime].subtract(moneySpent).setScale(2);\n }\n else\n {\n return new BigDecimal(0.00).subtract(moneySpent).setScale(2);\n }\n }\n else\n {\n return ((PolyApplication) MainActivity.mActivity.getApplication()).user.getPlusDollars().subtract(moneySpent);\n }\n }", "public void givePlayerLevelBonus() {\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\t\tp.addScore(5 * (currentLevel-1));\n\t\t\t}\n\t\t}\n\t\tserver.updateHighscoreList();\n\t\tserver.addTextToLoggingWindow(\"Server gives all players level bonus\");\n\t}", "public void companyPayRoll(){\n calcTotalSal();\n updateBalance();\n resetHoursWorked();\n topBudget();\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}", "private void calcCoins() {\n\t\tint changeDueRemaining = (int) Math.round((this.changeDue - (int) this.changeDue) * 100);\n\n\t\tif (changeDueRemaining >= 25) {\n\t\t\tthis.quarter += changeDueRemaining / 25;\n\t\t\tchangeDueRemaining = changeDueRemaining % 25;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.dime += changeDueRemaining / 10;\n\t\t\tchangeDueRemaining = changeDueRemaining % 10;\n\t\t}\n\t\tif (changeDueRemaining >= 5) {\n\t\t\tthis.nickel += changeDueRemaining / 5;\n\t\t\tchangeDueRemaining = changeDueRemaining % 5;\n\t\t}\n\t\tif (changeDueRemaining >= 1) {\n\t\t\tthis.penny += changeDueRemaining / 1;\n\t\t}\n\t}", "public void AddMoneySaved(double moneySaved){\n MoneySaved += moneySaved;\n }", "private void applyLvlUpCost() {\n }", "private void addPoint(){\n\n userList.addUserCorrect();\n userList.addUserAttempt();\n\n\n //This if levels up the user if they have reached the number of points needed\n if (userList.findCurrent().getNumPointsNeeded()\n <= userList.findCurrent().getNumQuestionsCorrect()) {\n\n userList.addUserPointsNeeded();//increment points needed to level up\n userList.levelUpUser();\n }\n }", "public int raiseMoney()\r\n {\r\n int total = super.raiseMoney();\r\n getCandidate().setMoneyMod(getCandidate().getMoneyMod() - .05);\r\n return total;\r\n }", "private static double getBonus(double unitsMade,double workAmount) {\n\n if (workAmount == 1) {\n\n if (unitsMade > 250) {\n\n return unitsMade * 0.10;\n }\n return 0;\n }\n else if (workAmount == 2) {\n\n if (unitsMade > 700) {\n\n return unitsMade * 0.10;\n }\n return 0;\n }\n\n return 0;\n }", "@Override\r\n\tpublic int getPayCheque() {\n\t\treturn profit+annuelSalary;\r\n\t\t\r\n\t}", "int getBonusMoney();", "public static void extract_money(){\n TOTALCMONEY = TOTALCMONEY - BALANCERETRIEVE; //the total cashier money equals the total cashier money minus the retrieve request\r\n BALANCE = BALANCE - BALANCERETRIEVE; //the user balance equals the account minus the retrieve request\r\n }", "private void calcBills() {\n\t\tint changeDueRemaining = (int) this.changeDue;\n\n\t\tif (changeDueRemaining >= 20) {\n\t\t\tthis.twenty += changeDueRemaining / 20;\n\t\t\tchangeDueRemaining = changeDueRemaining % 20;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.ten += changeDueRemaining / 10;\n\t\t\tchangeDueRemaining = changeDueRemaining % 10;\n\t\t}\n\t\tif (changeDueRemaining >= 5) {\n\t\t\tthis.five += changeDueRemaining / 5;\n\t\t\tchangeDueRemaining = changeDueRemaining % 5;\n\t\t}\n\t\tif (changeDueRemaining >= 1) {\n\t\t\tthis.one += changeDueRemaining;\n\t\t}\n\t}", "public abstract void onContribution(int amount, Player player);", "public void addMoneytoPurse(Player player, double winnings) {\n player.addMoneyToPurse(winnings);\n }", "void addIncomeToBudget();", "public void addMoney(final int newMoney) {\n\t\taddBehaviour(\n new OneShotBehaviour() {\n public void action() {\n budget += newMoney;\n System.out.println(newMoney + \" is added to wallet\");\n }\n }\n ); \n refreshGUI();\n }", "public int addPlayer(String name) {\n\t\tUser user = users.get(userTurn);\n\t\tFootballPlayer player = market.findPlayer(name);\n\t\tdouble marketValue = player.getMarketValue();\n\t\tSystem.out.println(\"budget before buy\" + user.getBudget());\n\t\t\n\t\tif(tmpTeam.containsPlayer(name)) {\n\t\t\treturn 1;\n\t\t} \n\t\telse if(user.hasEnoughBudget(marketValue)) {\n\t\t\ttmpTeam.addPlayer(name, player);\n\t\t\tuser.updateBudget(marketValue, \"-\");\n\t\t\tSystem.out.println(\"budget \" + user.getBudget());\n\t\t\tSystem.out.println(\"marketvalue \" +marketValue);\n\t\t\tSystem.out.println(\"budget after buy\" + user.getBudget());\n\t\t\treturn 0;\n\t\t}\n\t\treturn -1;\n\t}", "private void UpdateAdds() {\n Adds = (Level + CurrentHealth)/10;\n }", "public void add_bet_money(List<coins> bet,List<coins> currentmoney){\n\t\tfor(int i=0;i<currentmoney.size();i++) {\n\t\t\tcurrentmoney.get(i).qtt+=bet.get(i).qtt;\n\t\t}\n }", "private void communityChest(Player currentPlayer){\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n int nextPlayer;\n if(m_currentTurn >= m_numPlayers){\n nextPlayer = 0;\n } else {\n nextPlayer = m_currentTurn+1;\n }\n\n if(randomNum == 1){\n convertTextToSpeech(\"Your new business takes off, collect 200\");\n if(m_manageFunds) {\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(200);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Your friend hires your villa for a week, \" +\n \"collect 100 off the next player\");\n if(m_manageFunds) {\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(100);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n players.get(nextPlayer).subtractMoney(100);\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n }\n }\n if(randomNum == 3){\n convertTextToSpeech(\"You receive a tax rebate, collect 300\");\n if(m_manageFunds) {\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n }", "private void bankUserScore() {\n if (game.isPlayer_turn()) {\n game.addPlayerScore(round_score);\n player_tot_view.setText(String.valueOf(game.getPlayer_total()));\n }\n else {\n game.addBankScore(round_score);\n bank_tot_view.setText(String.valueOf(game.getBank_total()));\n }\n if (game.isGameWon()) {\n gameWonDialog();\n } else {\n game.changeTurn();\n round_score = 0;\n round_score_view.setText(String.valueOf(round_score));\n String label;\n if (game.isPlayer_turn()) {\n game.incrementRound();\n label = \"Round \" + game.getRound() + \" - Player's Turn\";\n }\n else {\n label = \"Round \" + game.getRound() + \" - Banker's Turn\";\n }\n round_label.setText(label);\n if (!game.isPlayer_turn())\n doBankTurn();\n }\n }", "private String money() {\r\n\t\tint[] m =tile.getAgentMoney();\r\n\t\tString out =\"Agent Money: \\n\";\r\n\t\tint total=0;\r\n\t\tint square=(int)Math.sqrt(m.length);\r\n\t\tif(square*square<m.length) {\r\n\t\t\tsquare++;\r\n\t\t}\r\n\t\tfor(int i=0; i<m.length;) {\r\n\t\t\tfor(int j=0; j<square; j++) {\r\n\t\t\t\tif(i<m.length) {\r\n\t\t\t\t\tout=out.concat(String.format(\"%8s\", m[i]+\"\"));\r\n\t\t\t\t\ttotal=total+m[i];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tj=square;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tout=out.concat(\"\\n\");\r\n\t\t}\r\n\t\tout=out.concat(\"Agent Total: \"+total);\r\n\t\tint companyTotal=0;\r\n\t\tout=out.concat(\"\\n\\nCompany Money: \\n\");\r\n\t\tm=tile.getCompanyMoney();\r\n\t\tsquare=(int)Math.sqrt(m.length);\r\n\t\tif(square*square<m.length) {\r\n\t\t\tsquare++;\r\n\t\t}\r\n\t\tfor(int i=0; i<m.length;) {\r\n\t\t\tfor(int j=0; j<square; j++) {\r\n\t\t\t\tif(i<m.length) {\r\n\t\t\t\t\tout=out.concat(String.format(\"%8s\", m[i]));\r\n\t\t\t\t\tcompanyTotal=companyTotal+m[i];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tj=square;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tout=out.concat(\"\\n\");\r\n\t\t}\r\n\t\tout=out.concat(\"Company Total: \"+companyTotal);\r\n\t\tout=out.concat(\"\\nTotal total: \"+(total+companyTotal));\r\n\t\tif(total+companyTotal!=tile.getPeopleSize()*tile.getAverageMoney()) {\r\n\t\t\tSTART=false;\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "public void addMoney(int income) {\r\n\t\tmoney += income;\r\n\t}", "public void Deposit(double ammount){\n abal = ammount + abal;\n UpdateDB();\n }", "private void haveFun() {\n\t\tint action = inputPrompt.funActivities(money);\r\n\t\tthis.money -= action;\r\n\t\t//has better effect depending on how much money you have spent\r\n\t\tthis.mentalHealth += FUNHEALTH + action;\r\n\t\tdailyTime--;\r\n\t\tinputPrompt.mainInfo(energy, physHealth, mentalHealth, money);\r\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 determineWeeklyPay(){\r\n weeklyPay = commission*sales;\r\n }", "@Override\n public double getTotalCommission() {\n double cost = 0.0;\n //increase cost for each report in the order\n for (Report report : reports.keySet()) {\n //report cost depends on the WorkType\n //audits are not capped by max employee count\n //regular orders are limited by max employee count\n int employeeCount = reports.get(report);\n cost += workType.calculateReportCost(report, employeeCount);\n }\n //increase cost of order based on priority\n //critical orders increase based on their critical loading\n //regular orders don't have an effect\n cost = priorityType.loadCost(cost);\n return cost;\n }", "public void addHours (int moreHours)\r\n{\r\nhoursWorked += moreHours;\r\n//IMPLEMENT THIS\r\n}", "public void addContribution(int amount) {\n\t\tactiveQuest.addEffort(amount);\n\t}", "public void calculateCommission(){\r\n commission = (sales) * 0.15;\r\n //A sales Person makes 15% commission on sales\r\n }", "public void consume (User user) {\n \n for (StoredPower theirStoredPower : user.superPowers) {\n StoredPower myStoredPower = getOrCreateStoredPower(theirStoredPower.power);\n myStoredPower.used += theirStoredPower.used;\n \n // dont regift the icebreakers you get for free\n if (theirStoredPower.power == Power.ICE_BREAKER) {\n int add = Math.max(0, theirStoredPower.available - INITIAL_ICE_BREAKERS);\n myStoredPower.available += add;\n } else if (theirStoredPower.power == Power.KARMA) {\n int add = Math.max(0, theirStoredPower.available - INITIAL_KARMA);\n myStoredPower.available += add; \n } else {\n myStoredPower.available += theirStoredPower.available;\n }\n myStoredPower.level = Math.max(myStoredPower.level, theirStoredPower.level);\n myStoredPower.save();\n }\n \n for (Integer i : user.getSeenIceBreakers()) {\n this.addSeenIceBreaker(i);\n }\n \n for (KarmaKube k : user.getKubes()) {\n k.recipient_id = this.id;\n k.save(); \n }\n \n for (Long group_id : UserExclusion.userGroups(user.id)) {\n new UserExclusion(this.id, group_id);\n }\n \n this.coinCount += user.coinCount;\n this.coinsEarned += user.coinsEarned;\n this.chatTime += user.chatTime; \t\n this.messageCount += user.messageCount;\n this.gotMessageCount += user.gotMessageCount;\n this.joinCount += user.joinCount;\n this.offersMadeCount += user.offersMadeCount; \t\t\n this.offersReceivedCount += user.offersReceivedCount; \t\n this.revealCount += user.revealCount;\n this.save();\n \n user.delete();\n\t}", "public String payWorker() {\n\t\tString ret;\n\t\tif (!super.payWorker().isEmpty()) {\n\t\t\tNumberFormat formatter = new DecimalFormat(\"#0.00\");\n\t\t\tret = getName() + \" is an hourly Worker and is paid \" + formatter.format(getPayment());\n\t\t\tSystem.out.println(ret);\n\t\t\tthis.num_hours = 0;\n\t\t\treturn ret;\n\t\t} else {\n\t\t\tret = getName() + \" has already been paid and needs to work more hours this week.\";\n\t\t\tSystem.out.println(ret);\n\t\t\treturn ret;\n\t\t}\n\t}", "private double calculateMoneyToSpend() {\n\t\tdouble moneyToSpend = getMoney();\n\t\tif(moneyToSpend < 300) {\n\t\t\tmoneyToSpend = 0;//We do not want the player to go below 200E\n\t\t}\n\t\telse if(moneyToSpend < 500) {\n\t\t\tmoneyToSpend *= 0.34;\n\t\t}\n\t\telse if(moneyToSpend < 1000) {\n\t\t\tmoneyToSpend*= 0.4;\n\t\t}\n\t\telse if(moneyToSpend < 1500) {\n\t\t\tmoneyToSpend*= 0.5;\n\t\t}\n\t\telse if(moneyToSpend < 2000) {\n\t\t\tmoneyToSpend*= 0.6;\n\t\t}\n\t\telse {\n\t\t\tmoneyToSpend*= 0.7;\n\t\t}\n\t\treturn moneyToSpend;\n\t}", "public void add(Money money2) {\n dollars += money2.getDollars();\n cents += money2.getCents();\n if (cents >= 100) {\n dollars += 1;\n cents -= 100;\n }\n }", "@Override\r\n public void tuitionDue() {\r\n if (getTotalTuitionPaid() > 0)\r\n return;\r\n double _tuitionOwed = 0;\r\n if (getCredits() < MINIMUM_FULL_TIME_CREDITS)\r\n _tuitionOwed = (getCredits() * RESIDENT_TUITION_RATE_PER_CREDIT) + PART_TIME_UNIVERSITY_FEE;\r\n else if (getCredits() >= MINIMUM_FULL_TIME_CREDITS && getCredits() <= ADDITIONAL_TUITION_CREDIT_THRESHOLD)\r\n _tuitionOwed = FULL_TIME_RESIDENT_TUITION + FULL_TIME_UNIVERSITY_FEE - financialAid;\r\n else\r\n _tuitionOwed = FULL_TIME_RESIDENT_TUITION + FULL_TIME_UNIVERSITY_FEE + (RESIDENT_TUITION_RATE_PER_CREDIT * \r\n (getCredits() - ADDITIONAL_TUITION_CREDIT_THRESHOLD)) - financialAid;\r\n setTuitionOwed(_tuitionOwed);\r\n }", "public double calculateWIP() {\n\t\tdouble totalDeliveryRate = 0.0;\n\t\tdouble totalLeadTime = 0.0;\n LinkedList<Card> completedCards = BoardManager.get().getCurrentBoard().getCardsOf(Role.COMPLETED_WORK);\n for (Card card : completedCards) {\n totalLeadTime += (int) DAYS.between(card.getCreationDate(versions), card.getCompletionDate(versions));\n\t\t\ttotalDeliveryRate += card.getStoryPoints();\t\n\n }\n\t\ttotalDeliveryRate = totalDeliveryRate/ (BoardManager.get().getCurrentBoard().getAge()); // avrage of cards delivered per time unit\n\t\ttotalLeadTime = totalLeadTime / completedCards.size(); // avarage time it takes to finish a card\n return Math.round(totalDeliveryRate * totalLeadTime * 100D) / 100D;\n }", "public int currentMoney() {\r\n\t\treturn money;\r\n\t}", "private void updateHumanPlayerMoney()\n {\n lbMyMoney.setText(\"My money: \" + humanPlayer.getMoney());\n }", "private void botTrading(){\n if(game.isCardPositive(game.getHighestSharePriceStock())){\n int numShares = player.getFunds()/(game.getHighestSharePriceStock().getSharePrice()+3);\n player.getShares().set(game.getIndex(game.getHighestSharePriceStock()), player.getShares().get(game.getIndex(game.getHighestSharePriceStock())) + numShares);\n player.setFunds(-numShares*(game.getHighestSharePriceStock().getSharePrice()+3));\n }\n }", "@Override\n public Change returnChange() {\n Change change = new Change();\n BigDecimal moneyInPennies = totalMoney.multiply(new BigDecimal(\"100\"));\n Integer moneyInPenniesInt = moneyInPennies.intValueExact();\n Integer remainingPennies = moneyInPenniesInt;\n\n// to keep track of how much $ will be returned in change \n change.setTotalChange(totalMoney);\n\n change.setNumQuarters(remainingPennies / 25);\n remainingPennies = remainingPennies % 25;\n change.setNumDimes(remainingPennies / 10);\n remainingPennies = remainingPennies % 10;\n change.setNumNickels(remainingPennies / 5);\n remainingPennies = remainingPennies % 5;\n change.setNumPennies(remainingPennies);\n\n totalMoney = new BigDecimal(\"0\");\n userChoice = null;\n return change;\n }", "public void collectWinnings() {\n\t\tif (hand.checkBlackjack()) {\n\t\t\tdouble win = bet * 1.5;\n\t\t\ttotalMoney += (win + bet);\n\t\t} else {\n\t\t\ttotalMoney += (bet + bet);\n\t\t}\n\t}", "public void addJackpot(int amount){\n this.amount += amount;\n }", "public void ventaBilleteMaquina2()\n {\n maquina2.insertMoney(600);\n maquina1.printTicket();\n }", "static private void calculateMissionScore() {\n\n HashMap<String, Boolean> missionStatus = allMissions.missionStatus;\n\n for (String i : missionStatus.keySet()) {\n\n if (missionStatus.get(i) == true) {\n score.addToPoints(250);\n }\n }\n }", "int getMoney();", "protected void increaseCoin(String userID, double coin){\n }", "public void addHealthLevel(int points)\n {\n healthLevel = healthLevel + points;\n showHealthLevel();\n if (healthLevel < 0) \n {\n Greenfoot.playSound(\"game-over.wav\");\n Greenfoot.stop();\n }\n }", "public int getCurrentPlayerFunds(){return currentPlayerTurn.getFunds();}", "public void addBet(int betAmount) {\n if (playerCash >= betAmount) {\n playerCash -= betAmount;\n playerBet += betAmount;\n }\n }", "public void updatePriority() {//determines todays suggestion and updats queue\n\t\t \n\t\t if(newUser == true) {\n\t\t\t System.out.println(\"NEW USER\");\n\t\t\t int count = 14;\n\t\t\t \n\t\t\t if(getLikesAmerican() == \"Yes\") {\n\t\t\t\t AmericanPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t AmericanPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesAsian() == \"Yes\") {\n\t\t\t\t AsianPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t AsianPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesBakery() == \"Yes\") {\n\t\t\t\t BakeryPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t BakeryPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesBar() == \"Yes\") {\n\t\t\t\t BarPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t BarPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesBreakfast() == \"Yes\") {\n\t\t\t\t BreakfastPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t BreakfastPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesCafe() == \"Yes\") {\n\t\t\t\t CafePriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t CafePriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesCaribbean() == \"Yes\") {\n\t\t\t\t CaribbeanPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t CaribbeanPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesChicken() == \"Yes\") {\n\t\t\t\t ChickenPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t ChickenPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesEuropean() == \"Yes\") {\n\t\t\t\t EuropeanPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t EuropeanPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesFastFood() == \"Yes\") {\n\t\t\t\t FastFoodPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t FastFoodPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesHealthFood() == \"Yes\") {\n\t\t\t\t HealthFoodPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t HealthFoodPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesLatinAmerican() == \"Yes\") {\n\t\t\t\t LatinAmericanPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t LatinAmericanPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesPizza() == \"Yes\") {\n\t\t\t\t PizzaPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t PizzaPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesSandwich() == \"Yes\") {\n\t\t\t\t SandwichPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t SandwichPriority = -99;\n\t\t\t }\n\t\t\t \n\t\t\t if(getLikesSeafood() == \"Yes\") {\n\t\t\t\t SeafoodPriority = count;\n\t\t\t\t count--;\n\t\t\t }else {\n\t\t\t\t SeafoodPriority = -99;\n\t\t\t }\n\t\t\t\n\t\t }\n\t\t else {\n\t\t\t System.out.println(\"CURRENT USER\");\n\t\t\t int i = GenerateRandom(12, 14);\n\t\t\t int min = 14-yesCount();\n\t\t\t \n\t\t\t if(AmericanPriority == i) {\n\t\t\t\t todaySuggestion = \"American\";\n\t\t\t\t AmericanPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(AsianPriority == i) {\n\t\t\t\t todaySuggestion = \"Asian\";\n\t\t\t\t AsianPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(BakeryPriority == i) {\n\t\t\t\t todaySuggestion = \"Bakery\";\n\t\t\t\t BakeryPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(BarPriority == i) {\n\t\t\t\t todaySuggestion = \"Bar\";\n\t\t\t\t BarPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(BreakfastPriority == i) {\n\t\t\t\t todaySuggestion = \"Breakfast\";\n\t\t\t\t BreakfastPriority = min;\n\t\t\t }\n\n\t\t\t if(CafePriority == i) {\n\t\t\t\t todaySuggestion = \"Cafe\";\n\t\t\t\t CafePriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(CaribbeanPriority == i) {\n\t\t\t\t todaySuggestion = \"Caribbean\";\n\t\t\t\t CaribbeanPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(ChickenPriority == i) {\n\t\t\t\t todaySuggestion = \"Chicken\";\n\t\t\t\t ChickenPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(EuropeanPriority == i) {\n\t\t\t\t todaySuggestion = \"European \";\n\t\t\t\t EuropeanPriority = min;\n\t\t\t }\n\n\t\t\t if(FastFoodPriority == i) {\n\t\t\t\t todaySuggestion = \"Fast Food\";\n\t\t\t\t FastFoodPriority = min;\n\t\t\t }\n\n\t\t\t if(HealthFoodPriority == i) {\n\t\t\t\t todaySuggestion = \"Health food\";\n\t\t\t\t HealthFoodPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(LatinAmericanPriority == i) {\n\t\t\t\t todaySuggestion = \"Latin American\";\n\t\t\t\t LatinAmericanPriority = min;\n\t\t\t }\n\n\t\t\t if(PizzaPriority == i) {\n\t\t\t\t todaySuggestion = \"Pizza\";\n\t\t\t\t PizzaPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(SandwichPriority == i) {\n\t\t\t\t todaySuggestion = \"Sandwich\";\n\t\t\t\t SandwichPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t if(SeafoodPriority == i) {\n\t\t\t\t todaySuggestion = \"Seafood\";\n\t\t\t\t SeafoodPriority = min;\n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t if(i == 14) {//update everything -99<x +1\n\t\t\t\t if(AmericanPriority > -50) {\n\t\t\t\t\t AmericanPriority++;\n\t\t\t\t }\n\t\t\t\t if(AsianPriority > -50) {\n\t\t\t\t\t AsianPriority++;\n\t\t\t\t }\n\t\t\t\t if(BakeryPriority > -50) {\n\t\t\t\t\t BakeryPriority++;\n\t\t\t\t }\n\t\t\t\t if(BarPriority > -50) {\n\t\t\t\t\t BarPriority++;\n\t\t\t\t }\n\t\t\t\t if(BreakfastPriority > -50) {\n\t\t\t\t\t BreakfastPriority++;\n\t\t\t\t }\n\t\t\t\t if(CafePriority > -50) {\n\t\t\t\t\t CafePriority++;\n\t\t\t\t }\n\t\t\t\t if(CaribbeanPriority > -50) {\n\t\t\t\t\t CaribbeanPriority++;\n\t\t\t\t }\n\t\t\t\t if(ChickenPriority > -50) {\n\t\t\t\t\t ChickenPriority++;\n\t\t\t\t }\n\t\t\t\t if(EuropeanPriority > -50) {\n\t\t\t\t\t EuropeanPriority++;\n\t\t\t\t }\n\t\t\t\t if(FastFoodPriority > -50) {\n\t\t\t\t\t FastFoodPriority++;\n\t\t\t\t }\n\t\t\t\t if(HealthFoodPriority > -50) {\n\t\t\t\t\t HealthFoodPriority++;\n\t\t\t\t }\n\t\t\t\t if(LatinAmericanPriority > -50) {\n\t\t\t\t\t LatinAmericanPriority++;\n\t\t\t\t }\n\t\t\t\t if(PizzaPriority > -50) {\n\t\t\t\t\t PizzaPriority++;\n\t\t\t\t }\n\t\t\t\t if(SandwichPriority > -50) {\n\t\t\t\t\t SandwichPriority++;\n\t\t\t\t }\n\t\t\t\t if(SeafoodPriority > -50) {\n\t\t\t\t\t SeafoodPriority++;\n\t\t\t\t }\n\t\t\t }\n\t\t\t \n\t\tif(i == 13) {//update everything -99<x<13 +1\n\t\t\t\t if(AmericanPriority > -50 && AmericanPriority < 13) {\n\t\t\t\t\t AmericanPriority++;\n\t\t\t\t }\n if(AsianPriority > -50 && AsianPriority < 13) {\n\t\t\t\t\t AsianPriority++;\n\t\t\t\t }\n if(BakeryPriority > -50 && BakeryPriority < 13) {\n\t\t\t\t\t BakeryPriority++;\n\t\t\t\t }\n if(BarPriority > -50 && BarPriority < 13) {\n\t\t\t\t\t BarPriority++;\n\t\t\t\t }\n if(BreakfastPriority > -50 && BreakfastPriority < 13) {\n\t\t\t\t\t BreakfastPriority++;\n\t\t\t\t }\n if(CafePriority > -50 && CafePriority < 13) {\n\t\t\t\t\t CafePriority++;\n\t\t\t\t }\n if(CaribbeanPriority > -50 && CaribbeanPriority < 13) {\n\t\t\t\t\t CaribbeanPriority++;\n\t\t\t\t }\n if(ChickenPriority > -50 && ChickenPriority < 13) {\n\t\t\t\t\t ChickenPriority++;\n\t\t\t\t }\n if(EuropeanPriority > -50 && EuropeanPriority < 13) {\n\t\t\t\t\t EuropeanPriority++;\n\t\t\t\t }\n if(FastFoodPriority > -50 && FastFoodPriority < 13) {\n\t\t\t\t\t FastFoodPriority++;\n\t\t\t\t }\n if(HealthFoodPriority > -50 && HealthFoodPriority < 13) {\n\t\t\t\t\t HealthFoodPriority++;\n\t\t\t\t }\n if(LatinAmericanPriority > -50 && LatinAmericanPriority < 13) {\n\t\t\t\t\t LatinAmericanPriority++;\n\t\t\t\t }\n if(PizzaPriority > -50 && PizzaPriority < 13) {\n\t\t\t\t\t PizzaPriority++;\n\t\t\t\t }\n if(SandwichPriority > -50 && SandwichPriority < 13) {\n\t\t\t\t\t SandwichPriority++;\n\t\t\t\t }\n if(SeafoodPriority > -50 && SeafoodPriority < 13) {\n\t\t\t\t\t SeafoodPriority++;\n\t\t\t\t }\n\t\t\t }\n\n if(i == 12){//update everything -99<x<12 +1\n\t\t if(AmericanPriority > -50 && AmericanPriority < 12) {\n\t\t\t\t\t AmericanPriority++;\n\t\t\t\t }\n if(AsianPriority > -50 && AsianPriority < 12) {\n\t\t\t\t\t AsianPriority++;\n\t\t\t\t }\n if(BakeryPriority > -50 && BakeryPriority < 12) {\n\t\t\t\t\t BakeryPriority++;\n\t\t\t\t }\n if(BarPriority > -50 && BarPriority < 12) {\n\t\t\t\t\t BarPriority++;\n\t\t\t\t }\n if(BreakfastPriority > -50 && BreakfastPriority < 12) {\n\t\t\t\t\t BreakfastPriority++;\n\t\t\t\t }\n if(CafePriority > -50 && CafePriority < 12) {\n\t\t\t\t\t CafePriority++;\n\t\t\t\t }\n if(CaribbeanPriority > -50 && CaribbeanPriority < 12) {\n\t\t\t\t\t CaribbeanPriority++;\n\t\t\t\t }\n if(ChickenPriority > -50 && ChickenPriority < 12) {\n\t\t\t\t\t ChickenPriority++;\n\t\t\t\t }\n if(EuropeanPriority > -50 && EuropeanPriority < 12) {\n\t\t\t\t\t EuropeanPriority++;\n\t\t\t\t }\n if(FastFoodPriority > -50 && FastFoodPriority < 12) {\n\t\t\t\t\t FastFoodPriority++;\n\t\t\t\t }\n if(HealthFoodPriority > -50 && HealthFoodPriority < 12) {\n\t\t\t\t\t HealthFoodPriority++;\n\t\t\t\t }\n if(LatinAmericanPriority > -50 && LatinAmericanPriority < 12) {\n\t\t\t\t\t LatinAmericanPriority++;\n\t\t\t\t }\n if(PizzaPriority > -50 && PizzaPriority < 12) {\n\t\t\t\t\t PizzaPriority++;\n\t\t\t\t }\n if(SandwichPriority > -50 && SandwichPriority < 12) {\n\t\t\t\t\t SandwichPriority++;\n\t\t\t\t }\n if(SeafoodPriority > -50 && SeafoodPriority < 12) {\n\t\t\t\t\t SeafoodPriority++;\n\t\t\t\t }\n\t\t\t }\n\t\t\t \n\t\t }\n\t\t \n\t\t \n\t }", "public void payFees(int fees) {\n feesPaid += fees;\n School.updateTotalMoneyEarned(feesPaid);\n }", "@Override\n\tvoid money() {\n\t\t\n\t}", "public BigDecimal sumGoodwillTotal(MaintenanceRequest po){\n\t\tBigDecimal total = new BigDecimal(0.00).setScale(2);\n\t\t\n\t\tfor(MaintenanceRequestTask task : po.getMaintenanceRequestTasks()){\n\t\t\ttotal = total.add(MALUtilities.isEmpty(task.getGoodwillCost()) ? new BigDecimal(0) : task.getGoodwillCost());\n\t\t}\n\t\t\n\t\treturn total;\t\t\n\t}", "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}", "public void addCash(double added_cash) {\n cash += added_cash;\n }", "public static void main(String[] args)\n {\n Scanner input = new Scanner(System.in);\n System.out.println(\"Your name please\");\n String name = input.nextLine();\n\n // get a number from the user\n System.out.println(\"Give me the amount of money in cents please, \" + name);\n int money = input.nextInt();\n \n // limit the size of the number\n while(money>100000000)\n {\n\tSystem.out.println(\"This number is too big.\");\n\tSystem.out.println(\"Please enter something smaller\");\n\tmoney = input.nextInt();\n }\n \n // do the calculations\n\n int hundreds = money / 10000;\n int leftover = money % 10000;\n\n int fifties = leftover / 5000;\n leftover = leftover % 5000;\n\n int twenties = leftover / 2000;\n leftover = leftover % 2000;\n\n int tens = leftover / 1000;\n leftover = leftover % 1000;\n\n int fives = leftover / 500;\n leftover = leftover % 500;\n\n int ones = leftover / 100;\n leftover = leftover % 100;\n\n int quarters = leftover / 25;\n leftover = leftover % 25;\n\n int dimes = leftover / 10;\n leftover = leftover % 10;\n\n int nickels = leftover / 5;\n leftover = leftover % 5;\n\n int pennies = leftover / 1;\n\n // print the results\n System.out.println(\"\"); System.out.println(\"\"); //formating for results\n\n System.out.println(\"******Dollar Bills******\"); //This is printout of dollar bills \n System.out.print(hundreds + \" Hundred dollar bill(s), \");\n System.out.print(fifties + \" Fifty dollar bill(s), \");\n System.out.print(twenties + \" Twenty dollar bill(s), \"); \n System.out.print(tens + \" Ten dollar bill(s), \");\n System.out.print(fives + \" Five dollar bill(s), \");\n System.out.print(ones + \" One dollar bill(s)\");\n \n System.out.println(\"\"); System.out.println(\"\"); \n\n System.out.println(\"******Coins******\"); //This will printout coins \n System.out.print(quarters + \" Quarter(s), \");\n System.out.print(dimes + \" Dime(s), \");\n System.out.print(nickels + \" Nickel(s), \");\n System.out.print(pennies + \" Penny(s)\");\n\n System.out.println(\"\"); //formating for results2\n\n }", "private void updateComputerPlayerMoney()\n {\n lb_money_1.setText(\"My money: \" + computerPlayer_1.getMoney());\n\n // step 2. set lb_money_2 to be \"\"My money: \" + computerPlayer_2.getMoney(), using setText() of the label\n lb_money_2.setText(\"My money: \" + computerPlayer_2.getMoney());\n }", "public void action(Player myPlayer)\n {\n if (getNbUtilisation() == 0) {\n System.out.println(\"Not possible\");\n } else {\n int nHealthy = getPointsHealthy();\n myPlayer.addLifePoints(nHealthy);\n\n }\n }", "@Override\n\tpublic void landedOn() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(300);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 300 dollars by landing on Bonus Square\");\n\t\tMonopolyGameController.allowCurrentPlayerToEndTurn();\n\n\t}", "void addGameScoreToMainScore(){\n sharedPreferences= PreferenceManager.getDefaultSharedPreferences(this);\n editor=sharedPreferences.edit();\n int score=sharedPreferences.getInt(\"gameScore\",0);\n score=score+userCoins;\n editor.putInt(\"gameScore\",score);\n editor.commit();\n\n }", "private static int levelUp(int playerLevel){\r\n int level = playerLevel + 1;\r\n System.out.println(\"You have leveled up!\"); \r\n //Tells the user what level they are\r\n System.out.println(\"You are now level \" + level + \"!\");\r\n return level;\r\n }", "@Override\n\tpublic void withdraw(int money) {\n\t\t\n\t}", "public void ventaBilleteMaquina1()\n {\n maquina1.insertMoney(500);\n maquina1.printTicket();\n }", "public void updateAccount() {\r\n\t\t\r\n\t\t//update all totals\r\n\t\ttotalYouOwe = 0.0;\r\n\t\ttotalOwedToYou = 0.0;\r\n\t\tbalance = 0.0;\r\n\t\tnetBalance = 0.0;\r\n\t\t\r\n\t\t//totalYouOwe and totalOwedToYou\r\n\t\tfor (Event e : events) {\r\n\t\t\tif (e.isParticipantByGID(GID)) {\r\n\t\t\t\tif (e.getParticipantByGID(GID).getBalance() > 0) {\r\n\t\t\t\t\ttotalOwedToYou = totalOwedToYou + e.getParticipantByGID(GID).getBalance(); \r\n\t\t\t\t} else {\r\n\t\t\t\t\ttotalYouOwe = totalYouOwe + (-e.getParticipantByGID(GID).getBalance());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//netBalance/balance - the same in current implementation\r\n\t\tnetBalance = totalOwedToYou - totalYouOwe;\r\n\t\tbalance = totalOwedToYou - totalYouOwe;\r\n\t\t\r\n\t\tupdatePastRelations();\r\n\t}", "private double calculateMoneyInserted() {\r\n double amount = 0.0;\r\n\r\n for(VendingMachine.Coin coin : coins) {\r\n amount += coin.amount();\r\n }\r\n return amount;\r\n }", "public static void experience(){\n PlayerStats.currentEXP += (12*AC + 8*totalHP);\n System.out.println(\"You gained \" +(12*AC + 8*totalHP)+ \" experience!\");\n }", "private void sendBucks() {\n\t\tconsole.printUsers(userService.getAll(currentUser.getToken()));\n\t\tSystem.out.println(\"\");\n\n\t\tBoolean validResponse = false;\n\t\tint selectedUserId = -1;\n\t\tBigDecimal transferAmount = new BigDecimal(0);\n\t\tBigDecimal zero = new BigDecimal(0);\n\t\tBigDecimal currentBalance = (accountService.getAccountBalance(currentUser.getToken()));\n\t\tTransfer transfer = new Transfer();\n\n\t\twhile (true) {\n\t\t\t// ask which user you want to send money to or exit\n\t\t\tselectedUserId = console.getUserInputInteger(\"Enter ID of user you are sending to (0 to cancel)\");\n\t\t\tif (selectedUserId == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (selectedUserId > 0 && selectedUserId <= userService.getAll(currentUser.getToken()).length) {\n\t\t\t\t// prompt for amount to send\n\t\t\t\ttransferAmount = console.getUserInputBigDecimal(\"Enter amount\");\n\t\t\t\t// transfer money\n\n\t\t\t\tif (transferAmount.compareTo(zero) == 1 && transferAmount.compareTo(currentBalance) <= 0) {\n\n\t\t\t\t\ttransfer.setFromUserId(currentUser.getUser().getId());\n\t\t\t\t\ttransfer.setToUserId(selectedUserId);\n\t\t\t\t\ttransfer.setTransferAmount(transferAmount);\n\t\t\t\t\ttransfer.setStatusOfTransferId(2);\n\t\t\t\t\ttransfer.setTypeOfTransferId(2);\n\n\t\t\t\t\t\n\t\t\t\t\ttransferService.createTransfer(currentUser.getToken(), transfer);\n\t\t\t\t\tSystem.out.println(\"\\nTransfer Complete!\");\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(\"\\nInsufficient Funds! Please try again.\\n\");\n\n\t\t\t}\n\t\t}\n\n\t}", "void addToAmount(double amount) {\n this.currentAmount += amount;\n }", "public void setBankroll(double money) {\n bankroll += money;\n if (bankroll <= 0){\n activePlayer = false;\n }\n }", "private void calculeStatAdd() {\n resourceA = this.getContext().getGame().getPlayer(idPlayer).getInventory().getValueRessource(type);\n int win = resourceA - resourceB;\n int diff = (resourceB - resourceA) + value;\n this.getContext().getStats().incNbRessourceWinPlayers(idPlayer,type,win);\n this.getContext().getStats().incNbRessourceExtendMaxPlayers(idPlayer,type,diff);\n }", "public void payForOrder(){\n\t\tcurrentOrder.setDate(new Date()); // setting date to current\n\t\t\n\t\t//Checking if tendered money is enough to pay for the order.\n\t\tfor(;;){\n\t\t\tJOptionPane.showMessageDialog(this.getParent(), new CheckoutPanel(currentOrder), \"\", JOptionPane.PLAIN_MESSAGE);\n\t\t\tif(currentOrder.getTendered().compareTo(currentOrder.getSubtotal())==-1){\n\t\t\t\tJOptionPane.showMessageDialog(this.getParent(), \"Not enough money tendered\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//Setting order number.\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tString str = df.format(currentOrder.getDate());\n\t\tString number = Integer.toString(till.getOrders().size()+1) +\"/\"+str;\n\t\tcurrentOrder.setNumber(number);\n\t\t\n\t\t//Setting customer name.\n\t\tcurrentOrder.setCustomerName(custNameField.getText());\n\t\t\n\t\t//Adding current order to orders list.\n\t\ttill.getOrders().add(currentOrder); \n\t\t\n\t\t//Displays the receipt.\n\t\tJOptionPane.showMessageDialog(this.getParent(), new ReceiptPanel(currentOrder), \"Receipt\", \n\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t\t\n\t\t//Resets OrderPanel.\n\t\tthis.resetOrder();\n\t}", "public double insertCoin() {\n String coinslist[] = { \"5p\",\"10p\", \"20p\", \"50p\", \"£1\", \"£2\" };\n Menu coins = new Menu(\"Select a Coin\", coinslist);\n coins.display();\n int choice = coins.getChoice();\n while (choice < 1 || choice > coinslist.length) {\n choice = coins.getChoice();\n }\n double coin_value = 0;\n\n switch (choice) {\n case 1:\n coin_value = 0.05;\n break;\n case 2:\n coin_value = 0.1;\n break;\n case 3:\n coin_value = 0.2;\n break;\n case 4:\n coin_value = 0.5;\n break;\n case 5:\n coin_value = 1;\n break;\n case 6:\n coin_value = 2;\n break;\n default:\n }\n userMoney += coin_value;\n System.out.println(\"You have entered: £\" + coin_value);\n System.out.println(\"Total Credit: £\" + userMoney);\n\n\t\treturn coin_value;\n\n }", "public double addToSpent(double addAmount){\r\n\t\tspent +=addAmount;\r\n\t\treturn spent;\r\n\t}", "public void addMoney(int amount) {\n\t\tmoney += amount;\n\t}", "public void recordPurchase(double amount)\n {\n balance = balance - amount;\n // your code here\n \n }", "public void addCoins(int coins) {\n total_bal += coins;\n }", "double getMoney();", "public static void amountPaid(){\n NewProject.tot_paid = Double.parseDouble(getInput(\"Please enter NEW amount paid to date: \"));\r\n\r\n UpdateData.updatePayment();\r\n updateMenu();\t//Return back to previous menu.\r\n\r\n }", "public final void addCoins(int coinsToAdd) {\n\t\tsetCoinCount(jbsCoins() + coinsToAdd);\n\t\t\n\t\tif (jbsCoins() < 0)\n\t\t\tthrow new RuntimeException(\"User cannot have a negative number of jbs coins.\");\n\t}", "public long getMoney() {\n return money;\n }", "private static float getBonus(LivingEntity living, int level) {\n // 25% boost per level at max\n int effectLevel = TinkerModifiers.momentumEffect.get().getLevel(living) + 1;\n return level * effectLevel / 128f;\n }", "@Override\n public double earnings() {\n return salary + commission + quantity;\n }", "public Account getUpdatedAccount(Player p) {\n\n\t\tAccount a = getAccount(p);\n\t\tif (a != null) {\n\n\t\t\t// update Account with pending interest\n\n\t\t\tDate today = new Date();\n\t\t\tlong now = today.getTime() / 86400000 ;\n\t\t\t/* 'now' is an integral number of days since epoch.\n\t\t\t * There are 86,400 seconds in a day, and 1000 'ticks' in a getTime() value.\n\t\t\t * Interest is considered to compound at midnight\n\t\t\t */\n\t\t\t\n\t\t\t// Update account with accumulated interest, if applicable\n\t\t\t\n\t\t\tif (a.lastUpdate > 0 && rate > 1.0) {\n\t\t\t\tlong periods = now - a.lastUpdate;\n\t\t\t\tif (periods > 0) {\n\t\t\t\t\tBigDecimal oldamt = a.money;\n\t\t\t\t\tdouble newamt = oldamt.doubleValue() * Math.pow(rate, periods);\n\t\t\t\t\ta.money = new BigDecimal(newamt, context);\n\t\t\t\t\ta.money = a.money.setScale(Currency.getDecimals(), RoundingMode.HALF_UP);\n\t\t\t\t\tif (a.money.compareTo(maxMoney) > 0)\n\t\t\t\t\t\ta.money = maxMoney;\n\t\t\t\t\tBigDecimal interest = a.money.subtract(oldamt);\n\t\t\t\t\t\n\t\t\t\t\tp.sendMessage(ChatColor.YELLOW + \"Interest applied: \" + interest);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\ta.lastUpdate = now;\n\t\t\t\n\t\t}\n\t\treturn a;\n\t}", "@Override\n public double calculatePay ()\n {\n double commissionPay = this.sales * this.rate / 100;\n return commissionPay;\n }", "public void getCredit(){\n System.out.println(\"Total Credit: \" +\"£\" + getUserMoney());\n }", "@Override\n\tpublic void work() {\n\t\tSystem.out.println(\"Accountant accounting.\");\n\t}", "public static void calculateScore(){\n boolean gameOver = false;\n int score = 3000;\n int levelCompleted = 8;\n int bonus = 200;\n\n System.out.println(\"Running method calculateScore: \");\n\n if(score < 4000){\n int finalScore = score + (levelCompleted*bonus);\n System.out.println(\"Your final score = \" + finalScore);\n }else{\n System.out.println(\"The game is still on\");\n }\n\n System.out.println(\"Exit method calculateScore--\\n\");\n }", "public int getMoney()\n {\n return money;\n }", "private void updateMoney() {\n balance = mysql.getMoney(customerNumber);\n balanceConverted = (float) balance / 100.00;\n }", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "public void Action(Player p) {\n int x = p.getMoney();\n int a = super.getAmount();\n if (x - a < 0) {\n p.setLoan((a - x) + 1000);\n p.setMoney((a - x) + 1000);\n p.setMoney(-a);\n } else {\n p.setMoney(-a);\n }\n this.JackMoney = a;\n }", "public void addMoney(int x)\n\t{\n\t\tsomethingChanged = true;\n\t\tmoney += x;\n\t}", "public void add_interest ()\r\n {\r\n\r\n balance += balance * (rate + BONUS_RATE);\r\n System.out.println (\"Interest added to account: \" + account);\r\n System.out.println (\"Current Balance: \" + balance);\r\n System.out.println();\r\n\r\n }", "public void salary() {\n System.out.print(\"Wage: \");\n double wage = in.nextDouble();\n System.out.print(\"Hours: \");\n double hours = in.nextDouble();\n final double REG_HOURS = 40;\n final double OVERTIME_MULTIPLIER = 0.5;\n\n double salary = wage * hours;\n if (hours > REG_HOURS) {\n salary += (hours - REG_HOURS) * wage * OVERTIME_MULTIPLIER;\n }\n\n System.out.printf(\"\\nYou'll make $%,.2f this week.\\n\\n\", salary);\n }", "@Override\n public void addInfo(CurrentPlayer currentPlayer) {\n godPower.addInfo(currentPlayer);\n }", "public static void addcommision(float commision) {\r\n\t\tcommissionSum += commision;\r\n\t}" ]
[ "0.6070291", "0.6031647", "0.5936191", "0.59344894", "0.59343225", "0.5921136", "0.590477", "0.5889624", "0.5889376", "0.586182", "0.575113", "0.5740863", "0.57256085", "0.57132465", "0.56872636", "0.56800896", "0.5679026", "0.564515", "0.56447387", "0.5636292", "0.5635616", "0.5620343", "0.5614941", "0.5613129", "0.5602441", "0.55803144", "0.555912", "0.55086297", "0.54978377", "0.54684514", "0.54683656", "0.5463052", "0.545818", "0.54511046", "0.5448914", "0.5432549", "0.54223305", "0.5408356", "0.54050654", "0.5403692", "0.5399975", "0.5395953", "0.53937876", "0.5382239", "0.53819776", "0.5375174", "0.53576267", "0.53560185", "0.53551346", "0.5351043", "0.53419733", "0.5339609", "0.5333312", "0.5332934", "0.5325246", "0.5318226", "0.5316781", "0.5313121", "0.5311622", "0.5305677", "0.5304643", "0.5298038", "0.5288639", "0.52765733", "0.5271233", "0.52639556", "0.5254352", "0.52466345", "0.5244898", "0.52438664", "0.52415353", "0.5224842", "0.52192694", "0.5219222", "0.52173865", "0.5213362", "0.521052", "0.51960534", "0.5195774", "0.5190765", "0.5181745", "0.51814264", "0.5180768", "0.5179779", "0.51758814", "0.51707333", "0.51671803", "0.5164577", "0.51635236", "0.51627684", "0.5159656", "0.51595944", "0.5146554", "0.51450914", "0.5142242", "0.51401216", "0.51380986", "0.51363426", "0.51308054", "0.51285225", "0.5127569" ]
0.0
-1
Convenience method to bind objects in Actions
public Object getBean(String name) { if (ctx == null) { ctx = WebApplicationContextUtils .getRequiredWebApplicationContext(servlet .getServletContext()); } return ctx.getBean(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void bindObject() {\n }", "T bindTo(Object instance);", "public interface BindingObject {\n void bindTo(View view, Object object);\n}", "void bind(Object element);", "protected abstract void action(Object obj);", "protected abstract void bind();", "protected abstract void bind();", "void attach(Action p1) {\n }", "protected void init_actions()\n {\n action_obj = new CUP$Grm$actions();\n }", "protected void init_actions()\n {\n action_obj = new CUP$FractalParser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$include$actions(this);\n }", "protected void init_actions()\r\n {\r\n action_obj = new CUP$LuaGrammarCup$actions(this);\r\n }", "protected void init_actions()\n {\n action_obj = new CUP$Asintactico$actions(this);\n }", "public void bind() {\n }", "public interface BindButtonSubscriber {\n\n /**\n * Called when the bind is activated\n *\n * @param delta The time passing this frame\n * @param target The current camera target\n * @return True if the bind event was consumed\n */\n boolean onPress(float delta, EntityRef target);\n\n /**\n * Called when the bind repeats\n *\n * @param delta The time this frame (not per repeat)\n * @param target The current camera target\n * @return True if the bind event was consumed\n */\n boolean onRepeat(float delta, EntityRef target);\n\n /**\n * Called when the bind is deactivated\n *\n * @param delta The time passing this frame\n * @param target The current camera target\n * @return True if the bind event was consumed\n */\n boolean onRelease(float delta, EntityRef target);\n}", "private void registerBindings(){\t\t\n\t}", "private void registerBindings(){\t\t\n\t}", "protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "protected void init_actions()\n {\n action_obj = new CUP$Sintactico$actions(this);\n }", "@Override\r\n\tpublic void initActions() {\n\t\t\r\n\t}", "protected void init_actions() {\r\n action_obj = new CUP$SintacticoH$actions(this);\r\n }", "public Action newAction(Object data) throws Exception;", "protected void bind(EvaluationContext context) {\n this.context = context;\n }", "@Override\n\tpublic void bind() {\n\t\t\n\t}", "protected void init_actions()\r\n {\r\n action_obj = new CUP$parser$actions(this);\r\n }", "protected void init_actions()\r\n {\r\n action_obj = new CUP$Parser$actions(this);\r\n }", "protected void init_actions()\n {\n action_obj = new CUP$ParserForms$actions(this);\n }", "protected void init_actions()\r\n {\r\n action_obj = new CUP$CircuitCup$actions(this);\r\n }", "public interface InstanceBindable<T> {\n\n /**\n * Binds this element to the given object, making it implicit in every interaction\n *\n * @param instance The instance to bind\n * @return The bound version of this instance\n */\n T bindTo(Object instance);\n\n}", "@Override\n\tpublic void handleAction(Action action, Object sender, Object target) {\n\t\t\n\t}", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$XPathParser$actions(this);\n }", "public void setupActions() {\n getActionManager().setup(getView());\n }", "protected void init_actions()\n {\n action_obj = new CUP$CompParser$actions(this);\n }", "protected void init_actions()\r\n {\r\n action_obj = new CUP$MJParser$actions(this);\r\n }", "protected void init_actions()\n {\n action_obj = new CUP$PCLParser$actions(this);\n }", "protected void init_actions()\r\n {\r\n action_obj = new CUP$AnalizadorSintactico$actions(this);\r\n }", "@Override\n public void onAction(String binding, boolean isPressed, float tpf) {\n\n switch (binding) {\n case \"Up\":\n up = isPressed;\n break;\n case \"Down\":\n down = isPressed;\n break;\n case \"Left\":\n left = isPressed;\n break;\n case \"Right\":\n right = isPressed;\n break;\n case \"Click\":\n click = isPressed;\n break;\n default:\n break;\n }\n\n }", "protected void init_actions()\r\n {\r\n action_obj = new CUP$SintaxAnalysis$actions(this);\r\n }", "public void bindKeys()\n {\n window.btnFurther.getInputMap(JButton.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(away), \"away\");\n window.btnFurther.getInputMap(JButton.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(Character.toUpperCase(away)), \"away\");\n window.btnFurther.getActionMap().put(\"away\", putAway);\n\n window.btnCloser.getInputMap(JButton.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(close), \"close\");\n window.btnCloser.getInputMap(JButton.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(Character.toUpperCase(close)), \"close\");\n }", "public ClickButtonAction() {\n _target = new TargetComponent();\n }", "@Override\r\n\t\tpublic void buddyAction(ItemAction arg0, Buddy arg1) {\n\t\t\t\r\n\t\t}", "private void bind() \r\n\t{\r\n\t\tsuper.menuPut(\"list\", newJMenu(\"List\", 'L'));\r\n\t\tsuper.menuPut(\"list/new\", newJMenuItem(\"New\", 'N', KeyEvent.VK_1, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionNew(x));\r\n\t\tsuper.menuPut(\"list/open\", newJMenuItem(\"Open\", 'O', KeyEvent.VK_2, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionLoad(x));\r\n\t\tsuper.menuPut(\"list/save\", newJMenuItem(\"Save\", 'S', KeyEvent.VK_3, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionSave(x));\r\n\t\tsuper.menuPut(\"list/***1\", \"\");\r\n\t\tsuper.menuPut(\"list/add\", newJMenuItem(\"Add\", 'A', KeyEvent.VK_4, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionAdd(x));\r\n\t\tsuper.menuPut(\"list/remove\", newJMenuItem(\"Remove\", 'R', KeyEvent.VK_5, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionRemove(x));\r\n\t\t\r\n\t\tsuper.menuPut(\"tree\", newJMenu(\"Tree\", 'T'));\r\n\t\tsuper.menuPut(\"tree/new\", newJMenuItem(\"New\", 'N', KeyEvent.VK_1, ActionEvent.SHIFT_MASK), x -> menuEdit.actionNew(x));\r\n\t\tsuper.menuPut(\"tree/open\", newJMenuItem(\"Open\", 'O', KeyEvent.VK_2, ActionEvent.SHIFT_MASK), x -> menuEdit.actionLoad(x));\r\n\t\tsuper.menuPut(\"tree/save\", newJMenuItem(\"Save\", 'S', KeyEvent.VK_3, ActionEvent.SHIFT_MASK), x -> menuEdit.actionSave(x));\r\n\t\tsuper.menuPut(\"tree/***1\", \"\");\r\n\t\tsuper.menuPut(\"tree/add\", newJMenuItem(\"Add\", 'A', KeyEvent.VK_4, ActionEvent.SHIFT_MASK), x -> menuEdit.actionAdd(x));\r\n\t\tsuper.menuPut(\"tree/remove\", newJMenuItem(\"Remove\", 'R', KeyEvent.VK_5, ActionEvent.SHIFT_MASK), x -> menuEdit.actionRemove(x));\r\n\t\tsuper.menuPut(\"tree/move\", newJMenuItem(\"Move\", 'V', KeyEvent.VK_6, ActionEvent.SHIFT_MASK), x -> menuEdit.actionMove(x));\r\n\t\t\r\n\t\tsuper.menuPut(\"graph\", newJMenu(\"Graph\", 'G'));\r\n\t\tsuper.menuPut(\"graph/new\", newJMenuItem(\"New\", 'N', KeyEvent.VK_1, ActionEvent.CTRL_MASK), x -> menuHelp.actionNew(x));\r\n\t\tsuper.menuPut(\"graph/open\", newJMenuItem(\"Open\", 'O', KeyEvent.VK_2, ActionEvent.CTRL_MASK), x -> menuHelp.actionOpen(x));\r\n\t\tsuper.menuPut(\"graph/save\", newJMenuItem(\"Save\", 'S', KeyEvent.VK_3, ActionEvent.CTRL_MASK), x -> menuHelp.actionSave(x));\r\n\t\tsuper.menuPut(\"graph/***1\", \"\");\r\n\t\tsuper.menuPut(\"graph/add-node\", newJMenuItem(\"Add node\", 'A', KeyEvent.VK_4, ActionEvent.CTRL_MASK), x -> menuHelp.actionAddNode(x));\r\n\t\tsuper.menuPut(\"graph/remove-node\", newJMenuItem(\"Remove node\", 'R', KeyEvent.VK_5, ActionEvent.CTRL_MASK), x -> menuHelp.actionRemoveNode(x));\r\n\t\tsuper.menuPut(\"graph/move-node\", newJMenuItem(\"Move node\", 'V', KeyEvent.VK_6, ActionEvent.CTRL_MASK), x -> menuHelp.actionMoveNode(x));\r\n\t\tsuper.menuPut(\"graph/***2\", \"\");\r\n\t\tsuper.menuPut(\"graph/add-link\", newJMenuItem(\"Add link\", 'D', KeyEvent.VK_7, ActionEvent.CTRL_MASK), x -> menuHelp.actionAddLink(x));\r\n\t\tsuper.menuPut(\"graph/remove-link\", newJMenuItem(\"Remove link\", 'L', KeyEvent.VK_8, ActionEvent.CTRL_MASK), x -> menuHelp.actionRemoveLink(x));\r\n\t\t\r\n\t\tsuper.menuDump();\t\t\r\n\t}", "public interface MovieBinder {\n void bindMovie(Movie movie);\n}", "void addActions(Object bean) {\n Class<?> clazz = bean.getClass();\n Method[] ms = clazz.getMethods();\n for (Method m : ms) {\n if (isActionMethod(m)) {\n Mapping mapping = m.getAnnotation(Mapping.class);\n String url = mapping.value();\n UrlMatcher matcher = new UrlMatcher(url);\n if (matcher.getArgumentCount()!=m.getParameterTypes().length) {\n warnInvalidActionMethod(m, \"Arguments in URL '\" + url + \"' does not match the arguments of method.\");\n continue;\n }\n log.info(\"Mapping url '\" + url + \"' to method '\" + m.toGenericString() + \"'.\");\n urlMap.put(matcher, new Action(bean, m));\n }\n }\n }", "@Override\n protected void hookUpActionListeners() {\n }", "private void setAction(String action)\r\n/* 46: */ {\r\n/* 47: 48 */ this.action = action;\r\n/* 48: */ }", "public void initializeActions(SGControllerActionInitializer actionInitializer);", "public interface SettingAction {\n\n void onAction();\n\n}", "void bind( final ModelData model );", "public abstract void setValueAction(Object value);", "interface ActionDelegate {\n\n /** Called when value of the 'Working directory' field has been changed. */\n void onWorkingDirectoryChanged();\n\n /** Called when value of the 'Arguments' field has been changed. */\n void onArgumentsChanged();\n }", "public void action() {\n action.action();\n }", "String getActionName(Closure action);", "@Override\n public void bindView() {\n this.addSearchBtnClickHandler();\n this.addAdvanceSearchBtnClickHandler();\n this.addSearchContentBoxClickHandler();\n }", "protected void onBind()\n\t{\n\t}", "Action createAction();", "Action createAction();", "Action createAction();", "@Override\r\n\tpublic void actionMapper(String action) {\n\t\tProperty prop = javaScriptWindow.propertyTable.getPropertyTable()\r\n\t\t\t\t.getSelectedProperty();\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.SAVEASNEWBUTTON)) {\r\n\t\t\tsaveAsNewButtonAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.NEWBUTTON)) {\r\n\t\t\tnewButtonAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.LOADBUTTON)) {\r\n\t\t\tloadButtonAction();\r\n\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(JavaScriptConstants.SEARCHTEXTBOX)) {\r\n\t\t\tsearchTextAction();\r\n\t\t}\r\n\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.RIGHTSIDECENTERTABLE)) {\r\n\t\t\trightSideCenterTableAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.DELETEBUTTON)) {\r\n\t\t\tdeleteButtonAction();\r\n\t\t}\r\n\t}", "public void viewReference(ActionEvent actionEvent) {\n }", "private final void setAction(Action a){\n\t\tthis.a = a;\n\t}", "public static void register(Object target) {\n/* 116 */ for (Method method : target.getClass().getDeclaredMethods()) {\n/* */ \n/* 118 */ Annotation[] annotations = method.getAnnotationsByType((Class)ActionProxy.class);\n/* 119 */ if (annotations.length != 0) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 127 */ int paramCount = method.getParameterCount();\n/* 128 */ Class[] paramTypes = method.getParameterTypes();\n/* */ \n/* 130 */ if (paramCount > 2) {\n/* 131 */ throw new IllegalArgumentException(String.format(\"Method %s has too many parameters\", new Object[] { method.getName() }));\n/* */ }\n/* */ \n/* 134 */ if (paramCount == 1 && !ActionEvent.class.isAssignableFrom(paramTypes[0])) {\n/* 135 */ throw new IllegalArgumentException(String.format(\"Method %s -- single parameter must be of type ActionEvent\", new Object[] { method.getName() }));\n/* */ }\n/* */ \n/* 138 */ if (paramCount == 2 && (!ActionEvent.class.isAssignableFrom(paramTypes[0]) || \n/* 139 */ !Action.class.isAssignableFrom(paramTypes[1]))) {\n/* 140 */ throw new IllegalArgumentException(String.format(\"Method %s -- parameters must be of types (ActionEvent, Action)\", new Object[] { method.getName() }));\n/* */ }\n/* */ \n/* 143 */ ActionProxy annotation = (ActionProxy)annotations[0];\n/* */ \n/* 145 */ AnnotatedActionFactory factory = determineActionFactory(annotation);\n/* 146 */ AnnotatedAction action = factory.createAction(annotation, method, target);\n/* */ \n/* 148 */ String id = annotation.id().isEmpty() ? method.getName() : annotation.id();\n/* 149 */ actions.put(id, action);\n/* */ } \n/* */ } \n/* */ }", "private StateActions(){}", "public abstract void init_actions() throws Exception;", "@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}", "void actionChanged( final ActionAdapter action );", "private AliasAction() {\n\n\t}", "public void takeAction(BoardGameController.BoardBugAction action)\n {\n\n }", "public abstract void onAction();", "private void applyBindings(Bindings bindings) {\n\t\tfor (Map.Entry<String, Object> binding : bindings.entrySet()) {\n\t\t\tluaState.pushJavaObject(binding.getValue());\n\t\t\tString variableName = binding.getKey();\n\t\t\tint lastDotIndex = variableName.lastIndexOf('.');\n\t\t\tif (lastDotIndex >= 0) {\n\t\t\t\tvariableName = variableName.substring(lastDotIndex + 1);\n\t\t\t}\n\t\t\tluaState.setGlobal(variableName);\n\t\t}\n\t}", "void bind_attribute(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name, RakudoObject value);", "public void setAction(String action);", "public interface Actions extends EObject\n{\n}", "SendAction createSendAction();", "public void bind(String name, Object obj)\r\n {\r\n if (logger.isInfoEnabled()) {\r\n logger.info(\"Static JNDI binding: [\" + name + \"] = [\" + jndiObjectToString(obj) + \"]\");\r\n }\r\n this.boundObjects.put(name, obj);\r\n }", "public interface AppAction\n{\n void login(String name, String password, Handler handler);\n\n void access(Handler handler, String ...s);\n\n void gdata(Handler handler, List<EHentaiMangaInfo> list);\n\n void getMangaInfo(Handler handler);\n\n void getNews(Handler handler);\n\n void getNews(Handler handler, String title, String page);\n\n void getImg( String url, ImageView imageView,AppActionImpl.Callback<Void> callback,int height,int width);\n}", "@Override\n\tprotected void configureBindings() {\n\t\tbuttonBinder(Undo::new).on(undoB).bind();\n\t\tbuttonBinder(Redo::new).on(redoB).bind();\n\t}" ]
[ "0.66764116", "0.665392", "0.5878959", "0.575668", "0.57329816", "0.56835675", "0.56835675", "0.5651221", "0.5611477", "0.55465364", "0.5539047", "0.55169433", "0.5508193", "0.5486104", "0.5482034", "0.5481703", "0.5481703", "0.54762256", "0.54762256", "0.5464795", "0.5464795", "0.54631567", "0.5447284", "0.5429863", "0.5428942", "0.5417266", "0.5406407", "0.54058355", "0.53952813", "0.53947896", "0.5384088", "0.5378718", "0.53699154", "0.53660977", "0.53660977", "0.53660977", "0.53660977", "0.53660977", "0.53660977", "0.53660977", "0.53660977", "0.53660977", "0.53660977", "0.53660977", "0.53660977", "0.53660977", "0.53660977", "0.53660977", "0.5360564", "0.5360564", "0.5360564", "0.5360564", "0.5360564", "0.53340065", "0.53243655", "0.5320218", "0.5302835", "0.52837086", "0.52768123", "0.5267145", "0.52592105", "0.5252852", "0.52387774", "0.52212626", "0.52202475", "0.521251", "0.5156648", "0.51476645", "0.51475453", "0.5141262", "0.5100809", "0.5094857", "0.5083052", "0.5077393", "0.50652367", "0.5058674", "0.50475925", "0.504611", "0.5045247", "0.5045247", "0.5045247", "0.5040525", "0.5038182", "0.5037426", "0.5021517", "0.50201005", "0.50192535", "0.50176036", "0.50176036", "0.5016221", "0.50152963", "0.50148976", "0.5012494", "0.50115097", "0.50030744", "0.5002226", "0.5000799", "0.49919185", "0.49900404", "0.49861196", "0.49788168" ]
0.0
-1
Provides the mapping from resource key to method name
public Map getKeyMethodMap() { Map map = new HashMap(); String pkg = this.getClass().getPackage().getName(); ResourceBundle methods = ResourceBundle.getBundle(pkg + ".LookupMethods"); Enumeration keys = methods.getKeys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); map.put(key, methods.getString(key)); } return map; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Map getKeyMethodMap() {\n\t\tHashMap<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"cmd.planilla.lista\", \"lista\");\n\t\tmap.put(\"cmd.planilla.buscar\", \"buscar\");\n\t\tmap.put(\"cmd.planilla.verificar\", \"verificar\");\n\t\tmap.put(\"cmd.planilla.cargar\", \"cargar\");\n\t\tmap.put(\"cmd.planilla.actualizar\", \"actualizar\");\n\t\tmap.put(\"cmd.planilla.generar\", \"generar\");\n\t\tmap.put(\"cmd.planilla.cargaFin\", \"cargaFin\");\n\t\tmap.put(\"cmd.planilla.descEmpleadoFiador\", \"descEmpleadoFiador\");\n\t\tmap.put(\"cmd.planilla.verReporte\", \"verReporte\");\n\t\treturn map;\n\t}", "protected String getLookupMapName(HttpServletRequest request,\r\n\t\t\tString keyName, ActionMapping mapping) throws ServletException {\r\n\r\n\t\tif (log.isDebugEnabled()) {\r\n\t\t\tlog.debug(\"BaseAction: getLookupMapName( keyName = \" + keyName\r\n\t\t\t\t\t+ \" )\");\r\n\t\t}\r\n\r\n\t\tString methodName = null;\r\n\r\n\t\ttry {\r\n\t\t\tthis.setLocale(request, request.getLocale()); // MR - added to\r\n\t\t\t// default to JSTL\r\n\t\t\tmethodName = super.getLookupMapName(request, keyName, mapping);\r\n\t\t} catch (ServletException ex) {\r\n\t\t\tif (log.isDebugEnabled()) {\r\n\t\t\t\tlog\r\n\t\t\t\t\t\t.debug(\"BaseAction: keyName not found in resource bundle with locale \"\r\n\t\t\t\t\t\t\t\t+ request.getLocale());\r\n\t\t\t}\r\n\r\n\t\t\t// the keyname is not available in the resource bundle associated\r\n\t\t\t// with the user's locale\r\n\t\t\t// --> get find the key name in the default locale's resource bundle\r\n\t\t\tif (defaultKeyNameKeyMap == null) {\r\n\t\t\t\tdefaultKeyNameKeyMap = this.initDefaultLookupMap(request);\r\n\t\t\t}\r\n\r\n\t\t\t// Find the key for the resource\r\n\t\t\tString key = (String) defaultKeyNameKeyMap.get(keyName);\r\n\t\t\tif (key == null) {\r\n\t\t\t\tif (log.isDebugEnabled()) {\r\n\t\t\t\t\tlog.debug(\"keyName '\" + keyName\r\n\t\t\t\t\t\t\t+ \"' not found in resource bundle with locale \"\r\n\t\t\t\t\t\t\t+ request.getLocale());\r\n\t\t\t\t}\r\n\t\t\t\treturn keyName;\r\n\t\t\t\t//String message = messages.getMessage(\"dispatch.resource\",\r\n\t\t\t\t// mapping.getPath(), keyName);\r\n\t\t\t\t//throw new ServletException(message);\r\n\t\t\t}\r\n\r\n\t\t\t// Find the method name\r\n\t\t\tmethodName = (String) keyMethodMap.get(key);\r\n\t\t\tif (methodName == null) {\r\n\t\t\t\tString message = messages.getMessage(\"dispatch.lookup\", mapping\r\n\t\t\t\t\t\t.getPath(), key);\r\n\t\t\t\tthrow new ServletException(message);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn methodName;\r\n\t}", "@Override\n\tprotected Map getKeyMethodMap() {\n\t\treturn null;\n\t}", "public abstract String[] getMethodNames();", "private String getName() {\n return method.getName();\n }", "public String getMethodName(String name) {\n return methodResources.getString(name);\n }", "ResourceMethod getMethodType();", "@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }", "String getMethod();", "String getMethod();", "public String methodBase() {\n\t\tString tmp = name;\n\t\ttmp = tmp.replaceFirst(\"^get\", \"\");\n\t\ttmp = tmp.replaceFirst(\"^is\", \"\");\n\t\treturn tmp.substring(0,1).toLowerCase()+tmp.substring(1);\n\t}", "java.lang.String getMethodName();", "java.lang.String getMethodName();", "java.lang.String getMethodName();", "java.lang.String getMethodName();", "private void mappingMethodGet() throws SecurityException, NoSuchMethodException{\n\t\tString aux = upFirstLetter();\n\t\tString methodGet = \"get\" + aux;\n\t\tthis.methodGet = this.classFather.getMethod(methodGet);\n\t}", "String getMethodName();", "String getMethodName();", "public interface Keys {\n\n public static final String RESPONSE_SAVE_NOME = \"nome\";\n public static final String RESPONSE_CANCEL = \"cancelar\";\n\n public static final String REQUEST_DETALHES = \"mostrar_detalhes\";\n}", "public String routingKey();", "private OperationType methodSignatureMapping() {\n String methodName = this.methodSignature.getName();\n try {\n MethodNameMapping methodNameMapping = SpiOrIocUtils.getBean(applicationContext, MethodNameMapping.class);\n assignOperationType(methodNameMapping, methodName);\n return operationType == null ? doDefaultMapping(methodName) : operationType;\n } catch (GetBeanException gbe) {\n if (logger.isErrorEnabled()) {\n logger.error(\"get the method name mapping from spi or spring ioc happen error. \" +\n \"demote the default mapping\", gbe);\n }\n return doDefaultMapping(methodName);\n }\n }", "public Map<String, String> getFuncNameMap() {\n\t\treturn funcNameMap;\n\t}", "public static HashMap<String, Integer> getMethodMap(String filename) {\n HashMap<String, Integer> unsafeCommandsMap = new HashMap<>();\n try {\n Scanner scanner = new Scanner(new File(filename));\n while (scanner.hasNext()) {\n String methodName = scanner.next();\n unsafeCommandsMap.put(methodName, 0);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return unsafeCommandsMap;\n }", "static Method getDefinitionMethod(ContainerRequestContext requestContext) {\n if (!(requestContext.getUriInfo() instanceof ExtendedUriInfo)) {\n throw new IllegalStateException(\"Could not get Extended Uri Info. Incompatible version of Jersey?\");\n }\n\n ExtendedUriInfo uriInfo = (ExtendedUriInfo) requestContext.getUriInfo();\n ResourceMethod matchedResourceMethod = uriInfo.getMatchedResourceMethod();\n Invocable invocable = matchedResourceMethod.getInvocable();\n return invocable.getDefinitionMethod();\n }", "public abstract String getResourcePath(Method method);", "String getResourceName();", "private OperationType doDefaultMapping(String methodName) {\n OperationType operationType = null;\n if (methodName.startsWith(GET_PREFIX) || methodName.startsWith(FIND_PREFIX)) {\n operationType = OperationType.VIEW;\n } else if (methodName.startsWith(ADD_PREFIX) || methodName.startsWith(INSERT_PREFIX)) {\n operationType = OperationType.ADD;\n } else if (methodName.startsWith(UPDATE_PREFIX)) {\n operationType = OperationType.UPDATE;\n } else if (methodName.startsWith(REMOVE_PREFIX) || methodName.startsWith(DELETE_PREFIX)) {\n operationType = OperationType.REMOVE;\n }\n return operationType;\n }", "@Override\n public String getMethod() {\n return METHOD_NAME;\n }", "public List<ResourceMethod> getResourceMethods() {\n return resourceMethods;\n }", "java.lang.String getRoutingKey();", "interface ResourceClassIntrospector {\n \n /**\n * Initializes the recipient introspector.\n * @param reflectionService reflection service\n */\n void init(ReflectionService reflectionService);\n \n /**\n * Produces a set of resource method descriptors for the given resource\n * class.\n * <p>\n * An implementation of this method must traverse classes identified by\n * subresource locators to produce the complete set of resource methods \n * reachable from the given resource class.\n * \n * @param path path of the resource specified by {@code resourceClass}\n * @param resourceClass the subject resource class\n * @return set of resource method descriptors\n */\n Set<ResourceDescriptor> describe(String path, Class<?> resourceClass);\n \n}", "private static Map<String, Method> buildMethoMap(final Class<?> c, String patternStr) throws Exception {\n\t\tMap<String, Method> methodMap = new HashMap<String, Method>();\n\t\tpatternStr = patternStr + \"([A-Z])(\\\\w+)\";\n\t\t\n\t\tfor (Method method : c.getMethods()) {\n\t\t\tString methodName = method.getName();\n\t\t\tPattern pattern = Pattern.compile(patternStr);\n\t\t\tMatcher matcher = pattern.matcher(methodName);\n\t\t\tif (!matcher.find()) continue;\n\t\t\t\n\t\t\tString fieldName = matcher.group(1).toLowerCase() + matcher.group(2);\n\t\t\t// Put the field into the hash table with its name as the key\n\t\t\tmethodMap.put(fieldName, method);\n\t\t}\n\t\t\n\t\treturn methodMap;\n\t}", "public Map<String, I18nizableText> getFunctionsDescriptions();", "@Override\r\n\tpublic String[] getMethodNames() {\n\t\treturn this.methodNames;\r\n\t\t//未实现\r\n\t}", "default String getKey() {\n return key(getClassName(), getName());\n }", "@Override\n default String getKey(){\n return key();\n }", "String key(R request);", "public String getName() {\n return nameRule.getMethodName();\n }", "com.google.protobuf.ByteString getMethodNameBytes();", "com.google.protobuf.ByteString getMethodNameBytes();", "public String getResourceName();", "String getDescriptionKey();", "private void mappingMethods() throws SecurityException, NoSuchMethodException{\n\t\tmappingMethodGet();\n\t\tmappingMethodSet();\n\t}", "private String parseMethod() {\n\t\tString[] splitted = command.split(\":\", 2);\n\t\tif (splitted.length == 1) {\n\t\t\treturn splitted[0];\n\t\t} else {\n\t\t\treturn splitted[1] + splitted[0].substring(0, 1).toUpperCase() + splitted[0].substring(1);\n\t\t}\n\t}", "protected String getKeymapName() {\n String nm = getClass().getName();\n int index = nm.lastIndexOf('.');\n if (index >= 0) {\n nm = nm.substring(index+1);\n }\n return nm;\n }", "public interface StringMapResource<V> extends SharedResourceObject, Iterable<String> {\n /**\n * Return the mapped value V for a given key.\n * \n * @param key to fetch the value V for\n * @return the value V mapped to the key\n */\n public V get(String key);\n\n /**\n * Check if the given key exists.\n * \n * @param key to check\n * @return <code>true</code> if the key is known to the resource\n */\n public boolean containsKey(String key);\n \n /**\n * Return the number of keys.\n * \n * @return the number of keys known by this resource.\n */\n public int size();\n\n /**\n * Fetch an iterator for the keys.\n * \n * @return a key iterator\n */\n public Iterator<String> iterator();\n\n /**\n * Get the name of this resource.\n * \n * @return resource name\n */\n public String getResourceName();\n\n /**\n * Get the URL or URI of this resource.\n * \n * @return the resource URL string or <code>null</code>\n */\n public String getUrl();\n}", "public static Object getStaticAttributeKey(final Object key) {\n return key.getClass().getName() + \".\" + key.toString();\n }", "private static Map<String, JSONObject> getAllOperationsForResources(JSONObject resource) {\n Map<String, JSONObject> parameters = new HashMap<String, JSONObject>();\n\n String resourcePath = (String) resource.get(Constants.API_DOC_11_RESOURCE_PATH);\n String apiVersion = (String) resource.get(Constants.API_DOC_11_API_VERSION);\n String resourcePathPrefix = resourcePath + \"/\" + apiVersion;\n\n String key = null;\n\n JSONArray apiArray = (JSONArray) resource.get(Constants.API_DOC_11_APIS);\n for (Object anApiArray : apiArray) {\n\n JSONObject apiInfo = (JSONObject) anApiArray;\n String path = (String) apiInfo.get(Constants.API_DOC_11_PATH);\n JSONArray operations = (JSONArray) apiInfo.get(Constants.API_DOC_11_OPERATIONS);\n\n for (Object operation1 : operations) {\n JSONObject operation = (JSONObject) operation1;\n String httpMethod = (String) operation.get(Constants.API_DOC_11_METHOD);\n JSONArray parameterArray = (JSONArray) operation.get(Constants.API_DOC_11_PARAMETERS);\n\n // get the key by removing the \"apiVersion\" and \"resourcePath\"\n // from the \"path\" variable\n // and concat the http method\n String keyPrefix = path.substring(resourcePathPrefix.length());\n if (keyPrefix.isEmpty()) {\n keyPrefix = \"/*\";\n }\n key = keyPrefix + \"_\" + httpMethod.toLowerCase();\n\n parameters.put(key, operation);\n }\n }\n\n return parameters;\n }", "public abstract String getLocalizationKey();", "private String getGetMethodName() {\n assert name != null;\n if (field != null && (field.getType() == Boolean.class\n || \"boolean\".equals(field.getType().getName()))) {\n return \"is\" + upperFirstChar(name);\n }\n return \"get\" + upperFirstChar(name);\n }", "public String getMethodName() {\r\n return _methodName;\r\n }", "public List<ResourceMethod> getSubResourceMethods() {\n return subResourceMethods;\n }", "public static List<Map<String, Object>> getMethods(Map<String, Object> model) {\n @SuppressWarnings(\"unchecked\")\n List<Map<String, Object>> methods = (List<Map<String, Object>>) getRoot(model).get(ModelConstant.METHODS);\n return methods;\n }", "protected Map method_1552() {\n return super.method_1552();\n }", "protected abstract String getFunctionName();", "ISourceMethod[] getMethods();", "public static Map<String, Object> getMethod(Map<String, Object> model, String methodName) {\n List<Map<String, Object>> methods = getMethods(model);\n for (Map<String, Object> method : methods) {\n if (methodName.equals(method.get(ModelConstant.NAME))) {\n return method;\n }\n }\n return null;\n }", "String getActionName(Closure action);", "private void mappingMethodSet() throws SecurityException, NoSuchMethodException{\n\t\tString aux = upFirstLetter();\n\t\tString methodSet = \"set\" + aux;\n\t\tthis.methodSet = this.classFather.getMethod(methodSet, this.classType);\n\t}", "Map<String, String> getEndpointMap();", "String getShortNameKey();", "MethodName getMethod();", "public String getMethod ()\n {\n return method;\n }", "protected Map initDefaultLookupMap(HttpServletRequest request) {\r\n\t\tMap lookupMap = new HashMap();\r\n\t\tthis.keyMethodMap = this.getKeyMethodMap();\r\n\r\n\t\tModuleConfig moduleConfig = (ModuleConfig) request\r\n\t\t\t\t.getAttribute(Globals.MODULE_KEY);\r\n\r\n\t\tMessageResourcesConfig[] mrc = moduleConfig\r\n\t\t\t\t.findMessageResourcesConfigs();\r\n\r\n\t\t// Look through all module's MessageResources\r\n\t\tfor (int i = 0; i < mrc.length; i++) {\r\n\t\t\tMessageResources resources = this.getResources(request, mrc[i]\r\n\t\t\t\t\t.getKey());\r\n\r\n\t\t\t// Look for key in MessageResources\r\n\t\t\tIterator iter = this.keyMethodMap.keySet().iterator();\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\tString key = (String) iter.next();\r\n\t\t\t\tString text = resources.getMessage(Locale.ENGLISH, key);\r\n\r\n\t\t\t\t// Found key and haven't added to Map yet, so add the text\r\n\t\t\t\tif ((text != null) && !lookupMap.containsKey(text)) {\r\n\t\t\t\t\tlookupMap.put(text, key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn lookupMap;\r\n\t}", "@Override\n public String getMethodName() {\n return null;\n }", "public String getMethod(String className, String methodName, String methodDescriptor) {\n if (!classFilter.contains(className)) return null;\n\n // Don't remap <init>, <clinit>, values, valueOf, access$* TODO: don't remap any synthetic/bridge methods\n if (methodName.equals(\"<init>\") ||\n methodName.equals(\"<clinit>\") ||\n methodName.equals(\"values\") ||\n methodName.equals(\"valueOf\") ||\n methodName.startsWith(\"access$\")) return null;\n\n // Don't remap inherited methods, their name is inherited from the parent's mapping\n for (String superclass : inheritanceProvider.getAllSuperclasses(className)) {\n for (MemberRef ref : inheritanceProvider.getInheritableMethods(superclass)) {\n if (methodName.equals(ref.name) && TypeUtil.methodDescriptorOverrides(inheritanceProvider, methodDescriptor, ref.descriptor)) {\n return null;\n }\n }\n }\n\n String result = super.getMethod(className, methodName, methodDescriptor);\n if (result == null) {\n result = \"method\" + methodIndex++;\n addMethod(className, methodName, methodDescriptor, result);\n }\n return result;\n }", "public interface ICommonAction {\n\n void obtainData(Object data, String methodIndex, int status,Map<String, String> parameterMap);\n\n\n}", "public String getClassLabel(String key);", "protected ResourceMethod getMethod( int theMethodIndex ) {\r\n\t\tConditions.checkParameter( theMethodIndex >= 0 && theMethodIndex < methods.length, \"theMethodIndex\", \"The specific method index is not within range.\" );\r\n\t\t\r\n\t\treturn methods[ theMethodIndex ];\r\n\t}", "private static void lookupJNDIMethodResource(javax.naming.Context context, Object instance, Method method, String name) throws NamingException,\n\t\t\tIllegalAccessException, InvocationTargetException {\n\n\t\tif (!method.getName().startsWith(\"set\") || method.getParameterTypes().length != 1 || !method.getReturnType().getName().equals(\"void\")) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid method resource injection annotation\");\n\t\t}\n\n\t\tObject lookedupResource = null;\n\t\tboolean accessibility = false;\n\n\t\tif ((name != null) && (name.length() > 0)) {\n\t\t\tlookedupResource = context.lookup(name);\n\t\t} else {\n\t\t\tlookedupResource = findByClass(context, method.getParameterTypes()[0]);\n\t\t}\n\n\t\taccessibility = method.isAccessible();\n\t\tmethod.setAccessible(true);\n\t\tmethod.invoke(instance, lookedupResource);\n\t\tmethod.setAccessible(accessibility);\n\t}", "private String propertyToMethodName(final String property, final String modifier) {\n \n String charToUpper = property.substring(0,1);\n String methodName = property.replaceFirst(charToUpper, charToUpper.toUpperCase());\n methodName = modifier + methodName;\n return methodName;\n }", "private Map<String, MethodNode> getMethods(ClassNode cls) {\n Map<String, MethodNode> methods = new HashMap<String, MethodNode>();\n\n Map<String, Node> allAttrs = cls.getMembers();\n Iterator allAttrs_it = allAttrs.entrySet().iterator();\n while(allAttrs_it.hasNext()) {\n Map.Entry attr_entry = (Map.Entry)allAttrs_it.next();\n if(attr_entry.getValue() instanceof MethodNode) {\n String methodName = (String)attr_entry.getKey();\n MethodNode method = (MethodNode)attr_entry.getValue();\n methods.put(methodName, method);\n }\n }\n return methods;\n }", "protected Method getMethod(String mangledName)\n {\n return (Method) _methodMap.get(mangledName);\n }", "public Method getMethod();", "public String toString() {\n\t\treturn methodName;\n\t}", "public interface RouterParamKey {\n\n String NAME = \"name\";\n String VALUE = \"value\";\n String KEY = \"key\";\n String PHONE = \"phone\";\n String USERNAME = \"username\";\n String PASSWORD = \"password\";\n String ID = \"id\";\n String USER_INFO = \"user_info\";\n String PATH = \"path\";\n String PARAM_DATA = \"param_data\";\n\n}", "public abstract int getKeybind();", "public int getMethod(){\n return method;\n }", "String getFunctionName();", "public ResourceKey getKey() {\n return key;\n }", "public void processMethodResourceAnnotations ()\n throws Exception\n {\n //Get all methods that have a Resource annotation\n List<Method> methods = _finder.getMethodsForAnnotation(javax.annotation.Resource.class);\n \n for (Method m: methods)\n {\n if (!isServletType(m.getDeclaringClass()))\n {\n Log.debug(\"Ignoring @Resource annotation on on-servlet type method \"+m.getName());\n continue;\n }\n /*\n * Commons Annotations Spec 2.3\n * \" The Resource annotation is used to declare a reference to a resource.\n * It can be specified on a class, methods or on fields. When the \n * annotation is applied on a field or method, the container will \n * inject an instance of the requested resource into the application \n * when the application is initialized... Even though this annotation \n * is not marked Inherited, if used all superclasses MUST be examined \n * to discover all uses of this annotation. All such annotation instances \n * specify resources that are needed by the application. Note that this \n * annotation may appear on private fields and methods of the superclasses. \n * Injection of the declared resources needs to happen in these cases as \n * well, even if a method with such an annotation is overridden by a subclass.\"\n * \n * Which IMHO, put more succinctly means \"If you find a @Resource on any method\n * or field, inject it!\".\n */\n Resource resource = (Resource)m.getAnnotation(Resource.class);\n if (resource == null)\n continue;\n \n //JavaEE Spec 5.2.3: Method cannot be static\n if (Modifier.isStatic(m.getModifiers()))\n throw new IllegalStateException(m+\" cannot be static\");\n \n \n // Check it is a valid javabean \n if (!IntrospectionUtil.isJavaBeanCompliantSetter(m))\n throw new IllegalStateException(m+\" is not a java bean compliant setter method\");\n \n //default name is the javabean property name\n String name = m.getName().substring(3);\n name = name.substring(0,1).toLowerCase()+name.substring(1);\n name = m.getDeclaringClass().getCanonicalName()+\"/\"+name;\n //allow default name to be overridden\n name = (resource.name()!=null && !resource.name().trim().equals(\"\")? resource.name(): name);\n //get the mappedName if there is one\n String mappedName = (resource.mappedName()!=null && !resource.mappedName().trim().equals(\"\")?resource.mappedName():null);\n \n Class type = m.getParameterTypes()[0];\n \n //get other parts that can be specified in @Resource\n Resource.AuthenticationType auth = resource.authenticationType();\n boolean shareable = resource.shareable();\n \n //if @Resource specifies a type, check it is compatible with setter param\n if ((resource.type() != null) \n && \n !resource.type().equals(Object.class)\n &&\n (!IntrospectionUtil.isTypeCompatible(type, resource.type(), false)))\n throw new IllegalStateException(\"@Resource incompatible type=\"+resource.type()+ \" with method param=\"+type+ \" for \"+m);\n \n //check if an injection has already been setup for this target by web.xml\n Injection webXmlInjection = _injections.getInjection(m.getDeclaringClass(), m);\n if (webXmlInjection == null)\n {\n try\n {\n //try binding name to environment\n //try the webapp's environment first\n boolean bound = org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(_webApp, name, mappedName);\n \n //try the server's environment\n if (!bound)\n bound = org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(_webApp.getServer(), name, mappedName);\n \n //try the jvm's environment\n if (!bound)\n bound = org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(null, name, mappedName);\n \n //TODO if it is an env-entry from web.xml it can be injected, in which case there will be no\n //NamingEntry, just a value bound in java:comp/env\n if (!bound)\n {\n try\n {\n InitialContext ic = new InitialContext();\n String nameInEnvironment = (mappedName!=null?mappedName:name);\n ic.lookup(\"java:comp/env/\"+nameInEnvironment); \n bound = true;\n }\n catch (NameNotFoundException e)\n {\n bound = false;\n }\n }\n \n if (bound)\n {\n Log.debug(\"Bound \"+(mappedName==null?name:mappedName) + \" as \"+ name);\n // Make the Injection for it\n Injection injection = new Injection();\n injection.setTargetClass(m.getDeclaringClass());\n injection.setJndiName(name);\n injection.setMappingName(mappedName);\n injection.setTarget(m);\n _injections.add(injection);\n } \n else if (!isEnvEntryType(type))\n {\n \n //if this is an env-entry type resource and there is no value bound for it, it isn't\n //an error, it just means that perhaps the code will use a default value instead\n // JavaEE Spec. sec 5.4.1.3 \n throw new IllegalStateException(\"No resource at \"+(mappedName==null?name:mappedName));\n }\n }\n catch (NamingException e)\n { \n //if this is an env-entry type resource and there is no value bound for it, it isn't\n //an error, it just means that perhaps the code will use a default value instead\n // JavaEE Spec. sec 5.4.1.3\n if (!isEnvEntryType(type))\n throw new IllegalStateException(e);\n }\n }\n else\n {\n //if an injection is already set up for this name, then the types must be compatible\n //JavaEE spec sec 5.2.4\n \n Object value = webXmlInjection.lookupInjectedValue();\n if (!IntrospectionUtil.isTypeCompatible(type, value.getClass(), false))\n throw new IllegalStateException(\"Type of field=\"+type+\" is not compatible with Resource type=\"+value.getClass());\n }\n }\n }", "public String getMethodName() {\n return methodName;\n }", "public String getMethodName() {\n return methodName;\n }", "public interface ResourceAdapter {\n\n public enum Item {\n INPUT_SAME_AS_OUTPUT_ERROR,\n AUTO_KEY_SELECTION_ERROR,\n LOADING_CERTIFICATE_AND_KEY,\n PARSING_CENTRAL_DIRECTORY,\n GENERATING_MANIFEST,\n GENERATING_SIGNATURE_FILE,\n GENERATING_SIGNATURE_BLOCK,\n COPYING_ZIP_ENTRY\n };\n\n public String getString( Item item, Object... args);\n}", "public static String resolveMethodName(Method method) {\n if (method == null) {\n throw new IllegalArgumentException(\"Null method\");\n }\n String methodName = methodNameMap.get(method);\n if (methodName == null) {\n synchronized (LOCK) {\n methodName = methodNameMap.get(method);\n if (methodName == null) {\n StringBuilder sb = new StringBuilder();\n\n String className = method.getDeclaringClass().getName();\n String name = method.getName();\n Class<?>[] params = method.getParameterTypes();\n sb.append(className).append(\":\").append(name);\n sb.append(\"(\");\n\n int paramPos = 0;\n for (Class<?> clazz : params) {\n sb.append(clazz.getCanonicalName());\n if (++paramPos < params.length) {\n sb.append(\",\");\n }\n }\n sb.append(\")\");\n methodName = sb.toString();\n\n methodNameMap.put(method, methodName);\n }\n }\n }\n return methodName;\n }", "@Override\n public String getKey() {\n return key;\n }", "private Symbol getAnnotationMapKeySymbol(String keyName)\n {\n return Symbol.valueOf(keyName);\n }", "public void setMethod(String method)\r\n {\r\n routing_method=method;\r\n }", "String getInizializedFunctionName();", "XClass getMapKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();" ]
[ "0.7077735", "0.6476617", "0.60696393", "0.60082895", "0.5969838", "0.5950771", "0.5826486", "0.57213575", "0.56446105", "0.56446105", "0.5636008", "0.56312174", "0.56312174", "0.56312174", "0.56312174", "0.56028366", "0.560187", "0.560187", "0.5502705", "0.54829687", "0.54759204", "0.54745907", "0.54543984", "0.5387938", "0.5383899", "0.535567", "0.5345485", "0.5341568", "0.5315257", "0.531176", "0.5311463", "0.52799296", "0.52683306", "0.5248324", "0.52404314", "0.52238464", "0.51977897", "0.5182243", "0.5181498", "0.5181498", "0.5178334", "0.517199", "0.5171526", "0.5167831", "0.5162295", "0.512945", "0.51259094", "0.5125645", "0.5118859", "0.50911963", "0.5090771", "0.5077498", "0.50721526", "0.5065269", "0.5055114", "0.50464094", "0.50408167", "0.50363153", "0.5035343", "0.5035151", "0.5029961", "0.50257486", "0.50206494", "0.5019096", "0.5017886", "0.50146437", "0.5014366", "0.5011559", "0.5010763", "0.50050557", "0.5005037", "0.500492", "0.49961355", "0.49877903", "0.4984554", "0.49790707", "0.49771696", "0.49768552", "0.49720728", "0.49656117", "0.4963296", "0.49630952", "0.49630952", "0.49516872", "0.4951314", "0.49341616", "0.49317142", "0.49259874", "0.49209037", "0.4919675", "0.49154776", "0.49154776", "0.49154776", "0.49154776", "0.49154776", "0.49154776", "0.49154776", "0.49154776", "0.49154776", "0.49154776" ]
0.71144605
0
Convenience method to initialize messages in a subclass.
public ActionMessages getMessages(HttpServletRequest request) { ActionMessages messages = null; HttpSession session = request.getSession(); if (request.getAttribute(Globals.MESSAGE_KEY) != null) { messages = (ActionMessages) request .getAttribute(Globals.MESSAGE_KEY); saveMessages(request, messages); } else if (session.getAttribute(Globals.MESSAGE_KEY) != null) { messages = (ActionMessages) session .getAttribute(Globals.MESSAGE_KEY); saveMessages(request, messages); session.removeAttribute(Globals.MESSAGE_KEY); } else { messages = new ActionMessages(); } return messages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initMsgs() {\n }", "private void initMsgs() {\n }", "private Messages() {\n\t}", "public Message() {\n\t\tsuper();\n\t}", "public messages() {\n }", "public Message(){\n this(\"Not Specified\",\"Not Specified\");\n }", "private Message(){\n // default constructor\n }", "public MessageRecord() {\n super(Message.MESSAGE);\n }", "public Message(){}", "public Message() {}", "public Message() {}", "public Message() {\n }", "public Message() {\n }", "public abstract void initialize(P msg);", "public Message() {\n }", "private SocketMessage() {\n initFields();\n }", "public MessageInfo() { }", "public SystemMessage() {\r\n\t}", "public PromoMessages() {\n }", "public CallMessage() {\n\t}", "private MessageBundle() {\r\n // Nothing to do here.\r\n }", "public MessagesBox() {\n\t\tsuper();\n\t}", "private Message(MessageType handle) {\n this(handle, null, null);\n }", "public TrackedMessage(int messageType) {\n\tsuper(messageType);\n }", "@SuppressWarnings({ \"rawtypes\" })\n @Override\n public void init(MsgList providedMsgList) {\n \n }", "public FeedbackMessages()\n\t{\n\t}", "private HeartBeatMessage() {\n initFields();\n }", "public LCAmsg2 () { }", "private static void initializeMessages() {\n messages = ResourceBundle.getBundle(\"org.apache.ws.commons.tcpmon.tcpmon\");\n }", "private ManualMessage() {\n initFields();\n }", "public MessageManager() {\n }", "public ImMessage() {\r\n }", "protected abstract TMessage prepareMessage();", "@Inject\n\tMessageImpl() {\n\t\tbundle = getBundle(BASE_NAME);\n\t}", "ChildMessage(){\n\t\t\ttext = CLICK_TO_EDIT;\t\t\t\t\t\t\t\t// Set to Header default\n\t\t\tnamesText = CLICK_TO_ADD_NAMES;\t\t\t\t\t\t// Set to Header default\n\t\t\tnumbers = new HashMap<String,Integer>();\t\t\t// init numbers to none\n\t\t}", "public TriggerMessage() {\n\t}", "public Message () {\n\t\tthis.setCreationtime(Calendar.getInstance().getTimeInMillis());\n\t\tsetTimestamp();\n\t}", "public MessageClackData() {\n super();\n this.message = DEFAULT_MESSAGE;\n }", "void setupExternalMessages();", "public FlowMonMessage(){}", "public MessageService()\n {\n messages.put(1L, new Message(1, \"Hello World!\", \"Marc\"));\n messages.put(2L, new Message(2, \"Hello Embarc!\", \"Kevin\"));\n messages.put(3L, new Message(3, \"Hello Luksusowa!\", \"Sid\"));\n messages.put(4L, new Message(4,\n \"I think Sid might have a bit too much blood in his alcohol-stream...\", \"Craig\"));\n }", "public JobServiceBusMessage() {\n this.setCustomMessageProperties(new LazyHashMap<String, String>());\n }", "private JTextField initializeMessageField() {\r\n\t\t// create the message field.\r\n\t\tmessageField = new JTextField();\r\n\t\treturn messageField;\r\n\t}", "public displayMessage() {}", "public MessageHandler() {\n }", "public Message() {\n message = \"\";\n senderID = \"\";\n time = 0;\n }", "public MessagesBox(String text) {\n\t\tsuper(text);\n\t}", "public ValidationMessage() {\n }", "public MatchMessages() {\n messages = new ArrayList<>();\n }", "public Message newMessage(String message, Object p0) {\n/* 69 */ return new SimpleMessage(message);\n/* */ }", "public Message(){\n\t\ttimeStamp = System.currentTimeMillis();\n\t}", "private void init(Bundle savedInstanceState) {\n messageManager = new MessageManager();\n }", "public messageList()\n {\n\n }", "private Message(MessageType handle, String srcName, String text) {\n msgType = handle;\n // Save the properly formatted identifier for the user sending the\n // message.\n msgSender = srcName;\n // Save the text of the message.\n msgText = text;\n }", "public static final void initialize(Class<?> clazz) {\r\n Field[] fields = clazz.getDeclaredFields();\r\n\r\n Map<String, Field> nlsFields = new Hashtable<String, Field>();\r\n\r\n // Detect NLS fields (public String fields)\r\n for (Field field : fields) {\r\n if (isNLSField(field)) {\r\n nlsFields.put(field.getName(), field);\r\n }\r\n }\r\n\r\n // get a list of potential property files accoring to the current locale\r\n // for this class (MyClass_en_EN.properties, MyClass_en.properties, MyClass.properties)\r\n String baseName = clazz.getName();\r\n String[] variants = buildVariants(baseName);\r\n\r\n // Create holder for the messages. The put()-method of MessageProperties\r\n // will set a new property not only to the properties instance but\r\n // also to the appropriate field on \"clazz\"\r\n Properties messages = new Properties();\r\n\r\n // Load messages from properties files and set them (via MessageProperties)\r\n // to the appropriate fields on clazz\r\n loadProperties(messages, variants);\r\n\r\n applyProperties(messages, clazz, nlsFields);\r\n\r\n }", "public MessageFactory(int type, int id){\n super(type, id);\n }", "private ComporMessageFormat() {\r\n }", "public AbstractMessage() {\n\t\t//this.idMessage = SecUtils.getHex(SecUtils.getRandomBytes(SecUtils.getSeed(), 20));\n\t\tthis.idMessage = this.hashCode();\n\t\tthis.setChallenge(new Challenge());\n\t}", "public MessageFactory(int type) {\n super(type);\n }", "private Message(MessageType handle, String srcName) {\n this(handle, srcName, null);\n }", "private void setupMessage() {\n \tmessage = new GLabel(\"\");\n \tmessage.setFont(\"SansSerif-12\");\n }", "public OctopusCollectedMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3) {\n/* 93 */ return new SimpleMessage(message);\n/* */ }", "public void testCtor2() {\n instance = new LogMessage(type, id, operator, message);\n\n assertEquals(\"'type' should be correct.\", type, instance.getType());\n assertEquals(\"'id' should be correct.\", id, instance.getId());\n assertEquals(\"'message' should be correct.\", message, instance.getMessage());\n assertNull(\"'error' should be correct.\", instance.getError());\n }", "public UserMessage() {\n this.setResource(User.class.getSimpleName().toUpperCase());\n }", "public OesMessageRecord() {\n super(OesMessage.OES_MESSAGE);\n }", "public MessageTran() {\n\t}", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) {\n/* 118 */ return new SimpleMessage(message);\n/* */ }", "public MultiChannelMessageImpl() {\n }", "private DebugMessage() {\n initFields();\n }", "public MyException() {\n super(\"This is my message. There are many like it but this one is mine.\");\n }", "public MessageManage(AppContext appContext) {\n\t\tsuper(appContext);\n\t}", "private Message(Builder builder) {\n super(builder);\n }", "public TLUpdateMessageId() {\n super();\n }", "public Message() {\n\tkey = MessageKey.NULL;\n\tdata = null;\n\n\tattachment = null;\n }", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n/* 145 */ return new SimpleMessage(message);\n/* */ }", "public OAuthMessage() {\n\t\t_parameters = new ParameterList();\n\n\t\tif (DEBUG)\n\t\t\t_log.debug(\"Created empty OAuthMessage.\");\n\t}", "public MessageBus()\r\n\t{\r\n\t\tthis(null);\r\n\t}", "public MessageRequest() {\n\t}", "public MessageManager() {\n this.messageList = new HashMap<>();\n }", "public void init() {\n // message = \"Hello World!\";\n }", "public Message newMessage(String message, Object p0, Object p1) {\n/* 77 */ return new SimpleMessage(message);\n/* */ }", "public Alarm_Msg(){ }", "private static void messageConstructor(){\n msg = \"These are the ammo you can spend.\\n\" +\n \"Every time you select the corresponding color, the quantity will decrease: \\n\";\n\n paymentSB.append(msg);\n if (tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID] > 0) {\n msg = red + \": Red ammo available: \" + tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID] + \"\\n\";\n paymentSB.append(msg);\n responeForAmmo.add(red);\n }\n if (tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID] > 0) {\n msg = blue + \": Blue ammo available: \" + tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID] + \"\\n\";\n paymentSB.append(msg);\n responeForAmmo.add(blue);\n }\n if (tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID] > 0) {\n msg = yellow + \": Yellow ammo available: \" + tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID] + \"\\n\";\n paymentSB.append(msg);\n responeForAmmo.add(yellow);\n }\n\n for (i = 0; i < tmpAmmoInPowerUp.size(); i++) {\n msg = (i + 1) + \": \" + tmpAmmoInPowerUp.get(i).getName() + \" COLOR: \" + tmpAmmoInPowerUp.get(i).getGainAmmoColor() + \"\\n\";\n paymentSB.append(msg);\n responseForPowerUp.add(Integer.toString(i + 1));\n }\n\n if (!responeForAmmo.isEmpty()) {\n possibleChoice.addAll(responeForAmmo);\n msg = \"Chose a letter R/B/Y \\n\";\n paymentSB.append(msg);\n }\n\n if(!responseForPowerUp.isEmpty()) {\n possibleChoice.addAll(responseForPowerUp);\n msg = \"choose a number from 1 to \" + i + \": \";\n paymentSB.append(msg);\n }\n }", "public Message newMessage(String message, Object p0, Object p1, Object p2) {\n/* 85 */ return new SimpleMessage(message);\n/* */ }", "public ReplicateObjectMessageFactory() {\n super(null);\n }", "private StatusMessage() {\n\n\t}", "private StatusMessage() {\n\n\t}", "public WfController( MsgObject thisMessage )\n {\n messageObject = thisMessage;\n }", "private FacesMessageUtil(){\n\t}", "public Message newMessage(String message, Object... params) {\n/* 61 */ return new SimpleMessage(message);\n/* */ }", "public AbstractMT() {\n\t\tthis.m = new SwiftMessage(true);\n\t\tif (getMessageType() != null) {\n\t\t\tthis.m.getBlock2().setMessageType(getMessageType());\n\t\t}\n\t}", "public MessageEntity() {\n }", "public MessageDispatcher ()\n\t{\n\t\tthis (new MessageThreadFactory ());\n\t}", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) {\n/* 109 */ return new SimpleMessage(message);\n/* */ }", "private ExecuteMessage() {\n initFields();\n }", "protected ResourceMessages(Resources resources) {\r\n\t\tthis.resources = resources;\r\n\t}", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) {\n/* 127 */ return new SimpleMessage(message);\n/* */ }", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4) {\n/* 101 */ return new SimpleMessage(message);\n/* */ }", "public MessagePanel() {\n initComponents();\n HTMLEditorKit editKit = new HTMLEditorKit();\n msgEP.setEditorKit((EditorKit)editKit);\n }", "public MessageParseException() {\n }" ]
[ "0.72118413", "0.72118413", "0.70635355", "0.6950613", "0.6947169", "0.68995786", "0.6886534", "0.6744348", "0.668801", "0.6637695", "0.6637695", "0.6606294", "0.6606294", "0.65855616", "0.6577732", "0.6533754", "0.6485949", "0.6484294", "0.64587384", "0.64106756", "0.6398104", "0.63897985", "0.63715225", "0.63714296", "0.63243383", "0.6324158", "0.6308514", "0.63005435", "0.6282341", "0.6241538", "0.6226231", "0.62142724", "0.62080884", "0.6159907", "0.61575794", "0.61376286", "0.61077636", "0.6104011", "0.6084972", "0.6073425", "0.60545236", "0.6043517", "0.6041673", "0.6033353", "0.6014398", "0.599968", "0.59484", "0.59456617", "0.5940083", "0.5918642", "0.59177387", "0.59176874", "0.5915304", "0.5911839", "0.5911429", "0.59108853", "0.5893127", "0.5890012", "0.5889948", "0.5877535", "0.58729404", "0.58589965", "0.5852787", "0.58342654", "0.58297807", "0.5828998", "0.5825523", "0.5821734", "0.58209133", "0.58203745", "0.58201563", "0.5817124", "0.5816501", "0.5813655", "0.58047146", "0.57845896", "0.5782695", "0.5778476", "0.5777185", "0.5772937", "0.57633984", "0.5757372", "0.57446057", "0.57423776", "0.57320446", "0.57219195", "0.5714562", "0.5714562", "0.5710596", "0.5709282", "0.5706455", "0.570061", "0.5684334", "0.5678698", "0.56767756", "0.56745404", "0.5673678", "0.56634974", "0.5660312", "0.5653845", "0.5652271" ]
0.0
-1
Override the execute method in LookupDispatchAction to parse URLs and forward to methods without parameters. Also will forward to unspecified method when no parameter is present. This is based on the following system: edit.html > edit method save.html > save method view.html > search method
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { if (isCancelled(request)) { ActionForward af = cancelled(mapping, form, request, response); if (af != null) { return af; } } MessageResources resources = getResources(request); // Identify the localized message for the cancel button String edit = resources.getMessage(Locale.ENGLISH, "button.edit") .toLowerCase(); String save = resources.getMessage(Locale.ENGLISH, "button.save") .toLowerCase(); String search = resources.getMessage(Locale.ENGLISH, "button.search") .toLowerCase(); String view = resources.getMessage(Locale.ENGLISH, "button.view") .toLowerCase(); String[] rules = { edit, save, search, view }; // Identify the request parameter containing the method name // 得到字符串method,制定变量method中存放的是方法名称 String parameter = mapping.getParameter(); // don't set keyName unless it's defined on the action-mapping // no keyName -> unspecified will be called String keyName = null; if (parameter != null) { // 从变量method中取出方法名 keyName = request.getParameter(parameter); } if ((keyName == null) || (keyName.length() == 0)) { for (int i = 0; i < rules.length; i++) { // apply the rules for automatically appending the method name // 根据请求路径中的信息,来选择处理方法。 if (request.getServletPath().indexOf(rules[i]) > -1) { return dispatchMethod(mapping, form, request, response, rules[i]); } } return this.unspecified(mapping, form, request, response); } // Identify the string to lookup String methodName = getMethodName(mapping, form, request, response, parameter); return dispatchMethod(mapping, form, request, response, methodName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tString action = request.getParameter(\"action1\");\n\t\tif (action == null) action = LIST;\n\t\tif (log.isDebugEnabled()) log.debug(\"action:\" + action);\n\t\tActionForward forward = null;\n\t\tUserDefinedQueryForm theForm = (UserDefinedQueryForm) form;\n\t\ttry {\n\t\t\tif (LIST.equalsIgnoreCase(action)) forward = listAdvanceBacth(mapping, theForm, request, response); // 打开复杂查询列表页面\n\t\t\telse if (\"LISTSIMPLE\".equalsIgnoreCase(action)) forward = listSimpleBacth(mapping, theForm, request, response); // 打开简单查询列表页面\n\t\t\telse if (\"SHOWQUERY\".equalsIgnoreCase(action)) forward = queryAdvance(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWSIMPLE\".equalsIgnoreCase(action)) forward = querySimple(mapping, theForm, request, response);\n\t\t\telse if (\"VALID\".equalsIgnoreCase(action)) forward = validate(mapping, theForm, request, response);\n\t\t\telse if (\"PREVIEWSQL\".equalsIgnoreCase(action)) forward = getSQLForPreview(mapping, theForm, request, response);\n\t\t\telse if (\"VALIDSIMPLE\".equalsIgnoreCase(action)) forward = validateSimple(mapping, theForm, request, response);\n\t\t\telse if (\"ADVANCEOVERVIEW\".equalsIgnoreCase(action)) forward = queryAdvanceOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SIMPLEOVERVIEW\".equalsIgnoreCase(action)) forward = querySimpleOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SAVERESULT\".equalsIgnoreCase(action)) forward = saveResult(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWEXPORTEXCEL\".equalsIgnoreCase(action)) forward = showExportExcel(mapping, theForm, request, response);\n\t\t\telse if (\"EXPORTEXCEL\".equalsIgnoreCase(action)) forward = exportExcel(mapping, theForm, request, response);\n\t\t\telse {\n\t\t\t\trequest.setAttribute(\"err\", new WebException(\"找不到该action方法:\" + action));\n\t\t\t\tforward = mapping.findForward(ERROR);// 找不到合适的action\n\t\t\t}\n\n\t\t\t// else if(\"SAVEPARAM\".equalsIgnoreCase(action))\n\t\t\t// forward=saveQueryParam(mapping, theForm, request, response);\n\t\t\t// //保存查询条件到个人空间\n\t\t}\n\t\tcatch (Exception e) {// 其他系统出错\n\t\t\trequest.setAttribute(\"err\", e);\n\t\t\tforward = mapping.findForward(ERROR);\n\t\t}\n\t\treturn forward;\n\t}", "public ActionForward execute(ActionMapping mapping,\n ActionForm form,\n HttpServletRequest request,\n HttpServletResponse response)\n throws Exception {\n\n // default target to success\n String strTarget = \"success\";\n \n\n String strUrl = request.getParameter(\"url\");\n\n // set the target to failure if we could not retrieve the organ list\n if (StringUtils.hasValue(strUrl)) {\n // put all the servers in the request\n request.setAttribute(\"url\", strUrl);\n } else {\n strTarget = \"error\";\n }\n\n // forward to the appropriate View\n return mapping.findForward(strTarget);\n }", "public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n // Use the overridden getMethodName.\n return super.execute(mapping, form, request, response);\n }", "public abstract boolean resolveAction(String str, Bundle bundle);", "protected ActionForward customProcess(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response, String name) throws Throwable {\r\n \treturn performAction(actionMapping, actionForm, request, response);\r\n }", "@Override\r\n\tprotected String doExecute(ActionForm form, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, ActionMapping mapping)\r\n\t\t\tthrows Exception {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic ActionCommand execute(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\treturn null;\n\t}", "public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n // TODO Auto-generated method stub\n String forwardName = \"\";\n HttpSession session = ((HttpServletRequest) request).getSession(false);\n EditSearchCityForm searchform = (EditSearchCityForm) form;\n String buttonValue = searchform.getButtonValue();\n UnLocationDAO unLocationDAO = new UnLocationDAO();\n\n CitySelectionBean cbs = new CitySelectionBean();\n if (request.getParameter(\"index\") != null) {\n int ind = Integer.parseInt(request.getParameter(\"index\"));\n List cityList = (List) session.getAttribute(\"cityDetails\");\n CitySelectionBean citySelBean = (CitySelectionBean) cityList.get(ind);\n UnLocation unLoc = citySelBean.getUnloaction();\n RefTerminal terminal = null;\n if (session.getAttribute(\"terminal\") == null) {\n terminal = new RefTerminal();\n } else {\n terminal = (RefTerminal) session.getAttribute(\"terminal\");\n }\n terminal.setCountry(unLoc.getCountryId());\n terminal.setState(unLoc.getStateId().getCodedesc());\n\n terminal.setUnLocation(unLoc);\n request.setAttribute(\"buttonValue\", \"completed\");\n session.removeAttribute(\"cityDetails\");\n }\n if (buttonValue != null && buttonValue.equals(\"search\")) {\n\n List city = unLocationDAO.findbyCity(request.getParameter(\"city\"));\n List cityDetails = cbs.getCityDetails(city);\n session.setAttribute(\"cityDetails\", cityDetails);\n\n }\n return mapping.findForward(\"EditSearchpopup\");\n }", "public ActionForward unspecified(ActionMapping mapping, ActionForm form,\r\n HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n return displayProcessErp(mapping, form, request, response);\r\n }", "@Override\n \tpublic String execute(final HttpServletRequest request,\n \t\t\tfinal HttpServletResponse response) throws ControllerException\n \t{\n \t\tint lastSlash = request.getRequestURI().lastIndexOf(\"/\");\n \t\tString methodName = request.getRequestURI().substring(lastSlash + 1);\n \n \t\t// Find the target method\n \t\tMethod targetMethod = null;\n \n \t\tfor (Method method : this.getClass().getMethods())\n \t\t{\n \t\t\tif (method.getName().equals(methodName))\n \t\t\t{\n \t\t\t\ttargetMethod = method;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \n \t\tif (targetMethod == null)\n \t\t{\n \t\t\tthrow new ControllerException(\n \t\t\t\t\t\"Could not find a Controller method with name \"\n \t\t\t\t\t\t\t+ methodName + \" in class \"\n \t\t\t\t\t\t\t+ this.getClass().getName());\n \t\t}\n \n \t\t// Execute the target method\n \t\ttry\n \t\t{\n \t\t\terrors.clear();\n \n \t\t\ttargetMethod.invoke(this, request, response);\n \n \t\t\trequest.setAttribute(\"errors\", errors);\n \t\t}\n \t\tcatch (Exception ex)\n \t\t{\n \t\t\tif (ex.getCause() instanceof ControllerException)\n \t\t\t{\n \t\t\t\t// If it is a Controller exception, just propagate it\n \t\t\t\tthrow (ControllerException) ex.getCause();\n \t\t\t}\n \n \t\t\tthrow new ControllerException(\n \t\t\t\t\t\"Could not execute the Controller method \" + methodName\n \t\t\t\t\t\t\t+ \" from class \" + this.getClass().getName(), ex);\n \t\t}\n \n \t\t// The view name is the same than the method\n \t\treturn methodName;\n \t}", "public void executeAction( String actionInfo );", "public ActionForward unspecified(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n this.setup(mapping,form,request,response);\n \n return mapping.findForward(\"backToGeneExp\");\n }", "void addActions(Object bean) {\n Class<?> clazz = bean.getClass();\n Method[] ms = clazz.getMethods();\n for (Method m : ms) {\n if (isActionMethod(m)) {\n Mapping mapping = m.getAnnotation(Mapping.class);\n String url = mapping.value();\n UrlMatcher matcher = new UrlMatcher(url);\n if (matcher.getArgumentCount()!=m.getParameterTypes().length) {\n warnInvalidActionMethod(m, \"Arguments in URL '\" + url + \"' does not match the arguments of method.\");\n continue;\n }\n log.info(\"Mapping url '\" + url + \"' to method '\" + m.toGenericString() + \"'.\");\n urlMap.put(matcher, new Action(bean, m));\n }\n }\n }", "private ActionForward displayAction(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t\tExceptionDisplayDTO expDTO = new ExceptionDisplayDTO(\"displayPage\",\"\");\r\n\t\texpDisplayDetails.set(expDTO);\r\n\t\t\r\n\t\t//condition to not display search results by default\r\n\t\t/*if(isNavigationDone(request)){\r\n\t\t\tgetPaginatedSearchResults(request,bean,null);\r\n\t\t}*/\r\n\t\t\r\n\t\treturn mapping.findForward(\"displayPage\");\t\t\r\n\t}", "@Override\r\n\tpublic String getActionURL(String oid, String view, String action) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic ActionResult defaultMethod(PortalForm form, HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n\t\tSystem.out.println(\"M : TestAction_execute() ȣ�� !\");\r\n\t\t\r\n\t\tString nick = request.getParameter(\"nick\");\r\n\t\t\r\n\t\t//DAO 객체 생성\r\n\t\tTestDAO tdao = new TestDAO();\r\n\t\trequest.setAttribute(\"info\", tdao.getInfo(nick));\r\n\t\t\r\n\t\t//페이지 이동(forward로 이동 - 주소 변경 X , 화면 변경 O)\r\n\t\tActionForward forward = new ActionForward();\r\n\t\tforward.setPath(\"./test.jsp\");\r\n\t\tforward.setRedirect(false);\r\n\t\t\r\n\t\treturn forward;\r\n\t}", "protected ActionForward processActionPerform(HttpServletRequest request,\n HttpServletResponse response,\n Action action,\n ActionForm form,\n ActionMapping mapping)\n throws IOException, ServletException\n { //20030502AH - Copied from struts src, with extra code added \n try\n {\n if(mapping instanceof GTActionMapping)\n {\n //20050317AH - mod to also check for asdmin rights where spec'd in mapping\n GTActionMapping gtMapping = (GTActionMapping)mapping;\n boolean needsSession = gtMapping.isRequiresGtSession() ||gtMapping.isRequiresAdmin() \n \t\t\t\t\t\t\t\t\t\t\t\t|| gtMapping.isRequiresP2P() || gtMapping.isRequiresUDDI();\n if( needsSession )\n {\n //We will try to obtain a reference to the IGTSession using the method provided\n //in StaticWebUtils. This will throw a NoSessionException if we have no IGTSession.\n //By putting this check here it will be captured as though it was thrown by the action.\n IGTSession gtasSession = StaticWebUtils.getGridTalkSession(request);\n //NSL20060424 Check for P2P and UDDI requirement\n if (gtMapping.isRequiresP2P() && gtasSession.isNoP2P())\n {\n \tthrow new IllegalStateException(\"P2P functionality access required for mapped path \"+gtMapping.getPath());\n }\n if (gtMapping.isRequiresUDDI() && gtasSession.isNoUDDI())\n {\n \tthrow new IllegalStateException(\"UDDI functionality access required for mapped path \"+gtMapping.getPath());\n }\n if(gtMapping.isRequiresAdmin() && !gtasSession.isAdmin())\n {\n throw new IllegalStateException(\"Admin access required for mapped path \" + gtMapping.getPath());\n }\n }\n }\n return (action.execute(mapping, form, request, response));\n }\n catch (Exception e)\n {\n return (processException(request, response,e, form, mapping));\n }\n \n }", "public ActionForward execute(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\n\t\tAllSearchWorkForm allSearchWorkForm = (AllSearchWorkForm) form;// TODO Auto-generated method stub\n\t\t\n\t\t// 得到搜索的条件\n\t\tString name = allSearchWorkForm.getName();\n\t\tString beginTime = allSearchWorkForm.getBeginTime();\n\t\tString endTime = allSearchWorkForm.getEndTime();\n\t\tString complete = allSearchWorkForm.getComplete();\n\t\t// 中文转码\n\t\ttry {\n\t\t\tname = URLEncoder.encode(name, \"UTF-8\");\n\t\t\tbeginTime = URLEncoder.encode(beginTime, \"UTF-8\");\n\t\t\tendTime = URLEncoder.encode(endTime,\"UTF-8\");\n\t\t\tSystem.out.println(\"name:\"+name);\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn mapping.findForward(\"SearchWork.succeed\");\n\t\t}\n\t\t\n\t\t// 带参数的页面跳转\n\t\tActionRedirect redirect = new ActionRedirect(mapping.findForward(\"SearchWork.succeed\"));\n\t\tredirect.addParameter(\"name\",name);\n\t\tredirect.addParameter(\"begin\", beginTime);\n\t\tredirect.addParameter(\"end\", endTime);\n\t\tredirect.addParameter(\"complete\", complete);\n\t\tredirect.addParameter(\"page\", 1);\n\t\treturn redirect;\n\t}", "@Override\n\tpublic ActionForward doDefault(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\n\t}", "@Override\n\tpublic ActionForward select(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "@Override\n public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException {\n if (response.getStatus() == HttpServletResponse.SC_NOT_FOUND) {\n forward(redirectRoute, baseRequest, response);\n } else {\n super.handle(target, baseRequest, request, response);\n }\n }", "@Override\n\tpublic ModelAndView execute(int no) {\n\t\treturn null;\n\t}", "public void performAction(HandlerData actionInfo) throws ActionException;", "ForwardAction createForwardAction();", "@Override\n\tpublic ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tActionForward forward=null;\n\t\t\n\t\tint order_num=Integer.parseInt(request.getParameter(\"order_num\"));\n\t\t\n\t\tOrderDetailSvc orderDetailSvc=new OrderDetailSvc();\n\t\tPro_order order = orderDetailSvc.getOrder(order_num);\n\t\tArrayList<OrderView> orderItemList = orderDetailSvc.getItemList(order_num);\n\t\t\n\t\trequest.setAttribute(\"order\", order);\n\t\trequest.setAttribute(\"itemList\", orderItemList);\n\t\t\n\t\tforward = new ActionForward(\"/order/myOrderDetail.jsp\",false);\n\t\t\n\t\treturn forward;\n\t}", "public ActionForward execute(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest req, HttpServletResponse res)\n\t\t\tthrows IOException, ServletException {\n\n\t\tTargetForm aForm = null;\n\t\tActionMessages errors = new ActionMessages();\n\t\tActionForward destination = null;\n\n\t\tif (!this.checkLogon(req)) {\n\t\t\treturn mapping.findForward(\"logon\");\n\t\t}\n\n\t\tif (form != null) {\n\t\t\taForm = (TargetForm) form;\n\t\t} else {\n\t\t\taForm = new TargetForm();\n\t\t}\n\n\t\tif (req.getParameter(\"delete.x\") != null) {\n\t\t\taForm.setAction(TargetAction.ACTION_CONFIRM_DELETE);\n\t\t}\n\n\t\tAgnUtils.logger().info(\"Action: \" + aForm.getAction());\n\n\t\tif (!allowed(\"targets.show\", req)) {\n\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\n\t\t\t\t\t\"error.permissionDenied\"));\n\t\t\tsaveErrors(req, errors);\n\t\t\treturn null;\n\t\t}\n\n\t\ttry {\n\t\t\tswitch (aForm.getAction()) {\n\t\t\tcase ACTION_LIST:\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_VIEW:\n\t\t\t\tif (aForm.getTargetID() != 0) {\n\t\t\t\t\taForm.setAction(TargetAction.ACTION_SAVE);\n\t\t\t\t\tloadTarget(aForm, req);\n\t\t\t\t} else {\n\t\t\t\t\taForm.setAction(TargetAction.ACTION_NEW);\n\t\t\t\t}\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_SAVE:\n\t\t\t\t// if(req.getParameter(\"save.x\")!=null) {\n\t\t\t\tsaveTarget(aForm, req);\n\t\t\t\t// }\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_NEW:\n\t\t\t\t// if(req.getParameter(\"save.x\")!=null) {\n\t\t\t\tsaveTarget(aForm, req);\n\t\t\t\taForm.setAction(TargetAction.ACTION_SAVE);\n\t\t\t\t// }\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_CONFIRM_DELETE:\n\t\t\t\tloadTarget(aForm, req);\n\t\t\t\tdestination = mapping.findForward(\"delete\");\n\t\t\t\taForm.setAction(TargetAction.ACTION_DELETE);\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_DELETE:\n\t\t\t\tthis.deleteTarget(aForm, req);\n\t\t\t\taForm.setAction(TargetAction.ACTION_LIST);\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_CREATE_ML:\n\t\t\t\tdestination = mapping.findForward(\"create_ml\");\n\t\t\t\tbreak;\n\n\t\t\tcase ACTION_CLONE:\n\t\t\t\tif (aForm.getTargetID() != 0) {\n\t\t\t\t\tloadTarget(aForm, req);\n\t\t\t\t\tcloneTarget(aForm, req);\n\t\t\t\t\taForm.setAction(TargetAction.ACTION_SAVE);\n\t\t\t\t}\n\t\t\t\tdestination = mapping.findForward(\"success\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase ACTION_DELETE_RECIPIENTS_CONFIRM:\n\t\t\t\tloadTarget(aForm, req);\n\t\t\t\tthis.getRecipientNumber(aForm, req);\n\t\t\t\tdestination = mapping.findForward(\"delete_recipients\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase ACTION_DELETE_RECIPIENTS:\n\t\t\t\tloadTarget(aForm, req);\n\t\t\t\tthis.deleteRecipients(aForm, req);\t\t\t\t\n\t\t\t\taForm.setAction(TargetAction.ACTION_LIST);\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase ACTION_BACK_TO_MAILINGWIZARD:\n\t\t\t\tdestination = mapping.findForward(\"back_mailingwizard\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tdestination = mapping.findForward(\"list\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tAgnUtils.logger().error(\n\t\t\t\t\t\"execute: \" + e + \"\\n\" + AgnUtils.getStackTrace(e));\n\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\n\t\t\t\t\t\"error.exception\"));\n\t\t}\n\t\t\n\t\tif( \"list\".equals(destination.getName())) {\n\t\t\treq.setAttribute(\"targetlist\", loadTargetList(req) );\n\t\t\tsetNumberOfRows(req, aForm);\n\t\t}\n\t\t\n\n\t\t// Report any errors we have discovered back to the original form\n\t\tif (!errors.isEmpty()) {\n\t\t\tsaveErrors(req, errors);\n\t\t\treturn (new ActionForward(mapping.getInput()));\n\t\t}\n\n\t\treturn destination;\n\n\t}", "@Override\n public void resolve(MapChoice mapChoice, Query query, Result result, Resolution resolution) {\n assertEquals(\"myMethod\",mapChoice.getMethod());\n super.resolve(mapChoice,query,result,resolution);\n }", "@Override\n\tpublic ModelAndView execute(HttpServletRequest request) {\n\t\treturn null;\n\t}", "@Override\n\tpublic ActionForward list(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "@Override\n\tpublic ActionForward list(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "public ActionForward unspecified(ActionMapping mapping,\r\n ActionForm form,\r\n HttpServletRequest request,\r\n HttpServletResponse response) throws Exception {\r\n return display(mapping, form, request, response);\r\n }", "public ActionForward execute(ActionMapping actionMapping,\r\n ActionForm actionForm,\r\n HttpServletRequest request,\r\n HttpServletResponse response) {\r\n return process(actionMapping, actionForm, request, response, null);\r\n }", "@SustainScreen(name = \"Rule Index\", description = \"Index of all business rules in the system\", module = SustainModule.RULE)\n public ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {\n return onSearch(mapping, form, request, response);\n }", "public interface Action {\n String execute(HttpServletRequest request);\n}", "public interface Action {\r\n\r\n /**\r\n * Execute the Action based on http request and response\r\n *\r\n * @param req the request\r\n * @param res the response\r\n * @return the jsp page to redirect the user\r\n */\r\n String execute(HttpServletRequest req, HttpServletResponse res);\r\n}", "abstract protected String performAction(String input);", "public ActionForward execTaskForward( ActionMapping mapping, ActionForm form, HttpServletRequest request,\r\n HttpServletResponse response, WatchedTask task )\r\n throws IOException, ServletException\r\n {\r\n\r\n request.getRequestDispatcher( ( (StrutsWatchedTask) task ).getActionURL() ).forward( request, response );\r\n\r\n return null;\r\n }", "public ActionForward doExecute(\n\t\tActionMapping mapping,\n\t\tActionForm form,\n\t\tHttpServletRequest request,\n\t\tHttpServletResponse response)\n\t\tthrows Exception {\n\n\t\tSearchStudentForm searchForm = (SearchStudentForm) form;\n\t\tif(form == null) {\n\t\t\treturn (mapping.findForward(\"itself\"));\n\t\t}\n\n\t\t// validate the form\n\t\tActionErrors errors = searchForm.validate(mapping, request);\n\t\tif(!errors.isEmpty()) {\n\t\t\tsaveErrors(request, errors);\n\t\t\treturn (mapping.findForward(\"itself\"));\n\t\t}\n\n\t\tStudentManager manager = (StudentManager)servlet.getServletContext().\n\t\t\t\t\t\t\t\tgetAttribute(Constants.STUDENT_DATABASE_KEY);\n\t\tDiplomaManager diplomaManager = (DiplomaManager) servlet.getServletContext().\n\t\t\t\t\t\t\t\tgetAttribute(Constants.DIPLOMA_DATABASE_KEY);\n\n\t\tif(manager == null || diplomaManager==null) {\n\t\t\terrors.add(\"database\",\n\t\t\t new ActionError(\"error.database.missing\"));\n\t\t\tlog.warn(\"SearchUserAction: Database is missing\");\n\t\t}\n\n\t\tif(!errors.isEmpty()) {\n\t\t\tsaveErrors(request, errors);\n\t\t\treturn (mapping.findForward(\"error\"));\n\t\t}\n\n\t\tint diplomaId = Integer.parseInt(searchForm.getDiplomaId());\n\t\tList studentList = manager.searchStudent(searchForm.getIne(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsearchForm.getName(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsearchForm.getFirstname(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdiplomaId);\n\n\t\tif(studentList != null) {\n\t\t\trequest.getSession().setAttribute(\"studentlist\", studentList);\n\t\t}\n\n\t\tList diplomaList = diplomaManager.listDiploma();\n\t\tif(diplomaList != null) {\n\t\t\trequest.setAttribute(\"diplomaList\", diplomaList);\n\t\t}\n\n\t\treturn (mapping.findForward(\"itself\"));\n\t}", "@Override\r\n public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(String.format(\"ENTRY %s%n%s\", form.getClass().getSimpleName(), request.getRequestURI()));\r\n }\r\n \r\n ActionForward forward = null;\r\n\r\n Throwable t = (Throwable) request.getAttribute(Globals.EXCEPTION_KEY);\r\n\r\n if (t == null) {\r\n forward = mapping.findForward(KRADConstants.MAPPING_CLOSE);\r\n } else {\r\n forward = processException(mapping, form, request, t);\r\n }\r\n \r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(String.format(\"EXIT %s\", (forward == null) ? \"null\" : forward.getPath()));\r\n }\r\n\r\n return forward;\r\n }", "@Override\n public void execute(\n HttpServletRequest request,\n HttpServletResponse response)\n throws ServletException, IOException {\n ServletContext context = request.getSession().getServletContext();\n context.getRequestDispatcher(\"/EntryDataForNewUser.jsp\").forward(request, response);\n //context.getRequestDispatcher(request.getHeader(\"referer\")).forward(request, response);\n }", "protected abstract Action stringToAction(String stringAction);", "@Override\r\n\tpublic ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t\tPrognosisFormBean formBean = (PrognosisFormBean) form;\r\n String forwardAction = ActionConstant.NONE;\r\n\t\tString command = request.getParameter(\"command\");\r\n\r\n\t\t//session expired checking\r\n\t\tif (request.getSession().getAttribute(MiscConstant.USER_SESSION) == null) {\r\n\t\t\tforwardAction = ActionConstant.SHOW_AJAX_EXPIRED;\r\n\t\t} else {\r\n\t\t\tif (command!=null) {\r\n\t\t\t\t\r\n\t\t\t\tint module = ModuleConstant.PROGNOSIS;\r\n\t\t\t\t\r\n\t\t\t\tif (command.equalsIgnoreCase(ParamConstant.AJAX_GO_TO_CHILD)) {\t\t\r\n\t\t\t\t\t//fetch the data\r\n\t\t\t\t\t\r\n\t\t\t\t\tint patientSystemCaseId = Integer.parseInt(request.getParameter(\"patientSystemCaseId\"));\r\n\t\t\t\t\t\r\n\t\t\t\t\tPrognosis model = new Prognosis();\r\n\t\t\t\t\tmodel.setPatientCaseSystemId(patientSystemCaseId);\r\n\t\t\t\t\t\r\n\t\t\t\t\tHashMap<String,Object> dataMap = new HashMap<String, Object>();\r\n\t\t\t dataMap.put(MapConstant.MODULE, module);\r\n\t\t\t dataMap.put(MapConstant.CLASS_DATA, model);\r\n\t\t\t dataMap.put(MapConstant.ACTION, ActionConstant.GET_DATA);\r\n\t\t\t \r\n\t\t\t ServiceManager service = new ServiceManagerImpl();\r\n\t\t\t Map<String, Object> resultMap = service.executeRequest(dataMap);\r\n\t\t\t\t\t\r\n\t\t\t if (resultMap!=null && !resultMap.isEmpty()) {\r\n\t\t\t\t model = (Prognosis) resultMap.get(MapConstant.CLASS_DATA);\t\t \t\t\r\n\t\t\t \tformBean.populateFormBean(model);\r\n\t\t\t } else {\r\n\t\t\t \tformBean.setPatientCaseSystemId(model.getPatientCaseSystemId());\r\n\t\t\t }\r\n\r\n\t\t\t\t\tformBean.setTransactionStatus(false);\r\n\t\t\t\t\tformBean.setTransactionMessage(MiscConstant.TRANS_MESSSAGE_RESET);\r\n\t\t\t\t\tforwardAction = ActionConstant.SHOW_AJAX_ADD;\t\r\n\t\t\t\t} else if (command.equalsIgnoreCase(ParamConstant.AJAX_SAVE)) {\r\n\t\t\t\t\t//populateModel\r\n\t\t\t\t\tPrognosis model = (Prognosis) formBean.populateModel(formBean);\r\n\t\t\t\t\t\r\n\t\t\t\t\tUser user = (User) request.getSession().getAttribute(MiscConstant.USER_SESSION);\r\n\t\t\t\t\t\r\n\t\t\t\t\tHashMap<String,Object> dataMap = new HashMap<String, Object>();\r\n\t\t\t dataMap.put(MapConstant.MODULE, module);\r\n\t\t\t dataMap.put(MapConstant.CLASS_DATA, model);\r\n\t\t\t dataMap.put(MapConstant.USER_SESSION_DATA, user);\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t if (model.getId()==0) {//diagnosisid in form\r\n\t\t\t \tdataMap.put(MapConstant.ACTION, ActionConstant.SAVE);\r\n\t\t\t } else {\r\n\t\t\t \tdataMap.put(MapConstant.ACTION, ActionConstant.UPDATE);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t ServiceManager service = new ServiceManagerImpl();\r\n\t\t\t Map<String, Object> resultMap = service.executeRequest(dataMap);\r\n\t\t\t \r\n\t\t\t if (resultMap!=null && !resultMap.isEmpty()) {\r\n\t\t\t \t//check resultmap action status\r\n\t\t\t \tboolean transactionStatus = (boolean) resultMap.get(MapConstant.TRANSACTION_STATUS);\r\n\r\n\t\t\t \tformBean.setTransactionStatus(transactionStatus);\r\n\t\t\t \t\r\n\t\t\t \t\t\t\r\n\t\t\t \tif (transactionStatus) {\r\n\t\t\t \t\t//show success page\r\n\t\t\t \t\t//add confirmation message\r\n\t\t\t \t\t\t\t \t\t\r\n\t\t\t \t\tif (dataMap.get(MapConstant.ACTION).equals(ActionConstant.SAVE)) {\r\n\t\t\t \t\t\tformBean.setTransactionMessage(MiscConstant.TRANS_MESSSAGE_SAVED);\r\n\t\t\t \t\t\tPIBSUtils.writeLogInfo(logger, MiscConstant.TRANS_MESSSAGE_SAVED+\" - \"+module);\r\n\t\t\t \t\t\t//logger.info(MiscConstant.TRANS_MESSSAGE_SAVED);\r\n\t\t\t \t\t}else {\r\n\t\t\t \t\t\tformBean.setTransactionMessage(MiscConstant.TRANS_MESSSAGE_UPDATED);\r\n\t\t\t \t\t\tPIBSUtils.writeLogInfo(logger, MiscConstant.TRANS_MESSSAGE_UPDATED+\" - \"+module);\r\n\t\t\t \t\t\t//logger.info(MiscConstant.TRANS_MESSSAGE_UPDATED);\r\n\t\t\t \t\t}\r\n\t\t\t \t\t\r\n\r\n\t\t\t \t\t//update the diagnosis id in the form\r\n\t\t\t \t\tservice = null;\r\n\t\t\t \t\tresultMap = null;\r\n\t\t\t \t\t\r\n\t\t\t \t\tmodel = new Prognosis();\r\n\t\t\t\t\t\t\tmodel.setPatientCaseSystemId(formBean.getPatientCaseSystemId());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdataMap = new HashMap<String, Object>();\r\n\t\t\t\t\t dataMap.put(MapConstant.MODULE, module);\r\n\t\t\t\t\t dataMap.put(MapConstant.CLASS_DATA, model);\r\n\t\t\t\t\t dataMap.put(MapConstant.ACTION, ActionConstant.GET_DATA);\r\n\t\t\t\t\t \r\n\t\t\t\t\t service = new ServiceManagerImpl();\r\n\t\t\t\t\t resultMap = service.executeRequest(dataMap);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t if (resultMap!=null && !resultMap.isEmpty()) {\r\n\t\t\t\t\t\t model = (Prognosis) resultMap.get(MapConstant.CLASS_DATA);\t\t \t\t\r\n\t\t\t\t\t \tformBean.populateFormBean(model);\r\n\t\t\t\t\t }\r\n\t\t\t \t\t\r\n\t\t\t \t\tforwardAction = ActionConstant.AJAX_SUCCESS;\r\n\t\t\t \t} else {\r\n\t\t\t \t\tformBean.setTransactionMessage(MiscConstant.TRANS_MESSSAGE_ERROR);\r\n\t\t\t \t\t//logger.info(MiscConstant.TRANS_MESSSAGE_ERROR);\r\n\t\t\t \t\tPIBSUtils.writeLogInfo(logger, MiscConstant.TRANS_MESSSAGE_ERROR+\" - \"+module);\r\n\t\t\t \t\tforwardAction = ActionConstant.AJAX_FAILED;\r\n\t\t\t \t}\r\n\t\t\t }\r\n\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t} else {\r\n\t\t\t\t//show main screen\r\n\t\t\t\t forwardAction = ActionConstant.SHOW_AJAX_MAIN;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn mapping.findForward(forwardAction);\r\n\t}", "public void dispatch();", "private ActionForward performAction(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t\tTSchool schoolParam = new TSchool();\r\n\t\tFindSchool bean = (FindSchool)form;\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tApplicationContext ctx = SpringContextAware.getApplicationContext();\r\n\t\t\tBeanUtils.copyProperties(schoolParam, bean);\r\n\t\t\t\r\n\t\t\tSchoolContentUploadService service = (SchoolContentUploadService)ctx.getBean(\"schoolContentSerivce\");\r\n\t\t\tList<TSchool> schoolList = service.findAllSchools(schoolParam);\r\n\t\t\t\r\n\t\t\tif (schoolList == null || schoolList.size() == 0)\r\n\t\t\t{\r\n\t\t\t\tActionMessages errors = getErrors(request);\r\n\t\t\t\terrors.add(\"ERROR_NO_RECORDS\", new ActionMessage(\"error.no.content\",\"No Records Found for your search\"));\r\n\t\t\t\treturn mapping.findForward(\"displayPage\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tIExtendedPaginatedList pageList = new PaginatedListImpl();\r\n\t\t\tint pageSize = SEARCH_RESULT_PAGE_SIZE; // Rows per page\r\n\t\t\tpageList.setPageSize(5);\r\n\t\t\t\r\n\t\t\tpageList.setList(schoolList);\r\n\t\t\tbean.setPgSearchResults(pageList);\r\n\t\t\t\t\t\t\r\n\t\t\trequest.setAttribute(\"SCHOOLRESULT\", schoolList);\r\n\t\t\trequest.setAttribute(\"SIZE\", schoolList.size());\r\n\t\t\treturn mapping.findForward(\"success\");\r\n\t\t}\r\n\t\tcatch(Exception ex)\r\n\t\t{\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public abstract String redirectTo();", "public abstract Action getAction();", "@Override\r\n\tpublic void execute(HttpServletRequest request) {\n\r\n\t}", "@Override\n\tpublic void actionHandler(Actions action, int arg1, int arg2) {\n\t\tlogic.actionHandler(action, arg1, arg2);\n\t}", "public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)\r\n\t\tthrows Exception {\r\n\t\t//DataSource ds = (DataSource) getDataSource(request, \"dbaccounting\");\r\n\t\t//Connection conn = null;\r\n\t\tBankReconcileForm bankReconcileForm = (BankReconcileForm) form;\r\n\t\tActionForward forward = null;\r\n\t\tString action = mapping.getParameter();\r\n\t\tHttpSession session = request.getSession();\r\n\t\tUsers users = (Users)session.getAttribute(CommonConstants.USER);\r\n\t\tSet lst = (Set)session.getAttribute(CommonConstants.VIEWACCESS);\r\n\t\t\tif (users!=null) {\r\n\t\t\t\tif (CommonUtil.isHasRoleAccess(lst,request.getServletPath())) {\r\n\t\t\t\t\trequest.setAttribute(\"VIEWS\",lst);\r\n\t\t\t\t\tif (\"\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = mapping.findForward(\"home\");\r\n\t\t\t\t\t} else if (\"LIST\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performPartialList(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"FORM\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performForm(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"SAVE\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tif (bankReconcileForm.getString(\"subaction\")!=null && bankReconcileForm.getString(\"subaction\").length()>0 && bankReconcileForm.getString(\"subaction\").equalsIgnoreCase(\"refresh\")) {\r\n\t\t\t\t\t\t\tforward = performForm(mapping, form, request, response);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tforward = performSave(mapping, form, request, response);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (\"DETAIL\".equalsIgnoreCase(action)) { \r\n\t\t\t\t\t\tforward = performDetail(mapping, form, request, response);\r\n\t\t\t\t\t} else if (\"DELETE\".equalsIgnoreCase(action)) {\r\n\t\t\t\t\t\tforward = performDelete(mapping, form, request, response);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn forward;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tActionMessages errors = new ActionMessages();\r\n\t\t\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage(\"error.privilage\",request.getContextPath()+mapping.getPath()));\r\n\t\t\t\t\tsaveMessages(request,errors);\t\t\t\t\r\n\t\t\t\t\treturn mapping.findForward(\"home\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn mapping.findForward(\"index\");\r\n\t\t\t}\r\n\t}", "@Override\r\n \tpublic ActionForward executeSecureAction(ActionMapping mapping, ActionForm form,\r\n \t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException,\r\n \t\t\tServletException\r\n \t{\r\n \t\tsaveActionErrors(form, request);\r\n \t\t// //Gets the value of the operation parameter.\r\n \t\t// String operation = request.getParameter(Constants.OPERATION);\r\n \t\t//\r\n \t\t// //Sets the operation attribute to be used in the Add/Edit Institute\r\n \t\t// Page.\r\n \t\t// request.setAttribute(Constants.OPERATION, operation);\r\n \t\ttry\r\n \t\t{\r\n \t\t\tfinal IFactory factory = AbstractFactoryConfig.getInstance().getBizLogicFactory();\r\n \t\t\tfinal IBizLogic bizLogic = factory.getBizLogic(Constants.DEFAULT_BIZ_LOGIC);\r\n \r\n \t\t\t// ************* ForwardTo implementation *************\r\n \t\t\t// forwarded from Specimen page\r\n \t\t\tfinal HashMap forwardToHashMap = (HashMap) request.getAttribute(\"forwardToHashMap\");\r\n \t\t\tString specimenId = null;\r\n \t\t\tString specimenLabel = null;\r\n \t\t\tString specimenClass = null;\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents start\r\n \t\t\tString fromQuickEvent = (String) request.getAttribute(\"isQuickEvent\");\r\n \t\t\tif (fromQuickEvent == null)\r\n \t\t\t{\r\n \t\t\t\tfromQuickEvent = request.getParameter(\"isQuickEvent\");\r\n \t\t\t}\r\n \t\t\tString eventSelected = \"\";\r\n \t\t\tif (fromQuickEvent != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t\teventSelected = (String) request.getAttribute(Constants.EVENT_SELECTED);\r\n \t\t\t\tif (eventSelected == null && forwardToHashMap != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenClass = (String) forwardToHashMap.get(\"specimenClass\");\r\n \t\t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\t\tif (specimenClass.equalsIgnoreCase(\"Tissue\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[14];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Molecular\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[9];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Cell\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[1];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Fluid\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[7];\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t\trequest.setAttribute(Constants.EVENT_SELECTED, eventSelected);\r\n \t\t\t\t// System.out.println(\"::::::::::::::\\n\\n\\n\\n\"+form.getClass().\r\n \t\t\t\t// getName() );\r\n \t\t\t\tListSpecimenEventParametersForm eventForm = (ListSpecimenEventParametersForm) form;\r\n \t\t\t\tif (eventForm == null)\r\n \t\t\t\t{\r\n \t\t\t\t\teventForm = new ListSpecimenEventParametersForm();\r\n \t\t\t\t}\r\n \t\t\t\teventForm.setSpecimenEventParameter(eventSelected);\r\n \t\t\t\teventForm.setSpecimenId(specimenId.trim());\r\n \r\n \t\t\t}\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents end\r\n \t\t\tif (forwardToHashMap != null)\r\n \t\t\t{\r\n \t\t\t\t// Fetching SpecimenId from HashMap generated by\r\n \t\t\t\t// ForwardToProcessor\r\n \t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\tspecimenLabel = (String) forwardToHashMap.get(Constants.SPECIMEN_LABEL);\r\n \t\t\t\tLogger.out.debug(\"SpecimenID found in \" + \"forwardToHashMap========>>>>>>\"\r\n \t\t\t\t\t\t+ specimenId);\r\n \t\t\t}\r\n \t\t\t// ************* ForwardTo implementation *************\r\n \r\n \t\t\t// If new SpecimenEvent is added, specimenId in forwardToHashMap\r\n \t\t\t// will be null, following code handles that case\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tfinal String eventId = request.getParameter(\"eventId\");\r\n \r\n \t\t\t\t// Added by Vijay Pande. While cliking on events tab both\r\n \t\t\t\t// specimenId and eventId are getting null. Since there was no\r\n \t\t\t\t// check on eventId it was throwing error for following retrieve\r\n \t\t\t\t// call.\r\n \t\t\t\t// Null check is added for eventId. Fix for bug Id: 4731\r\n \t\t\t\tif (eventId != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tLogger.out.debug(\"Event ID added===>\" + eventId);\r\n \t\t\t\t\t// Retrieving list of SpecimenEvents for added\r\n \t\t\t\t\t// SpecimenEventId\r\n \t\t\t\t\tfinal Object object = bizLogic.retrieve(\r\n \t\t\t\t\t\t\tSpecimenEventParameters.class.getName(), new Long(eventId));\r\n \r\n \t\t\t\t\tif (object != null)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\t// Getting object of specimenEventParameters from the\r\n \t\t\t\t\t\t// list of SepcimenEvents\r\n \t\t\t\t\t\tfinal SpecimenEventParameters specimenEventParameters = (SpecimenEventParameters) object;\r\n \r\n \t\t\t\t\t\t// getting SpecimenId of SpecimenEventParameters\r\n \t\t\t\t\t\tfinal AbstractSpecimen specimen = specimenEventParameters.getSpecimen();\r\n \t\t\t\t\t\tspecimenId = specimen.getId().toString();\r\n \t\t\t\t\t\t// specimenLabel = specimen.getLabel();\r\n \t\t\t\t\t\tLogger.out.debug(\"Specimen of Event Added====>\"\r\n \t\t\t\t\t\t\t\t+ (specimenEventParameters.getSpecimen()).getId());\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = request.getParameter(Constants.SPECIMEN_ID);\r\n \t\t\t\tspecimenLabel = request.getParameter(Constants.SPECIMEN_LABEL);\r\n \t\t\t}\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t}\r\n \r\n \t\t\trequest.setAttribute(Constants.SPECIMEN_ID, specimenId);\r\n \r\n \t\t\tfinal Object object = bizLogic.retrieve(Specimen.class.getName(), new Long(specimenId));\r\n \r\n \t\t\tif (object != null)\r\n \t\t\t{\r\n \t\t\t\tfinal Specimen specimen = (Specimen) object;\r\n \t\t\t\tif (specimenLabel == null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenLabel = specimen.getLabel();\r\n \t\t\t\t}\r\n \t\t\t\t// Setting Specimen Event Parameters' Grid\r\n \r\n \t\t\t\t// Ashish - 4/6/07 --- Since lazy=true, retriving the events\r\n \t\t\t\t// collection.\r\n \t\t\t\tfinal Collection<SpecimenEventParameters> specimenEventCollection = this\r\n \t\t\t\t\t\t.getSpecimenEventParametersColl(specimenId, bizLogic);\r\n \t\t\t\tfinal Collection<ActionApplication> dynamicEventCollection = this\r\n \t\t\t\t\t\t.getDynamicEventColl(specimenId, bizLogic);\r\n \t\t\t\t/**\r\n \t\t\t\t * Name: Chetan Patil Reviewer: Sachin Lale Bug ID: Bug#4180\r\n \t\t\t\t * Patch ID: Bug#4180_1 Description: The values of event\r\n \t\t\t\t * parameter is stored in a Map and in turn the Map is stored in\r\n \t\t\t\t * a List. This is then sorted chronologically, using a date\r\n \t\t\t\t * value form the Map. After sorting the List of Map is\r\n \t\t\t\t * converted into the List of List, which is used on the UI for\r\n \t\t\t\t * displaying values form List on the grid.\r\n \t\t\t\t */\r\n \t\t\t\tif (dynamicEventCollection != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tfinal List<Map<String, Object>> gridData = new ArrayList<Map<String, Object>>();\r\n \r\n \t\t\t\t\tfor (final ActionApplication actionApp : dynamicEventCollection)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tfinal Map<String, Object> rowDataMap = new HashMap<String, Object>();\r\n \t\t\t\t\t\tif (actionApp != null)\r\n \t\t\t\t\t\t{\r\n \t\t\t\t\t\t\t//final String[] events = EventsUtil\r\n \t\t\t\t\t\t\t//\t\t.getEvent(eventParameters);\r\n \t\t\t\t\t\t\tlong contId = actionApp.getApplicationRecordEntry().getFormContext()\r\n \t\t\t\t\t\t\t\t\t.getContainerId();\r\n \t\t\t\t\t\t\tList contList = AppUtility\r\n \t\t\t\t\t\t\t\t\t.executeSQLQuery(\"select caption from dyextn_container where identifier=\"\r\n \t\t\t\t\t\t\t\t\t\t\t+ contId);\r\n \t\t\t\t\t\t\tString container = (String) ((List) contList.get(0)).get(0);\r\n \t\t\t\t\t\t\t//final Object container =bizLogic.retrieve(Container.class.getName(),new Long(contId));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.ID, String.valueOf(actionApp.getId()));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_NAME,\r\n \t\t\t\t\t\t\t\t\tedu.wustl.cab2b.common.util.Utility\r\n \t\t\t\t\t\t\t\t\t\t\t.getFormattedString(container));\r\n \r\n \t\t\t\t\t\t\t// Ashish - 4/6/07 - retrieving User\r\n \t\t\t\t\t\t\t// User user = eventParameters.getUser();\r\n \t\t\t\t\t\t\tfinal User user = this.getUser(actionApp.getId(), bizLogic);\r\n \r\n \t\t\t\t\t\t\trowDataMap.put(Constants.USER_NAME, user.getLastName() + \"&#44; \"\r\n \t\t\t\t\t\t\t\t\t+ user.getFirstName());\r\n \r\n \t\t\t\t\t\t\t// rowDataMap.put(Constants.EVENT_DATE,\r\n \t\t\t\t\t\t\t// Utility.parseDateToString\r\n \t\t\t\t\t\t\t// (eventParameters.getTimestamp(),\r\n \t\t\t\t\t\t\t// Constants.TIMESTAMP_PATTERN)); // Sri: Changed\r\n \t\t\t\t\t\t\t// format for bug #463\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_DATE, actionApp.getTimestamp());\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.PAGE_OF, \"pageOfDynamicEvent\");// pageOf\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.SPECIMEN_ID, request\r\n \t\t\t\t\t\t\t\t\t.getAttribute(Constants.SPECIMEN_ID));// pageOf\r\n \t\t\t\t\t\t\tgridData.add(rowDataMap);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\tfinal List<List<String>> gridDataList = this.getSortedGridDataList(gridData);\r\n \t\t\t\t\tfinal String[] columnList1 = Constants.EVENT_PARAMETERS_COLUMNS;\r\n \t\t\t\t\tfinal List<String> columnList = new ArrayList<String>();\r\n \t\t\t\t\tfor (final String element : columnList1)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tcolumnList.add(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tAppUtility.setGridData(gridDataList, columnList, request);\r\n \t\t\t\t\trequest.setAttribute(\r\n \t\t\t\t\t\t\tedu.wustl.simplequery.global.Constants.SPREADSHEET_DATA_LIST,\r\n \t\t\t\t\t\t\tgridDataList);\r\n \t\t\t\t\tfinal Integer identifierFieldIndex = new Integer(0);\r\n \t\t\t\t\trequest.setAttribute(\"identifierFieldIndex\", identifierFieldIndex.intValue());\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (request.getAttribute(Constants.SPECIMEN_LABEL) == null)\r\n \t\t\t{\r\n \t\t\t\trequest.setAttribute(Constants.SPECIMEN_LABEL, specimenLabel);\r\n \t\t\t}\r\n \t\t\trequest.setAttribute(Constants.EVENT_PARAMETERS_LIST, new SOPBizLogic()\r\n \t\t\t\t\t.getAllSOPEventFormNames(dynamicEventMap));\r\n \t\t\trequest.getSession().setAttribute(\"dynamicEventMap\", dynamicEventMap);\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\trequest.setAttribute(Constants.MENU_SELECTED, new String(\"15\"));\r\n \t\tString pageOf = (String) request.getParameter(Constants.PAGE_OF);\r\n \t\tif (pageOf == null)\r\n \t\t\tpageOf = (String) request.getAttribute(Constants.PAGE_OF);\r\n \t\trequest.setAttribute(Constants.PAGE_OF, pageOf);\r\n \r\n \t\tif (pageOf.equals(Constants.PAGE_OF_LIST_SPECIMEN_EVENT_PARAMETERS_CP_QUERY))\r\n \t\t{\r\n \t\t\trequest.getSession().setAttribute(\"CPQuery\", \"CPQuery\");\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tif (request.getSession().getAttribute(\"CPQuery\") != null)\r\n \t\t\t{\r\n \t\t\t\trequest.getSession().removeAttribute(\"CPQuery\");\r\n \t\t\t}\r\n \t\t}\r\n \t\tLong specimenRecEntryEntityId = null;\r\n \t\ttry\r\n \t\t{\r\n \t\t\tif (CatissueCoreCacheManager.getInstance().getObjectFromCache(\r\n \t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID) != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = (Long) CatissueCoreCacheManager.getInstance()\r\n \t\t\t\t\t\t.getObjectFromCache(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID);\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = AnnotationUtil\r\n \t\t\t\t\t\t.getEntityId(AnnotationConstants.ENTITY_NAME_SPECIMEN_REC_ENTRY);\r\n \t\t\t\tCatissueCoreCacheManager.getInstance().addObjectToCache(\r\n \t\t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID, specimenRecEntryEntityId);\r\n \t\t\t}\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\t// request.setAttribute(\"specimenEntityId\", specimenEntityId);\r\n \t\trequest.setAttribute(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID,\r\n \t\t\t\tspecimenRecEntryEntityId);\r\n \t\treturn mapping.findForward(request.getParameter(Constants.PAGE_OF));\r\n \t}", "void doHandle()\n\t{\n\t\t// should be at least on arg\n\t\tif (!hasMoreTokens())\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"argumentRequired\")); //$NON-NLS-1$\n\t\telse\n\t\t{\n\t\t\t// poor man's fix for supporting 'all' option\n\t\t\tString faultName = nextToken();\n\t\t\tObject[] names = new Object[] { faultName };\n\n\t\t\t// replace the single name with all of them\n\t\t\tif (faultName.equalsIgnoreCase(\"all\")) //$NON-NLS-1$\n\t\t\t\tnames = m_faultTable.names();\n\n\t\t\t// make sure we know about at least one\n\t\t if (!m_faultTable.exists((String)names[0]))\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"unrecognizedFault\")); //$NON-NLS-1$\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (!hasMoreTokens())\n\t\t\t\t\tlistFault((String)names[0]);\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tString action = null;\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\twhile(hasMoreTokens())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taction = nextToken();\n\t\t\t\t\t\t\tfor(int i=0; i<names.length; i++)\n\t\t\t\t\t\t\t\tm_faultTable.action((String)names[i], action);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(IllegalArgumentException iae)\n\t\t\t\t\t{\n\t\t\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\t\t\targs.put(\"action\", action); //$NON-NLS-1$\n\t\t\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"unrecognizedAction\", args)); //$NON-NLS-1$\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void handle(String target, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, int dispatch) throws IOException,\r\n\t\t\tServletException {\n\t\t\r\n\t}", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) {\n\t\tSystem.out.println(\"View1Model execute(HttpServletRequest request, HttpServletResponse response) 호출\");\n\t}", "public String execute()\n {\n log.info(\"Entering JSONAlfrescoNavigationAction.execute()...\");\n\n if (\"null\".equals(remoteContainerId))\n {\n remoteContainerId = null;\n }\n\n if (fetchDirectories && !fetchFiles)\n {\n if (searchString == null)\n {\n log.info(\"Fetching directory listing for \" + remoteContainerId);\n count = alfrescoNavigationManager.fillDirectories(directories, remoteContainerId, firstRecord);\n }\n else\n {\n log.info(\"Searching directories for \" + searchString);\n count = alfrescoNavigationManager.searchDirectories(directories, searchString, firstRecord);\n }\n }\n\n if (fetchFiles)\n {\n if (searchString == null)\n {\n count = alfrescoNavigationManager.getFiles(remoteContainerId, firstRecord, directories, files);\n }\n else\n {\n count = alfrescoNavigationManager.searchFiles(searchString, firstRecord, directories, files);\n }\n }\n\n log.info(\"Exiting JSONAlfrescoNavigationAction.execute()\");\n return SUCCESS;\n }", "void executeAction(String action, Map params,\n IPSAgentHandlerResponse response);", "@Override\r\n public void onRender() {\n try {\r\n if (this.isLookupMode) { \r\n //查找返回模式\r\n this.pageActionList.clear();\r\n String divID =\"\";\r\n for(String key : this.divMap.keySet()) {\r\n Control control = this.divMap.get(key);\r\n if (control.getName().equals(this.lookupControlID)) {\r\n divID = key;\r\n break;\r\n }\r\n }\r\n //增加查找返回操作\r\n ActionButton newLink = new ActionButton(this.getClass(),\"lookup\",\"确认选择\",\"\",null);\r\n newLink.setOnClick(\"javascript:doLookupSelectDiv('\"+divID+\"','\"+this.lookupCallback+\"')\");\r\n newLink.setAttribute(\"class\",\"icon\"); \r\n this.regPageButton(newLink);\r\n }\r\n } catch (BizException e) {\r\n throw e;\r\n } catch (Exception ex) {\r\n throw new BizException(BizException.SYSTEM, \"渲染页面失败\", ex);\r\n }\r\n }", "@Override\r\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\t\r\n\t}", "@Override\n public void onAction(String text, String extra, String source) {\n stopEditingUrl();\n if (UrlInputView.TYPED.equals(source)) {\n String url = null;\n boolean wap2estore = BrowserConfig.getInstance(getContext())\n .hasFeature(BrowserConfig.Feature.WAP2ESTORE);\n if ((wap2estore && isEstoreTypeUrl(text)) || isRtspTypeUrl(text)\n || isMakeCallTypeUrl(text)) {\n url = text;\n } else {\n url = UrlUtils.smartUrlFilter(text, false);\n }\n\n Tab t = mBaseUi.getActiveTab();\n // Only shortcut javascript URIs for now, as there is special\n // logic in UrlHandler for other schemas\n if (url != null && t != null && url.startsWith(\"javascript:\")) {\n mUiController.loadUrl(t, url);\n setDisplayTitle(null, text);\n return;\n }\n\n // add for carrier wap2estore feature\n if (url != null && t != null && wap2estore && isEstoreTypeUrl(url)) {\n if (handleEstoreTypeUrl(url)) {\n setDisplayTitle(null, text);\n return;\n }\n }\n // add for rtsp scheme feature\n if (url != null && t != null && isRtspTypeUrl(url)) {\n if (handleRtspTypeUrl(url)) {\n setDisplayTitle(null, text);\n return;\n }\n }\n // add for \"wtai://wp/mc;\" scheme feature\n if (url != null && t != null && isMakeCallTypeUrl(url)) {\n if (handleMakeCallTypeUrl(url)) {\n return;\n }\n }\n }\n Intent i = new Intent();\n String action = Intent.ACTION_SEARCH;\n i.setAction(action);\n i.putExtra(SearchManager.QUERY, text);\n if (extra != null) {\n i.putExtra(SearchManager.EXTRA_DATA_KEY, extra);\n }\n if (source != null) {\n Bundle appData = new Bundle();\n appData.putString(\"source\", source);\n i.putExtra(\"source\", appData);\n }\n mUiController.handleNewIntent(i);\n setDisplayTitle(null, text);\n }", "@Override\n\tpublic ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\t\n\t\tActionForward forward = new ActionForward();\n\t\tArrayList <EtcBean>searchList = null;\n\t\tEtcDAO etcdao = new EtcDAO();\n\t\t\n\t\tsearchList=etcdao.getJeju();\n\t \tif(searchList==null){\n\t \t\tSystem.out.println(\"비였다.\");\n\t \t\treturn null;\n\t \t}\n\t \tSystem.out.println(\"제주 지점 등장\");\n\t \tfor(int i=0;i<searchList.size();i++) {\n\t \t\tSystem.out.println(searchList.get(i).getTEL());\n\t \t}\n\t \tSystem.out.println(searchList);\n\t \t\n\t \trequest.setAttribute(\"searchList\", searchList);\n\t \tforward.setRedirect(false);\n \t\tforward.setPath(\"/top/ebiga.co.kr/home/bbs/board_제주.jsp\");\n \t\treturn forward;\n\t}", "@Override\n protected void handleRequest (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope,\n @Nonnull final UnifiedResponse aUnifiedResponse) throws Exception\n {\n String sKey = aRequestScope.getPathWithinServlet ();\n if (sKey.length () > 0)\n sKey = sKey.substring (1);\n\n SimpleURL aTargetURL = null;\n final GoMappingItem aGoItem = getResolvedGoMappingItem (sKey);\n if (aGoItem == null)\n {\n s_aLogger.warn (\"No such go-mapping item '\" + sKey + \"'\");\n // Goto start page\n aTargetURL = getURLForNonExistingItem (aRequestScope, sKey);\n s_aStatsError.increment (sKey);\n }\n else\n {\n // Base URL\n if (aGoItem.isInternal ())\n {\n final IMenuTree aMenuTree = getMenuTree ();\n if (aMenuTree != null)\n {\n // If it is an internal menu item, check if this internal item is an\n // \"external menu item\" and if so, directly use the URL of the\n // external menu item\n final IRequestManager aARM = ApplicationRequestManager.getRequestMgr ();\n final String sTargetMenuItemID = aARM.getMenuItemFromURL (aGoItem.getTargetURL ());\n\n final IMenuObject aMenuObj = aMenuTree.getItemDataWithID (sTargetMenuItemID);\n if (aMenuObj instanceof IMenuItemExternal)\n {\n aTargetURL = new SimpleURL (((IMenuItemExternal) aMenuObj).getURL ());\n }\n }\n }\n if (aTargetURL == null)\n {\n // Default case - use target link from go-mapping\n aTargetURL = aGoItem.getTargetURL ();\n }\n\n // Callback\n modifyResultURL (aRequestScope, sKey, aTargetURL);\n\n s_aStatsOK.increment (sKey);\n }\n\n // Append all request parameters of this request\n // Don't use the request attributes, as there might be more of them\n final Enumeration <?> aEnum = aRequestScope.getRequest ().getParameterNames ();\n while (aEnum.hasMoreElements ())\n {\n final String sParamName = (String) aEnum.nextElement ();\n final String [] aParamValues = aRequestScope.getRequest ().getParameterValues (sParamName);\n if (aParamValues != null)\n for (final String sParamValue : aParamValues)\n aTargetURL.add (sParamName, sParamValue);\n }\n\n if (s_aLogger.isDebugEnabled ())\n s_aLogger.debug (\"Following go-mapping item '\" + sKey + \"' to \" + aTargetURL.getAsString ());\n else\n if (GlobalDebug.isDebugMode ())\n s_aLogger.info (\"Following go-mapping item '\" + sKey + \"' to \" + aTargetURL.getAsString ());\n\n // Main redirect :)\n aUnifiedResponse.setRedirect (aTargetURL);\n }", "public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n //forward name\n final String EDIT_USER_PAGE = \"edituser\";\n final String SEARCH_USER_PAGE = \"searchuser\";\n //button action\n final String MORE_INFO = \"moreinfo\";\n final String SEARCH = \"search\";\n final String BUTTON_VALUE = \"buttonValue\";\n //request parameter\n final String USER_LIST = \"userList\";\n final String USER = \"user\";\n final String USER_BEAN = \"suBean\";\n final String MATCH_ONLY = \"match\";\n final String STARTS_WITH = \"starts\";\n final String VIEW = \"view\";\n final String VIEW_MODE_READONLY = \"3\";\n final String VIEW_MODE_EDIT = \"1\";\n final String DATE_FORMAT = \"MM/dd/yyyy\";\n UserManagementForm userManagementForm = (UserManagementForm) form;// TODO Auto-generated method stub\\\n String loginName = userManagementForm.getLoginName();\n HttpSession session = request.getSession();\n String userCreatedDate = userManagementForm.getTxtCal();\n String firstName = userManagementForm.getFirstName();\n String lastName = userManagementForm.getLastName();\n String roleName = userManagementForm.getRoleName();\n String status = userManagementForm.getUserStatus();\n String limit = CommonUtils.isNotEmpty(userManagementForm.getLimit()) ? userManagementForm.getLimit() : \"100\";\n String match = userManagementForm.getMatch();\n String buttonValue = userManagementForm.getButtonValue();\n String forwardName = SEARCH_USER_PAGE;\n UserDAO userDAO = new UserDAO();\n User user = null;\n SearchUserBean suBean = new SearchUserBean();\n suBean.setLoginName(loginName);\n suBean.setTxtCal(userCreatedDate);\n suBean.setFirstName(firstName);\n suBean.setLastName(lastName);\n suBean.setRoleName(roleName);\n suBean.setUserStatus(status);\n suBean.setLimit(limit);\n suBean.setSortBy(userManagementForm.getSortBy());\n suBean.setColumnName(userManagementForm.getColumnName());\n\n suBean.setMatch(!CommonUtils.isEmpty(match) ? match : STARTS_WITH);\n session.setAttribute(\"suBean\", suBean);\n// if (SEARCH.equals(buttonValue)) {\n// Date date = null;\n// if (CommonUtils.isNotEmpty(userCreatedDate)) {\n// date = DateUtils.parseDate(userCreatedDate, DATE_FORMAT);\n// }\n// if (match.equals(MATCH_ONLY)) {\n// List userList = userDAO.findForManagement(loginName, date, firstName, lastName, roleName);\n// session.setAttribute(USER_LIST, userList);\n// } else if (match.equals(STARTS_WITH)) {\n// List userList = userDAO.findForManagementaction(loginName, date, firstName, lastName, roleName);\n// session.setAttribute(USER_LIST, userList);\n// }\n// forwardName = SEARCH_USER_PAGE;\n// } else\n\n if (CommonConstants.EDIT_ACTION.equals(buttonValue)) {\n forwardName = EDIT_USER_PAGE;\n user = userDAO.findById(userManagementForm.getParam());\n session.setAttribute(USER, user);\n request.setAttribute(\"agentInformation\", new UserDAO().findByUserAgentProperty(\"userId.userId\", user.getUserId()));\n request.setAttribute(\"match\", match);\n session.setAttribute(VIEW, VIEW_MODE_EDIT);\n } else if (MORE_INFO.equals(buttonValue)) {\n user = userDAO.findById(userManagementForm.getParam());\n request.setAttribute(VIEW, VIEW_MODE_READONLY);\n session.setAttribute(USER, user);\n forwardName = EDIT_USER_PAGE;\n } else {\n DBUtil dbUtil = new DBUtil();\n request.setAttribute(\"userList\", new UserDAO().getUserList(suBean));\n request.setAttribute(\"statuslist\", dbUtil.getStatusList());\n request.setAttribute(\"rolelist\", dbUtil.getRoleList());\n forwardName = SEARCH_USER_PAGE;\n //session.setAttribute(USER_LIST,userDAO.findAllUsers());\n }\n request.setAttribute(BUTTON_VALUE, buttonValue);\n request.setAttribute(\"palletList\", userDAO.getPalletList());\n request.setAttribute(\"packageList\", userDAO.getPackageList());\n return mapping.findForward(forwardName);\n }", "@Override\r\n protected void doActionDelegate(int actionId)\r\n {\n \r\n }", "@Override\r\n\tpublic int resolveActions() {\n\t\treturn 0;\r\n\t}", "void dispatchRequest(String urlPath) throws Exception;", "public interface Resolution {\n\n /**\n * Called by the Stripes dispatcher to invoke the Resolution. Should use the\n * request and response provided to direct the user to an appropriate view.\n *\n * @param request the current HttpServletRequest\n * @param response the current HttpServletResponse\n * @throws Exception exceptions of any type may be thrown if the Resolution\n * cannot be executed as intended\n */\n void execute(HttpServletRequest request, HttpServletResponse response)\n throws Exception;\n}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\n String forward=\"\";\r\n String action = request.getParameter(\"action\");\r\n\r\n forward = \"/createLocacao.jsp\";\r\n\r\n RequestDispatcher view = request.getRequestDispatcher(forward);\r\n view.forward(request, response);\r\n }", "public abstract ActionInMatch act();", "protected ActionForward unspecified(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n String message =\n messages.getMessage(\"mapping.parameter\", mapping.getPath());\n\n log.error(message);\n\n throw new ServletException(message);\n }", "protected void doProcess(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\trequest.setCharacterEncoding(\"utf-8\");\r\n\t\tString requestURI = request.getRequestURI();\r\n\t\tString contextPath = request.getContextPath();\r\n\t\tString command = requestURI.substring(contextPath.length());\r\n\t\tAction action = null;\r\n\t\tActionForward forward = null;\r\n\t\t\r\n\t\tif (command.equals(\"/managerLogin.ma\")) {\r\n\t\t\taction = new ManagerLogInAction();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tforward = action.execute(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (command.equals(\"/managerLogOut.ma\")) {\r\n\t\t\taction = new ManagerLogOutAction();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tforward = action.execute(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (command.equals(\"/memberList.ma\")) {\r\n\t\t\taction = new MemberListAction();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tforward = action.execute(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (command.equals(\"/managerDelete.ma\")) {\r\n\t\t\taction = new ManagerDeleteFromMemberAction();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tforward = action.execute(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\tif (forward != null) {\r\n\t\t\tif (forward.isRedirect()) {\r\n\t\t\t\tresponse.sendRedirect(forward.getPath());\r\n\t\t\t} else {\r\n\t\t\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(forward.getPath());\r\n\t\t\t\tdispatcher.forward(request, response);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected abstract void actionExecuted(SUT system, State state, Action action);", "abstract public void performAction();", "protected void execute(ActionInvocation<LocalService> actionInvocation, Object serviceImpl) throws Exception {\n/* 67 */ Object result, inputArgumentValues[] = createInputArgumentValues(actionInvocation, this.method);\n/* */ \n/* */ \n/* 70 */ if (!actionInvocation.getAction().hasOutputArguments()) {\n/* 71 */ log.fine(\"Calling local service method with no output arguments: \" + this.method);\n/* 72 */ Reflections.invoke(this.method, serviceImpl, inputArgumentValues);\n/* */ \n/* */ return;\n/* */ } \n/* 76 */ boolean isVoid = this.method.getReturnType().equals(void.class);\n/* */ \n/* 78 */ log.fine(\"Calling local service method with output arguments: \" + this.method);\n/* */ \n/* 80 */ boolean isArrayResultProcessed = true;\n/* 81 */ if (isVoid) {\n/* */ \n/* 83 */ log.fine(\"Action method is void, calling declared accessors(s) on service instance to retrieve ouput argument(s)\");\n/* 84 */ Reflections.invoke(this.method, serviceImpl, inputArgumentValues);\n/* 85 */ result = readOutputArgumentValues(actionInvocation.getAction(), serviceImpl);\n/* */ }\n/* 87 */ else if (isUseOutputArgumentAccessors(actionInvocation)) {\n/* */ \n/* 89 */ log.fine(\"Action method is not void, calling declared accessor(s) on returned instance to retrieve ouput argument(s)\");\n/* 90 */ Object returnedInstance = Reflections.invoke(this.method, serviceImpl, inputArgumentValues);\n/* 91 */ result = readOutputArgumentValues(actionInvocation.getAction(), returnedInstance);\n/* */ }\n/* */ else {\n/* */ \n/* 95 */ log.fine(\"Action method is not void, using returned value as (single) output argument\");\n/* 96 */ result = Reflections.invoke(this.method, serviceImpl, inputArgumentValues);\n/* 97 */ isArrayResultProcessed = false;\n/* */ } \n/* */ \n/* 100 */ ActionArgument[] arrayOfActionArgument = actionInvocation.getAction().getOutputArguments();\n/* */ \n/* 102 */ if (isArrayResultProcessed && result instanceof Object[]) {\n/* 103 */ Object[] results = (Object[])result;\n/* 104 */ log.fine(\"Accessors returned Object[], setting output argument values: \" + results.length);\n/* 105 */ for (int i = 0; i < arrayOfActionArgument.length; i++) {\n/* 106 */ setOutputArgumentValue(actionInvocation, arrayOfActionArgument[i], results[i]);\n/* */ }\n/* 108 */ } else if (arrayOfActionArgument.length == 1) {\n/* 109 */ setOutputArgumentValue(actionInvocation, arrayOfActionArgument[0], result);\n/* */ } else {\n/* 111 */ throw new ActionException(ErrorCode.ACTION_FAILED, \"Method return does not match required number of output arguments: \" + arrayOfActionArgument.length);\n/* */ } \n/* */ }", "public abstract void action();", "public abstract void action();", "public abstract void action();", "public abstract void action();", "public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n\t\t\n\t \tCardLookupListForm oform = (CardLookupListForm)form;\n\n\t \tParamsParser.setState( request, Applications.INVENTORY, oform.getAppState());\n\n\t \toform.setStoragetype(null);\n\t fillStoragePlace(oform);\n\t oform.setIsInside(fillAgregate(oform));\n\t fillResource(oform);\n\t fillResourcetypes(oform);\n\t fillManufacturer(oform);\n\t fillOwner(oform);\n\t if(oform.getResource() != null && (oform.getPagetype() == null || \"\".equals(oform.getPagetype()))) {\n\t\t if(\"S\".equals(oform.getPolicy())) {\n\t\t\t oform.setPagetype(\"2\");\n\t\t } else\n\t\t if(\"P\".equals(oform.getPolicy()) || \"B\".equals(oform.getPolicy())) {\n\t\t\t oform.setPagetype(\"3\");\n\t\t }\n\t }\n\t if(request.getParameter(\"pagetype\") != null) {\n\t\t oform.setPagetype(request.getParameter(\"pagetype\"));\n\t } else {\n\t\t oform.setPagetype(\"1\");\n\t\t}\n\t\tsuper.perform( mapping, form, request, response );\n//\t\ttc.finish(\"ACTION\");\n\t\treturn mapping.findForward( \"main\" );\n\t}", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "protected abstract void action(Object obj);", "private void executeSearch() {\n if (!view.getSearchContent().getText().isEmpty()) {\n SearchModuleDataHolder filter = SearchModuleDataHolder.getSearchModuleDataHolder();\n //set search content text for full text search\n filter.setSearchText(view.getSearchContent().getText());\n forwardToCurrentView(filter);\n } else {\n eventBus.showPopupNoSearchCriteria();\n }\n }", "protected void service(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletException, IOException {\n\tif (aRequest.getAttribute(\"EXTRANET_METHOD\") == null) {\n\t\tsuper.service(aRequest, aResponse);\n\t} else {\n\t\t// If comming from a forward, determine if GET method should be invoked\n\t\tString lMethod = (String) aRequest.getAttribute(\"EXTRANET_METHOD\");\n\t\tif (lMethod != null && lMethod.equals(\"GET\")) {\n\t\t\tdoGet(aRequest, aResponse);\n\t\t} else {\n\t\t\tsuper.service(aRequest, aResponse);\n\t\t}\n\t}\n}", "public abstract String intercept(ActionInvocation invocation) throws Exception;", "@Override\n\tprotected void executeSearch(String term) {\n\t\t\n\t}", "@Override\r\n\tpublic ActionForward execute(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\trequest.setCharacterEncoding(\"utf-8\");\r\n\t\t\r\n\t\tString id=request.getParameter(\"id\");\r\n\t\tString pwd=request.getParameter(\"pwd\");\r\n\t\tString name=request.getParameter(\"name\");\r\n\t\tString birth=request.getParameter(\"birth\");\r\n\t\tString phone=request.getParameter(\"phone\");\r\n\t\tint addrselect=Integer.parseInt(request.getParameter(\"addrselect\"));\r\n\t\t\r\n\t\tString addr;\r\n\t\t\r\n\t\tif(addrselect==0)\r\n\t\taddr=request.getParameter(\"roadaddr\");\r\n\t\telse\r\n\t\taddr=request.getParameter(\"jibunaddr\");\r\n\t\t\r\n\t\tString detailaddr=request.getParameter(\"detailaddr\");\r\n\t\tString fulladdr=addr+\" \"+detailaddr;\r\n\t\t\r\n\t\tint zipcode=Integer.parseInt(request.getParameter(\"zipcode\"));\r\n\t\t\r\n\t\t\r\n\t\tYIMemberDTO dto=new YIMemberDTO();\r\n\t\tdto.setId(id);\r\n\t\tdto.setPwd(pwd);\r\n\t\tdto.setName(name);\r\n\t\tdto.setBirth(birth);\r\n\t\tdto.setPhone(phone);\r\n\t\tdto.setAddr(fulladdr);\r\n\t\tdto.setZipcode(zipcode);\r\n\t\t\r\n\t\t\r\n\t\tYIMemberService service=YIMemberService.getService();\r\n\t\tservice.join(dto);\r\n\t\t\r\n\t\tActionForward f=new ActionForward();\r\n\t\tf.setForward(false);\r\n\t\tf.setUrl(\"homedream.do\");\r\n\t\treturn f;\r\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n response.sendRedirect(\"/viewSearch.jsp\");\n }", "private String performTheAction(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tString servletPath = request.getServletPath();\r\n\t\tString action = getActionName(servletPath);\r\n\t\t// Let the logged in user run his chosen action\r\n\t\treturn Action.perform(action, request);\r\n\t}", "public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\n\t\t// Extract attributes we will need\n\t\tAgent agent = null;\n\t\t\n\t\tHttpSession session = request.getSession();\n\t\tActionMessages errors = new ActionMessages();\n\t\trequest.setAttribute(\"maintask\", \"1\");\n\t\t\n\t\t\n\t\tif (request.getParameter(\"loadBarcode\") != null) {\n\t\t\tLFFound found = new LFServiceBean().getFoundItemByBarcode(request.getParameter(\"loadBarcode\"));\n\t\t\tif (found == null) {\n\t\t\t\tActionMessage error = new ActionMessage(\"error.unable.add.item\");\n\t\t\t\terrors.add(ActionMessages.GLOBAL_MESSAGE, error);\n\t\t\t\tsaveMessages(request, errors);\n\t\t\t\treturn (mapping.findForward(\"success\"));\n\t\t\t} else {\n\t\t\t\tresponse.sendRedirect(\"create_found_item.do?barcode=\" + found.getBarcode());\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (request.getParameter(\"taskmanager\") != null) {\n\t\t\tif (session.getAttribute(\"user\") == null) {\n\t\t\t\tresponse.sendRedirect(\"logoff.do\");\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\ttaskManagerSetup(session, request);\n\t\t\t//Forward control to the specified success URI\n\t\t\treturn (mapping.findForward(\"success\"));\n\t\t}\n\n\t\t// Validate the request parameters specified by the user\n\t\tString username = (String) PropertyUtils.getSimpleProperty(form, \"username\");\n\t\tString password = (String) PropertyUtils.getSimpleProperty(form, \"password\");\n\t\tString instance = (String) System.getProperty(\"instance.ref\");\n\t\tString companyCode = request.getParameter(\"companyCode\");\n\t\t\n\t\tSsoUtils ssoUtils = new SamlUtils();//TODO consider spring injection\n\t\tSsoNode ssoNode = ssoUtils.getSsoNode(request);\n\t\t\n\t\t\n\t\tboolean hasSSO=ssoNode.isValidAssertion();\n\t\t\n\t\tif (!hasSSO && username.length() == 0 && password.length() == 0) {\n\t\t\tsession.invalidate();\n\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\n\t\t\tString ldapRedirect=PropertyBMO.getValue(PropertyBMO.LDAP_REDIRECT);\n\t\t\tif(request.getParameter(\"bypass\") == null && ldapRedirect!=null && !ldapRedirect.isEmpty()){\n\t\t\t\tresponse.sendRedirect(ldapRedirect);\n\t\t\t}\n\t\t\treturn mapping.findForward(TracingConstants.LOGON);\n\t\t}\n\t\tauthenlog.info(\"Authenticating User: \"+username+\". Company Code: \"+companyCode+\". Instance: \"+instance);\n\t\tif(hasSSO){\n\t\t\tboolean autoProvision = PropertyBMO.isTrue(PropertyBMO.SSO_AUTO_PROVISION);\n\t\t\tagent = SecurityUtils.authUserNoPassword(ssoNode.getUsername(), ssoNode.getCompanycode(), 0, errors, autoProvision, ssoNode);\n\t\t} else {\n\t\t\tagent = SecurityUtils.authUser(username, password, companyCode, 0, errors);\n\t\t}\n\t\t// Report any errors we have discovered back to the original form\n\t\tif (!errors.isEmpty()) {\n\t\t\tsaveMessages(request, errors);\n\t\t\tauthenlog.info(\"User: \"+username+\", Company Code: \"+companyCode+\", Instance: \"+instance+\" Authentication Failed\");\n\t\t\tPropertyUtils.setSimpleProperty(form, \"username\", foobar);\n\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\t\t\treturn mapping.findForward(TracingConstants.LOGON);\n\t\t}\n\n\t\tauthenlog.info(\"User: \"+username+\", Company Code: \"+companyCode+\", Instance: \"+instance+\" Authentication Success\");\n\t\t// check to see if password needs to be reset\n\t\t/** SF: If user logged in through LDAP, it should bypass password validation requirements **/\n\t\tif (!hasSSO && (agent.isReset_password() || !SecurityUtils.isPolicyAcceptablePassword(companyCode, password, username, request, true))) {\n\t\t\tsession.setAttribute(\"usertemp\", agent);\n\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\t\t\treturn mapping.findForward(TracingConstants.PASS_RESET);\n\t\t}\n\n\t\tint expiredays = agent.getStation().getCompany().getVariable().getPass_expire_days();\n\t\t/** SF: If user logged in through LDAP, it should bypass password expiration requirements **/\n\t\tif (!hasSSO && expiredays > 0) {\n\t\t\tDate lastreset = agent.getLast_pass_reset_date();\n\t\t\tif (lastreset == null || DateUtils.formatDate(lastreset, TracingConstants.DB_DATEFORMAT, null, null).equals(\"0000-00-00\")) {\n\t\t\t\t// first time logon, set it\n\t\t\t\tagent.setLast_pass_reset_date(new Date());\n\t\t\t} else {\n\t\t\t\tlong nowtime = ((new Date()).getTime() / (3600000 * 24));\n\t\t\t\tlong lastresettime = (lastreset.getTime() / (3600000 * 24));\n\t\t\t\tif ((nowtime - lastresettime) > expiredays) {\n\t\t\t\t\t// forward to reset page\n\t\t\t\t\tsession.setAttribute(\"usertemp\", agent);\n\t\t\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\t\t\t\t\treturn mapping.findForward(TracingConstants.PASS_RESET);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Create the history container object\n\t\tsession.setAttribute(\"historyContainer\", new HistoryContainer());\n\n\t\t// Save our logged-in user in the session\n\t\tsession.setAttribute(\"lastupdate\", new Date());\n\t\t//session.setMaxInactiveInterval(agent.getTimeout() * 60);\n\t\tsession.setAttribute(\"user\", agent);\n\n\t\t// write to database\n\t\tagent.setLast_logged_on(TracerDateTime.getGMTDate());\n\t\tagent.setIs_online(1);\n\t\tSecurityUtils.updateAgentLogin(agent, null, 1, true);\n\n\t\t// load drop down ui properties into session\n\t\tProperties properties = new Properties();\n\t\ttry {\n\t\t\tServletContext sc = getServlet().getServletContext();\n\t\t\tString configfilepath = sc.getRealPath(\"/\") + \"/WEB-INF/classes/\";\n\t\t\tproperties.load(new FileInputStream(configfilepath + \"custom_ui.properties\"));\n\t\t\tsession.setAttribute(\"first_row_menu_text\", properties.getProperty(\"first_row_menu_text\"));\n\t\t\tsession.setAttribute(\"first_row_bg\", properties.getProperty(\"first_row_bg\"));\n\t\t\tsession.setAttribute(\"drop_down_text\", properties.getProperty(\"drop_down_text\"));\n\t\t\tsession.setAttribute(\"drop_down_text_hilite\", properties.getProperty(\"drop_down_text_hilite\"));\n\t\t\tsession.setAttribute(\"drop_down_bg\", properties.getProperty(\"drop_down_bg\"));\n\t\t\tsession.setAttribute(\"drop_down_bg_hilite\", properties.getProperty(\"drop_down_bg_hilite\"));\n\n\t\t} catch (IOException e) {\n\t\t\t// unable to get config\n\t\t\tresponse.addHeader(\"Pragma\", \"No-cache\");\n\t\t\tresponse.addHeader(\"Cache-Control\", \"no-cache\");\n\t\t\tresponse.addDateHeader(\"Expires\", -1);\n\t\t\treturn mapping.findForward(TracingConstants.LOGON);\n\t\t}\n\n\t\t// Remove the obsolete form bean\n\t\tif (mapping.getAttribute() != null) {\n\t\t\tif (\"request\".equals(mapping.getScope()))\n\t\t\t\trequest.removeAttribute(mapping.getAttribute());\n\t\t\telse\n\t\t\t\tsession.removeAttribute(mapping.getAttribute());\n\t\t}\n\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tLinkedHashMap<String, LinkedHashMap<String, String>> map = UserPermissions.renderApplicationLinks(agent);\n\t\tsession.setAttribute(\"menu_links\", map);\n\t\t//Setup the activity list\n\t\tif (map != null && map.get(\"Task Manager\") != null) {\n\t\t\ttaskManagerSetup(session, request);\n\t\t}\n\t\t// prepopulate list\n\t\tTracerUtils.populateLists(session);\n\n\t\tif (UserPermissions.hasPermission(TracingConstants.SYSTEM_COMPONENT_NAME_CBRO_VIEW, agent)) {\n\t\t\t//Setup cbroStationid for the first time\n\t\t\tsession.setAttribute(\"cbroStationID\", \"\" + agent.getStation().getStation_ID());\n\t\t}\n\n\t\t// Forward control to the specified success URI\n\t\tString redirectUrl = (String) session.getAttribute(TracingConstants.SESSION_REDIRECT_URL);\n\t\tif (redirectUrl != null) {\n\t\t\tsession.removeAttribute(TracingConstants.SESSION_REDIRECT_URL);\n\t\t\tresponse.sendRedirect(redirectUrl);\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t\treturn (mapping.findForward(\"success\"));\n\t}", "Object executeMethodCall(ActionType actionType, String actionName, Map<String, Object> inParams) throws APIException;", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "Action execute(Context context);", "protected ActionForward performAction(ActionMapping mapping,\n ActionForm form, HttpServletRequest request,\n HttpServletResponse response) throws Exception {\n\n String forward = FWD_SUCCESS;\n request.setAttribute(ALLOW_EDITS_KEY, \"true\");\n request.setAttribute(PREVIOUS_DISABLED, \"false\");\n request.setAttribute(NEXT_DISABLED, \"false\");\n\n String id = request.getParameter(ID);\n \n if (StringUtil.isNullorNill(id) || \"0\".equals(id)) {\n isNew = true;\n } else {\n isNew = false;\n }\n \n BaseActionForm dynaForm = (BaseActionForm) form;\n \n ActionMessages errors = dynaForm.validate(mapping, request); \n if (errors != null && errors.size() > 0) {\n // System.out.println(\"Server side validation errors \"\n // + errors.toString());\n saveErrors(request, errors);\n // since we forward to jsp - not Action we don't need to repopulate\n // the lists here\n return mapping.findForward(FWD_FAIL);\n }\n \n String start = (String) request.getParameter(\"startingRecNo\");\n String direction = (String) request.getParameter(\"direction\");\n \n District district = new District();\n //get sysUserId from currentUserId\n district.setSysUserId(currentUserId); \n org.hibernate.Transaction tx = HibernateUtil.getSession().beginTransaction();\n \n // populate value holder from form\n PropertyUtils.copyProperties(district, dynaForm);\n // Get cityId from property \"selectedCityId\"\n String selectedCityId = PropertyUtils\n .getProperty(dynaForm, \"selectedCityId\").toString();\n // Get City object from cityId\n DictionaryDAO dictionaryDAO = new DictionaryDAOImpl();\n Dictionary city = new Dictionary();\n city = dictionaryDAO.getDataForId(selectedCityId);\n \n // Get DictrictEntry from districtName property from form\n String districtName = PropertyUtils\n .getProperty(dynaForm, \"districtName\").toString();\n \n DistrictDAO distDAO = new DistrictDAOImpl();\n \n List<Dictionary> districtEntry = distDAO.getDistrictsEntyByName(districtName);\n \n // Set some property for district\n district.setCity(city);\n district.setDescription(\"\");\n \n try {\n // Check DistrictEntry is already exists or not.\n if (districtEntry.size() == 0) {\n Dictionary newDistrictEntry = new Dictionary();\n newDistrictEntry.setDictEntry(districtName);\n DictionaryCategory dicCategory = new DictionaryCategory();\n DictionaryCategoryDAO dicCategoryDAO = \n new DictionaryCategoryDAOImpl();\n dicCategory = dicCategoryDAO\n .getDictionaryCategoryByName(\"districts\");\n newDistrictEntry.setDictionaryCategory(dicCategory);\n newDistrictEntry.setSysUserId(currentUserId);\n newDistrictEntry.setIsActive(\"Y\");\n dictionaryDAO.insertData(newDistrictEntry);\n district.setDistrictEntry(dictionaryDAO\n .getDictionaryByDictEntry(districtName));\n } else {\n district.setDistrictEntry(districtEntry.get(0));\n }\n if (!isNew) {\n // UPDATE\n distDAO.updateData(district);\n } else {\n // INSERT\n distDAO.insertData(district);\n }\n tx.commit();\n \n } catch (LIMSRuntimeException lre) {\n //bugzilla 2154\n LogEvent.logError(\"DistrictUpdateAction\", \"performAction()\",\n lre.toString());\n tx.rollback();\n errors = new ActionMessages();\n java.util.Locale locale = (java.util.Locale) request.getSession()\n .getAttribute(\"org.apache.struts.action.LOCALE\");\n ActionError error = null;\n if (lre.getException()\n instanceof org.hibernate.StaleObjectStateException) {\n // how can I get popup instead of struts error at the top of\n // page?\n // ActionMessages errors = dynaForm.validate(mapping, request);\n error = new ActionError(\"errors.OptimisticLockException\", null,\n null);\n } else {\n // bugzilla 1482\n if (lre.getException()\n instanceof LIMSDuplicateRecordException) {\n String messageKey = \"district.browse.title\";\n String msg = ResourceLocator.getInstance()\n .getMessageResources().getMessage(locale,\n messageKey);\n error = new ActionError(\"errors.DuplicateRecord\",\n msg, null);\n\n } else {\n error = new ActionError(\"errors.UpdateException\", null,\n null);\n }\n }\n errors.add(ActionMessages.GLOBAL_MESSAGE, error);\n saveErrors(request, errors);\n request.setAttribute(Globals.ERROR_KEY, errors);\n //bugzilla 1485: allow change and try updating again \n //enable save button & disable previous and next\n request.setAttribute(PREVIOUS_DISABLED, \"true\");\n request.setAttribute(NEXT_DISABLED, \"true\");\n forward = FWD_FAIL;\n\n } finally {\n HibernateUtil.closeSession();\n }\n \n if (forward.equals(FWD_FAIL)) {\n return mapping.findForward(forward);\n }\n // initialize the form\n dynaForm.initialize(mapping);\n // repopulate the form from valueholder\n PropertyUtils.copyProperties(dynaForm, district);\n if (\"true\".equalsIgnoreCase(request.getParameter(\"close\"))) {\n forward = FWD_CLOSE;\n }\n\n if (district.getId() != null && !district.getId().equals(\"0\")) {\n request.setAttribute(ID, district.getId());\n\n }\n\n //bugzilla 1400\n if (isNew) {\n forward = FWD_SUCCESS_INSERT;\n }\n //bugzilla 1467 added direction for redirect to NextPreviousAction\n return getForward(mapping.findForward(forward), id, start, direction);\n \n }", "interface ActionDelegate {\n\n void onRouteUrlsChanged();\n\n void onResetRouteUrls();\n\n void onSaveRouteUrls();\n }", "@Override\r\n\tpublic Message doAction() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Forward execute(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t\t\n\t\trequest.setCharacterEncoding(\"utf-8\");\n\t\t\n\t\tint notice_no = Integer.parseInt(request.getParameter(\"notice_no\"));\n\t\tNoticeService service =NoticeService.getinstace();\n\t\tNoticeDTO dto = service.detail(notice_no);\n\n\t\trequest.setAttribute(\"dto\", dto);\n\t\tForward forward = new Forward();\n\t\tforward.setForward(true);\n//\t\tforward.setPath(\"/WEB-INF/user/insertform.jsp\"); \n\t\tforward.setPath(\"/WEB-INF/main.jsp?page=user/noticemodifyform.jsp\"); \n \n\t\treturn forward;\n\t}", "public interface ActionCommand {\n String execute(HttpServletRequest request);\n\n}", "@Override\r\n\tpublic void execute(ActionContext ctx) {\n\t\t\r\n\t}", "protected abstract void afterHttpHeadersPopulatedExecute(String finalLocation, ActionInvocation invocation) throws Exception;" ]
[ "0.60835093", "0.58725834", "0.57589084", "0.573764", "0.5669718", "0.5633905", "0.55091363", "0.5462318", "0.54181105", "0.5350176", "0.5330557", "0.53053707", "0.52947617", "0.5286853", "0.5285166", "0.5265242", "0.52167344", "0.5211184", "0.52014613", "0.5200619", "0.5186112", "0.5181076", "0.5164654", "0.5164288", "0.5147017", "0.5140275", "0.51274216", "0.5121171", "0.5104924", "0.51036745", "0.51036745", "0.5086314", "0.50802815", "0.50791776", "0.50718415", "0.5071407", "0.5070149", "0.50662595", "0.5047309", "0.504048", "0.5030978", "0.502401", "0.5020756", "0.5020612", "0.49956226", "0.49766535", "0.49657688", "0.49611437", "0.4959547", "0.49521264", "0.49454066", "0.49410662", "0.4932868", "0.49311635", "0.49260306", "0.4925901", "0.4923414", "0.49232492", "0.49228132", "0.49164394", "0.49149033", "0.4907964", "0.49048212", "0.4903458", "0.49012083", "0.48999053", "0.4891423", "0.48744658", "0.4873517", "0.48733518", "0.4853746", "0.4850915", "0.48471165", "0.48420066", "0.48420066", "0.48420066", "0.48420066", "0.48343575", "0.483001", "0.48026526", "0.48005578", "0.47994372", "0.47961035", "0.47914568", "0.47895414", "0.47890553", "0.47887158", "0.4786448", "0.4780788", "0.47788283", "0.47788283", "0.47788283", "0.47741812", "0.47684377", "0.4767369", "0.4767233", "0.47642693", "0.47603506", "0.47603276", "0.4751791" ]
0.6137498
0
Convenience method for getting an action form base on it's mapped scope.
protected ActionForm getActionForm(ActionMapping mapping, HttpServletRequest request) { ActionForm actionForm = null; // Remove the obsolete form bean if (mapping.getAttribute() != null) { if ("request".equals(mapping.getScope())) { actionForm = (ActionForm) request.getAttribute(mapping .getAttribute()); } else { HttpSession session = request.getSession(); actionForm = (ActionForm) session.getAttribute(mapping .getAttribute()); } } return actionForm; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected ActionForm processActionForm(HttpServletRequest request,\n HttpServletResponse response,\n ActionMapping mapping)\n {\n String scope = mapping.getScope();\n if(scope != null)\n {\n try\n {\n if(scope.equals(\"session\"))\n {\n OperationContext opCon = OperationContext.getOperationContext(request);\n if(opCon != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Looking for ActionForm in OperationContext[id=\" + opCon.getOperationContextId() + \"]\"); //20030124AH\n }\n ActionForm form = opCon.getActionForm();\n if(form != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Found ActionForm in OperationContext\"); //20030124AH\n }\n return form;\n }\n else\n {\n if(_log.isWarnEnabled())\n {\n _log.warn(\"No ActionForm found in OperationContext\"); //20030124AH\n }\n return null; //20030124AH\n }\n }\n }\n }\n catch(OperationException e)\n {\n // OperationExceptions here are normal when we forward from a completed operation\n // to the next action, so we ignore them.\n }\n catch(Throwable t)\n {\n if(_log.isErrorEnabled())\n {\n _log.error(\"Error caught in processActionForm() performing customised ActionForm handling\", t); //20030124AH\n }\n }\n }\n\n if(mapping instanceof GTActionMapping)\n { //20030124AH - Check the mapping to see if we should defer form creation or do it as normal\n if( ((GTActionMapping)mapping).isDeferFormCreation() )\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Deferring ActionForm creation\");\n }\n return null;\n }\n }\n //...\n if(_log.isInfoEnabled())\n {\n _log.info(\"Delegating to superclass to obtain ActionForm\"); //20030124AH\n }\n ActionForm form = super.processActionForm(request, response, mapping);\n return form;\n }", "public Form getActionForm(String stateName, String actionName)\r\n throws ProcessManagerException {\r\n try {\r\n return processModel.getPublicationForm(actionName, currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.UNKNOWN_ACTION\", e);\r\n }\r\n }", "public Form readForm(String formKey);", "private String getFormAction(UserRequest ureq) {\n // cannot avoid rawtype warning\n @SuppressWarnings(\"rawtypes\")\n Enumeration params = ureq.getHttpReq().getParameterNames();\n while (params.hasMoreElements()) {\n String key = (String) params.nextElement();\n if (key.startsWith(ACTION_PRE)) {\n return key.substring(ACTION_PRE.length());\n }\n }\n return null;\n }", "ActionMap getActionMap() {\n return createActionMap(); }", "public Form getForm() throws IOException {\n if(form == null) {\n form = builder.getInstance();\n }\n return form;\n }", "@ModelAttribute(\"form\")\n public SearchFiltersLocationForm getForm(PortletRequest request, PortletResponse response) throws PortletException {\n // Portal controller context\n PortalControllerContext portalControllerContext = new PortalControllerContext(this.portletContext, request, response);\n\n return this.service.getForm(portalControllerContext);\n }", "public Form getForm() {\n return form;\n }", "public ResourcesMetadata getForm()\n\t\t{\n\t\t\treturn m_form;\n\t\t}", "IFormView getFormView();", "public PDAction getFo() {\n/* 187 */ COSDictionary fo = (COSDictionary)this.actions.getDictionaryObject(\"Fo\");\n/* 188 */ PDAction retval = null;\n/* 189 */ if (fo != null)\n/* */ {\n/* 191 */ retval = PDActionFactory.createAction(fo);\n/* */ }\n/* 193 */ return retval;\n/* */ }", "public Form getSearchForm() throws PublicationTemplateException;", "private ApplicationActionMap getAppActionMap() {\n\t\treturn Application.getInstance().getContext().getActionMap(this);\n\t}", "public static String getScopedForm(AjaxGroup aGroup, AjaxElement aElement,\n AjaxEvent aEvent) {\n\n String form = aGroup.getForm();\n if (aElement.getForm() != null) {\n form = aElement.getForm();\n }\n if (aEvent.getForm() != null) {\n form = aEvent.getForm();\n }\n return form;\n\n }", "protected IManagedForm getForm(){\r\n\t\treturn _mForm;\r\n\t}", "FORM createFORM();", "protected final Form getForm() {\n\t\treturn itsForm;\n\t}", "public String getForm() {\r\n\t\treturn form;\r\n\t}", "public Form getPresentationForm(String name) throws ProcessManagerException {\r\n try {\r\n return processModel.getPresentationForm(name, currentRole, getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.UNKNOWN_ACTION\", e);\r\n }\r\n }", "java.lang.String getFormName();", "public ActionReader getAction(String name);", "public Form getAssignForm() throws ProcessManagerException {\r\n try {\r\n return new XmlForm(getAssignTemplate());\r\n } catch (FormException ex) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_ASSIGN_FORM\", ex);\r\n }\r\n }", "ActionMap getActionMap() {\n String mapName = getPropertyPrefix() + \".actionMap\";\n ActionMap map = (ActionMap)UIManager.get(mapName);\n\n if (map == null) {\n map = createActionMap();\n if (map != null) {\n UIManager.getLookAndFeelDefaults().put(mapName, map);\n }\n }\n ActionMap componentMap = new ActionMapUIResource();\n componentMap.put(\"requestFocus\", new FocusAction());\n /*\n * fix for bug 4515750\n * JTextField & non-editable JTextArea bind return key - default btn not accessible\n *\n * Wrap the return action so that it is only enabled when the\n * component is editable. This allows the default button to be\n * processed when the text component has focus and isn't editable.\n *\n */\n if (getEditorKit(editor) instanceof DefaultEditorKit) {\n if (map != null) {\n Object obj = map.get(DefaultEditorKit.insertBreakAction);\n if (obj instanceof DefaultEditorKit.InsertBreakAction breakAction) {\n Action action = new TextActionWrapper(breakAction);\n componentMap.put(action.getValue(Action.NAME),action);\n }\n }\n }\n if (map != null) {\n componentMap.setParent(map);\n }\n return componentMap;\n }", "@DefaultHandler\n public Resolution form() {\n return new ForwardResolution(MAIN_VIEW);\n }", "public Form getViewForm() throws PublicationTemplateException;", "public XhtmlForm getForm(Element el) {\n\t\tReplacedElementFactory ref = getSharedContext().getReplacedElementFactory();\n\t\tif (ref != null && ref instanceof XHTMLReplacedElementFactoryImpl) {\n\t\t\treturn ((XHTMLReplacedElementFactoryImpl) ref).getForm(el);\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\t\tpublic FormTestFacade getForm() {\n\t\t\treturn null;\n\t\t}", "@Override\n\t\tpublic FormTestFacade getForm() {\n\t\t\treturn null;\n\t\t}", "public ActionForward unspecified(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n this.setup(mapping,form,request,response);\n \n return mapping.findForward(\"backToGeneExp\");\n }", "@GetMapping(\"/form\")\n\tpublic String form() {\n\t\treturn \"form\";\n\t}", "protected UIForm getForm(FacesContext context) {\n UIComponent parent = this.getParent();\n while (parent != null) {\n if (parent instanceof UIForm) {\n break;\n }\n parent = parent.getParent();\n }\n return (UIForm) parent;\n }", "@Override\r\n\tpublic ActionForward to_objectNew(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows KANException {\n\t\treturn null;\r\n\t}", "ActionMap createActionMap() {\n ActionMap am = super.createActionMap();\n if (am != null) {\n am.put(\"selectMenu\", new PostAction((JMenu)menuItem, true)); }\n return am; }", "BuildFilterForm getEditionForm(ID branchId, String name) throws BuildFilterNotFoundException, BuildFilterNotLoggedException;", "public Action getAction(String name) { return actions.get(name); }", "public NoteForm getOneAsForm(Integer id);", "public Map<String, HasFormAssociation> fetchFormAssociations();", "public ActionForward unspecified(ActionMapping mapping,\r\n ActionForm form,\r\n HttpServletRequest request,\r\n HttpServletResponse response) throws Exception {\r\n return display(mapping, form, request, response);\r\n }", "public ActionForward execute(ActionMapping actionMapping,\r\n ActionForm actionForm,\r\n HttpServletRequest request,\r\n HttpServletResponse response) {\r\n return process(actionMapping, actionForm, request, response, null);\r\n }", "ActionMap createActionMap() {\n ActionMap map = new ActionMapUIResource();\n Action[] actions = editor.getActions();\n //System.out.println(\"building map for UI: \" + getPropertyPrefix());\n int n = actions.length;\n for (int i = 0; i < n; i++) {\n Action a = actions[i];\n map.put(a.getValue(Action.NAME), a);\n //System.out.println(\" \" + a.getValue(Action.NAME));\n }\n map.put(TransferHandler.getCutAction().getValue(Action.NAME),\n TransferHandler.getCutAction());\n map.put(TransferHandler.getCopyAction().getValue(Action.NAME),\n TransferHandler.getCopyAction());\n map.put(TransferHandler.getPasteAction().getValue(Action.NAME),\n TransferHandler.getPasteAction());\n return map;\n }", "public abstract Collection<Pair<String,String>> getAllForms();", "public Form getPrintForm(HttpServletRequest request)\r\n throws ProcessManagerException {\r\n try {\r\n com.silverpeas.workflow.api.model.Form form = processModel\r\n .getForm(\"printForm\");\r\n if (form == null) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.NO_PRINTFORM_DEFINED_IN_MODEL\");\r\n }\r\n \r\n else {\r\n HtmlForm htmlForm = new HtmlForm(processModel.getDataFolder()\r\n .toRecordTemplate(currentRole, getLanguage(), true));\r\n \r\n htmlForm.setFileName(form.getHTMLFileName());\r\n return htmlForm;\r\n }\r\n } catch (Exception e) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.EX_GET_PRINT_FORM\", e);\r\n }\r\n }", "public ControllerBinding getControllerBindingForAction(Action action) {\n\t\tif (action == null) {\n\t\t\tthrow new IllegalArgumentException(\"action is null\");\n\t\t}\n\n\t\tBinding binding = controls.get(action);\n\t\tif (binding != null) {\n\t\t\treturn binding.getControllerBinding();\n\t\t} else {\n\t\t\treturn addDefaultControllerBindingForAction(action);\n\t\t}\n\t}", "@Override\r\n\tpublic Visit getModel() {\n\t\treturn form;\r\n\t}", "public Action getAction(String actionName) {\r\n try {\r\n return processModel.getAction(actionName);\r\n } catch (WorkflowException we) {\r\n return null;\r\n }\r\n }", "public Form getUpdateForm() throws PublicationTemplateException;", "@SuppressWarnings(\"unchecked\")\r\n\tpublic ActionForward queryTest(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\treturn mapping.findForward(\"succ\");\r\n\t}", "public static AnnotatedActionFactory getActionFactory() {\n/* 84 */ return actionFactory;\n/* */ }", "@Override\n public ExtensionResult getForms(ExtensionRequest extensionRequest) {\n Map<String, String> output = new HashMap<>();\n FormBuilder formBuilder = new FormBuilder(appProperties.getFormIdTest());\n\n ButtonTemplate button = new ButtonTemplate();\n button.setTitle(\"Test Form\");\n button.setSubTitle(\"Subtitle is here\");\n button.setPictureLink(appProperties.getAtmUrl());\n button.setPicturePath(appProperties.getAtmUrl());\n List<EasyMap> actions = new ArrayList<>();\n EasyMap bookAction = new EasyMap();\n bookAction.setName(\"Label here\");\n bookAction.setValue(formBuilder.build());\n actions.add(bookAction);\n button.setButtonValues(actions);\n ButtonBuilder buttonBuilder = new ButtonBuilder(button);\n\n output.put(OUTPUT, buttonBuilder.build());\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n extensionResult.setValue(output);\n return extensionResult;\n }", "@JSProperty\n @Nullable\n HTMLFormElement getForm();", "@Override\r\n\tprotected String doExecute(ActionForm form, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, ActionMapping mapping)\r\n\t\t\tthrows Exception {\n\t\treturn null;\r\n\t}", "protected ActionFactory getActionFactory() {\n\t\treturn this.actionFactory;\n\t}", "public XmlNsForm getElementFormDefault();", "protected String getParameter(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n\n return mapping.getParameter();\n\n }", "public Form getCreationForm() throws ProcessManagerException {\r\n try {\r\n Action creation = processModel.getCreateAction();\r\n return processModel.getPublicationForm(creation.getName(), currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_NO_CREATION_FORM\", e);\r\n }\r\n }", "public Form getCurrentForm() {\n return currentForm;\n }", "public Action getAction() {\n\treturn action;\n }", "public String getForms(int i) {\n return forms[i];\n }", "public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\r\n\t\tif (isCancelled(request)) {\r\n\t\t\tActionForward af = cancelled(mapping, form, request, response);\r\n\r\n\t\t\tif (af != null) {\r\n\t\t\t\treturn af;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tMessageResources resources = getResources(request);\r\n\r\n\t\t// Identify the localized message for the cancel button\r\n\t\tString edit = resources.getMessage(Locale.ENGLISH, \"button.edit\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString save = resources.getMessage(Locale.ENGLISH, \"button.save\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString search = resources.getMessage(Locale.ENGLISH, \"button.search\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString view = resources.getMessage(Locale.ENGLISH, \"button.view\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString[] rules = { edit, save, search, view };\r\n\r\n\t\t// Identify the request parameter containing the method name\r\n\t\t// 得到字符串method,制定变量method中存放的是方法名称\r\n\t\tString parameter = mapping.getParameter();\r\n\r\n\t\t// don't set keyName unless it's defined on the action-mapping\r\n\t\t// no keyName -> unspecified will be called\r\n\t\tString keyName = null;\r\n\r\n\t\tif (parameter != null) {\r\n\t\t\t// 从变量method中取出方法名\r\n\t\t\tkeyName = request.getParameter(parameter);\r\n\t\t}\r\n\r\n\t\tif ((keyName == null) || (keyName.length() == 0)) {\r\n\t\t\tfor (int i = 0; i < rules.length; i++) {\r\n\t\t\t\t// apply the rules for automatically appending the method name\r\n\t\t\t\t// 根据请求路径中的信息,来选择处理方法。\r\n\t\t\t\tif (request.getServletPath().indexOf(rules[i]) > -1) {\r\n\t\t\t\t\treturn dispatchMethod(mapping, form, request, response,\r\n\t\t\t\t\t\t\trules[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn this.unspecified(mapping, form, request, response);\r\n\t\t}\r\n\r\n\t\t// Identify the string to lookup\r\n\t\tString methodName = getMethodName(mapping, form, request, response,\r\n\t\t\t\tparameter);\r\n\r\n\t\treturn dispatchMethod(mapping, form, request, response, methodName);\r\n\t}", "public AccessibleAction getAccessibleAction() {\n return this;\n }", "public Action getAction() {\n return action;\n }", "public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n // Use the overridden getMethodName.\n return super.execute(mapping, form, request, response);\n }", "public final ScForm findFormWrapper()\n {\n if ( isForm() )\n return asForm();\n\n if ( hasParent() )\n return getParent().findFormWrapper();\n\n return null;\n }", "@GetMapping(\"/api/internships/{internship_id}/application_form\")\n\tpublic ApplicationFormDto getApplication(@PathVariable(value = \"internship_id\") int internshipId) {\n\t\tInternship i = internshipService.findByIdAndStudent(internshipId, authenticationService.getCurrentStudent());\n\t\tif (i == null)\n\t\t\tthrow new AccessDeniedException(\"\");\n\n\t\tApplicationForm applicationForm = i.getApplicationForm();\n\t\treturn applicationFormService.toDto(applicationForm);\n\t}", "public Form getForm() {\n if (form == null) {//GEN-END:|14-getter|0|14-preInit\n // write pre-init user code here\n form = new Form(\"Form\", new Item[] { getStringItem() });//GEN-BEGIN:|14-getter|1|14-postInit\n form.addCommand(getExitCommand());\n form.setCommandListener(this);//GEN-END:|14-getter|1|14-postInit\n // write post-init user code here\n }//GEN-BEGIN:|14-getter|2|\n return form;\n }", "protected ActionForward annuler(ActionMapping mapping,ActionForm form , HttpServletRequest request, HttpServletResponse response, ActionErrors errors,Hashtable hParamProc ) throws ServletException{\r\n\t\tString sMode = request.getParameter(\"mode\") ;\r\n\t\t\r\n\t\t//page bCompocfAd.jsp\r\n\t\tif (sMode .equals(\"avant\")) \r\n\t\t\t return mapping.findForward(\"avant\") ;\r\n\t\t\r\n\t\telse if (sMode .equals(\"ecran\")) \r\n\t\t\t return mapping.findForward(\"ecran\") ;\r\n\t\t\r\n\t\telse if (sMode .equals(\"initial\")) \r\n\t\t\t return mapping.findForward(\"initial\") ;\r\n\t\t\r\n\t\telse\r\n\t\t return mapping.findForward(\"avant\") ;\r\n\t}", "public ActionForward execute(ActionMapping actionMapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\r\n\t\t\tHttpServletResponse httpServletResponse) {\r\n\r\n\t\tActionForward retorno = null;\r\n\r\n\t\tInserirQualidadeAguaActionForm form = (InserirQualidadeAguaActionForm) actionForm;\r\n\r\n\t\t// [FS0001 - VALIDAR REFERÊNCIA]\r\n\t\tif ((form.getReferencia() != null && !form.getReferencia().equals(\"\"))) {\r\n\r\n\t\t\tString anoMesReferencia = Util.formatarMesAnoParaAnoMesSemBarra(form.getReferencia());\r\n\t\t\t\r\n\t\t\tSistemaParametro sistemaParametro = this.getFachada().pesquisarParametrosDoSistema();\r\n\t\t\tString anoMesFuturo = \r\n\t\t\t\t\"\"+Util.somaUmMesAnoMesReferencia(sistemaParametro.getAnoMesFaturamento());\r\n\t\t\t\r\n\t\t\tif (Util.compararAnoMesReferencia(anoMesReferencia,anoMesFuturo,\">\")){\r\n\t\t\t\thttpServletRequest.setAttribute(\"nomeCampo\", \"referencia\");\t\r\n\t\t\t\tthrow new ActionServletException(\"atencao.mes_ano_menor\");\r\n\t\t\t} \r\n\r\n\t\t}\r\n\r\n\t\t// Setor Comercial\r\n\r\n\t\tif (form.getIdSetorComercial() != null\r\n\t\t\t\t&& !form.getIdSetorComercial().toString().trim()\r\n\t\t\t\t\t\t.equalsIgnoreCase(\"\")) {\r\n\t\t\tif (form.getIdSetorComercial() != null\r\n\t\t\t\t\t&& !form.getIdLocalidade().toString().trim()\r\n\t\t\t\t\t\t\t.equalsIgnoreCase(\"\")) {\r\n\r\n\t\t\t\tFiltroSetorComercial filtroSetorComercial = new FiltroSetorComercial();\r\n\r\n\t\t\t\tfiltroSetorComercial.limparListaParametros();\r\n\r\n\t\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\t\tFiltroSetorComercial.INDICADORUSO,\r\n\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\t\tFiltroSetorComercial.ID_LOCALIDADE, new Integer(form\r\n\t\t\t\t\t\t\t\t.getIdLocalidade())));\r\n\t\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\t\tFiltroSetorComercial.CODIGO_SETOR_COMERCIAL,\r\n\t\t\t\t\t\tnew Integer(form.getIdSetorComercial())));\r\n\r\n\t\t\t\tCollection colecaoSetorComerciais = this.getFachada()\r\n\t\t\t\t\t\t.pesquisar(filtroSetorComercial,\r\n\t\t\t\t\t\t\t\tSetorComercial.class.getName());\r\n\r\n\t\t\t\tif (colecaoSetorComerciais == null\r\n\t\t\t\t\t\t|| colecaoSetorComerciais.isEmpty()) {\r\n\t\t\t\t\tthrow new ActionServletException(\r\n\t\t\t\t\t\t\t\"atencao.setor_comercial.inexistente\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Verifica qual é o próximo passo para a execução do processo\r\n\t\t// String destinoPagina = httpServletRequest.getParameter(\"destino\");\r\n\r\n\t\treturn retorno;\r\n\r\n\t}", "protected ActionForward processActionPerform(HttpServletRequest request,\n HttpServletResponse response,\n Action action,\n ActionForm form,\n ActionMapping mapping)\n throws IOException, ServletException\n { //20030502AH - Copied from struts src, with extra code added \n try\n {\n if(mapping instanceof GTActionMapping)\n {\n //20050317AH - mod to also check for asdmin rights where spec'd in mapping\n GTActionMapping gtMapping = (GTActionMapping)mapping;\n boolean needsSession = gtMapping.isRequiresGtSession() ||gtMapping.isRequiresAdmin() \n \t\t\t\t\t\t\t\t\t\t\t\t|| gtMapping.isRequiresP2P() || gtMapping.isRequiresUDDI();\n if( needsSession )\n {\n //We will try to obtain a reference to the IGTSession using the method provided\n //in StaticWebUtils. This will throw a NoSessionException if we have no IGTSession.\n //By putting this check here it will be captured as though it was thrown by the action.\n IGTSession gtasSession = StaticWebUtils.getGridTalkSession(request);\n //NSL20060424 Check for P2P and UDDI requirement\n if (gtMapping.isRequiresP2P() && gtasSession.isNoP2P())\n {\n \tthrow new IllegalStateException(\"P2P functionality access required for mapped path \"+gtMapping.getPath());\n }\n if (gtMapping.isRequiresUDDI() && gtasSession.isNoUDDI())\n {\n \tthrow new IllegalStateException(\"UDDI functionality access required for mapped path \"+gtMapping.getPath());\n }\n if(gtMapping.isRequiresAdmin() && !gtasSession.isAdmin())\n {\n throw new IllegalStateException(\"Admin access required for mapped path \" + gtMapping.getPath());\n }\n }\n }\n return (action.execute(mapping, form, request, response));\n }\n catch (Exception e)\n {\n return (processException(request, response,e, form, mapping));\n }\n \n }", "public ActionForward inicio(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception\n {\n TemaForm temaForm = (TemaForm) form;\n String forward = \"INICIO\";\n try\n {\n temaForm.setCriterioTema(new CriterioTema());\n temaForm.setTema(new Tema());\n temaForm.setTemas(new ArrayList<Tema>());\n } catch (Exception e)\n {\n log.error(\"Ha ocurrido un error en el metodo inicio del tema\", e);\n }\n return mapping.findForward(forward);\n }", "@Override\n\tpublic ActionForward doDefault(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\n\t}", "public Form read() throws IOException {\r\n Form result = new Form();\r\n Parameter param = readNextParameter();\r\n \r\n while (param != null) {\r\n result.add(param);\r\n param = readNextParameter();\r\n }\r\n \r\n this.stream.close();\r\n return result;\r\n }", "UserEditForm getEditForm(User user);", "public ActionForward init(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\n\n\t\tHttpSession session = request.getSession();\n\t\tif (session.getAttribute(\"admin\") == null) {\n\t\t\treturn mapping.findForward(\"wrong\");\n\t\t} else {\n\t\t\tMessageService messageService = new MessageService();\n\t\t\tList<Message> msglist = messageService.getMessage();\n\t\t\trequest.setAttribute(\"msglist\", msglist);\n\t\t\tif (session.getAttribute(\"message\") != null) {\n\t\t\t\trequest.removeAttribute(\"message\");\n\t\t\t}\n\t\t\tOrderService orderService = new OrderService();\n\t\t\tint back = orderService.getOrderCount();\n\t\t\trequest.setAttribute(\"count\", back);\n\t\t\treturn mapping.findForward(\"list\");\n\t\t}\n\t}", "public FormInfo getForm (String forWhomNrMat) {\n for (int i = 0; i < forms.size(); i++) {\n if (this.forms.get(i).getStudent().getNrMatricol().equals(forWhomNrMat)) {\n return this.forms.get(i);\n }\n }\n \n return null;\n }", "public AppForm getAppFormById(String id) {\n return (AppForm)super.doFindObjectById(id);\r\n }", "public abstract Action getAction();", "public PDAction getE() {\n/* 71 */ COSDictionary e = (COSDictionary)this.actions.getDictionaryObject(\"E\");\n/* 72 */ PDAction retval = null;\n/* 73 */ if (e != null)\n/* */ {\n/* 75 */ retval = PDActionFactory.createAction(e);\n/* */ }\n/* 77 */ return retval;\n/* */ }", "public Form getStepForm(int index) throws ProcessManagerException {\r\n HistoryStep[] steps = currentProcessInstance.getHistorySteps();\r\n \r\n if (0 <= index && index < steps.length) {\r\n try {\r\n if (steps[index].getAction().equals(\"#question#\")\r\n || steps[index].getAction().equals(\"#response#\")) {\r\n return getQuestionForm(true);\r\n } else\r\n return processModel.getPresentationForm(steps[index].getAction(),\r\n currentRole, getLanguage());\r\n } catch (WorkflowException e) {\r\n SilverTrace.info(\"processManager\", \"sessionController\",\r\n \"processManager.ILL_DATA_STEP\", e);\r\n \r\n return null;\r\n }\r\n } else\r\n return null;\r\n }", "public synchronized FormDAO getFormDAO() {\n\t\treturn new FormDAO(this);\n\t}", "public A getAction() {\r\n\t\treturn action;\r\n\t}", "public static DockingActionIf getAction(DialogComponentProvider provider, String actionName) {\n\n\t\tSet<DockingActionIf> actions = provider.getActions();\n\t\tfor (DockingActionIf action : actions) {\n\t\t\tif (action.getName().equals(actionName)) {\n\t\t\t\treturn action;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static AssessmentSearchForm openFillSearchForm(Assessment assm) {\n openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_ASSESSMENTS, Popup.Search);\n\n Logger.getInstance().info(\"Fill out some search criteria fields with any data\");\n AssessmentSearchForm searchPage = new AssessmentSearchForm();\n searchPage.fillSearchForm(assm);\n\n return new AssessmentSearchForm();\n }", "@Override\n\tpublic ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tString action = request.getParameter(\"action1\");\n\t\tif (action == null) action = LIST;\n\t\tif (log.isDebugEnabled()) log.debug(\"action:\" + action);\n\t\tActionForward forward = null;\n\t\tUserDefinedQueryForm theForm = (UserDefinedQueryForm) form;\n\t\ttry {\n\t\t\tif (LIST.equalsIgnoreCase(action)) forward = listAdvanceBacth(mapping, theForm, request, response); // 打开复杂查询列表页面\n\t\t\telse if (\"LISTSIMPLE\".equalsIgnoreCase(action)) forward = listSimpleBacth(mapping, theForm, request, response); // 打开简单查询列表页面\n\t\t\telse if (\"SHOWQUERY\".equalsIgnoreCase(action)) forward = queryAdvance(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWSIMPLE\".equalsIgnoreCase(action)) forward = querySimple(mapping, theForm, request, response);\n\t\t\telse if (\"VALID\".equalsIgnoreCase(action)) forward = validate(mapping, theForm, request, response);\n\t\t\telse if (\"PREVIEWSQL\".equalsIgnoreCase(action)) forward = getSQLForPreview(mapping, theForm, request, response);\n\t\t\telse if (\"VALIDSIMPLE\".equalsIgnoreCase(action)) forward = validateSimple(mapping, theForm, request, response);\n\t\t\telse if (\"ADVANCEOVERVIEW\".equalsIgnoreCase(action)) forward = queryAdvanceOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SIMPLEOVERVIEW\".equalsIgnoreCase(action)) forward = querySimpleOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SAVERESULT\".equalsIgnoreCase(action)) forward = saveResult(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWEXPORTEXCEL\".equalsIgnoreCase(action)) forward = showExportExcel(mapping, theForm, request, response);\n\t\t\telse if (\"EXPORTEXCEL\".equalsIgnoreCase(action)) forward = exportExcel(mapping, theForm, request, response);\n\t\t\telse {\n\t\t\t\trequest.setAttribute(\"err\", new WebException(\"找不到该action方法:\" + action));\n\t\t\t\tforward = mapping.findForward(ERROR);// 找不到合适的action\n\t\t\t}\n\n\t\t\t// else if(\"SAVEPARAM\".equalsIgnoreCase(action))\n\t\t\t// forward=saveQueryParam(mapping, theForm, request, response);\n\t\t\t// //保存查询条件到个人空间\n\t\t}\n\t\tcatch (Exception e) {// 其他系统出错\n\t\t\trequest.setAttribute(\"err\", e);\n\t\t\tforward = mapping.findForward(ERROR);\n\t\t}\n\t\treturn forward;\n\t}", "public Formateur getFormateur(int indice) {\r\n\t\t\treturn formateurs.get(indice);\r\n\t}", "protected ActionForward unspecified(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n String message =\n messages.getMessage(\"mapping.parameter\", mapping.getPath());\n\n log.error(message);\n\n throw new ServletException(message);\n }", "public ActionForward execute(ActionMapping actionMapping,\r\n\t\t\tActionForm actionForm, HttpServletRequest httpServletRequest,\r\n\t\t\tHttpServletResponse httpServletResponse) {\n\t\tActionForward retorno = actionMapping\r\n\t\t\t\t.findForward(\"exibirGerarRelatorioRelacaoParcelamento\");\t\r\n\r\n\t\tFachada fachada = Fachada.getInstancia();\r\n\t\t\r\n\t\tGerarRelatorioRelacaoParcelamentoActionForm form = (GerarRelatorioRelacaoParcelamentoActionForm) actionForm;\r\n\t\t\r\n\t\tHttpSession sessao = httpServletRequest.getSession(false);\r\n\t\t\r\n\t\tif (form.getIdUnidadeOrganizacional() != null && !form.getIdUnidadeOrganizacional().equals(\"\")) {\r\n\t\t\t\r\n\t\t\tthis.pesquisarUnidadeOrganizacional(httpServletRequest, form);\r\n\t\t}else{\r\n\t\t\tform.setDescricaoUnidadeOrganizacional(\"\");\r\n\t\t}\r\n\t\t\r\n\t\t// Gerência Regional\r\n\t\tif(sessao.getAttribute(\"gerenciasRegionais\") == null){\r\n\t\t\tFiltroGerenciaRegional filtroGerenciaRegional = new FiltroGerenciaRegional();\r\n\t\t\tfiltroGerenciaRegional.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroGerenciaRegional.INDICADOR_USO,\r\n\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t\t\tCollection gerenciasRegionais = fachada.pesquisar(filtroGerenciaRegional,\r\n\t\t\t\t\tGerenciaRegional.class.getName());\r\n\t\t\t\r\n\t\t\tif (gerenciasRegionais == null || gerenciasRegionais.isEmpty()) {\r\n\t\t\t\tthrow new ActionServletException(\"atencao.naocadastrado\", null,\r\n\t\t\t\t\t\t\"Gerência Regional\");\r\n\t\t\t} else {\r\n\t\t\t\tsessao.setAttribute(\"gerenciasRegionais\", gerenciasRegionais);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Unidade de Negócio\r\n\t\tif(sessao.getAttribute(\"colecaoUnidadeNegocio\") == null){\r\n\t\t\tFiltroUnidadeNegocio filtroUnidadeNegocio = new FiltroUnidadeNegocio();\r\n\t\t\tfiltroUnidadeNegocio.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroUnidadeNegocio.INDICADOR_USO,\r\n\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\r\n\t\t\tCollection colecaoUnidadeNegocio = fachada.pesquisar(filtroUnidadeNegocio,\r\n\t\t\t\t\tUnidadeNegocio.class.getName());\r\n\t\t\t\r\n\t\t\tif (colecaoUnidadeNegocio == null || colecaoUnidadeNegocio.isEmpty()) {\r\n\t\t\t\tthrow new ActionServletException(\"atencao.naocadastrado\", null,\r\n\t\t\t\t\t\t\"Unidade de Negócio\");\r\n\t\t\t} else {\r\n\t\t\t\tsessao.setAttribute(\"colecaoUnidadeNegocio\", colecaoUnidadeNegocio);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(sessao.getAttribute(\"colecaoSituacaoParcelamento\") == null){\r\n\t\t //Pesquisando Situação do parcelamento\r\n\t\t FiltroParcelamentoSituacao filtroParcelamentoSituacao = new FiltroParcelamentoSituacao();\r\n\t \r\n\t\t Collection colecaoSituacaoParcelamento = \r\n\t\t\t fachada.pesquisar(filtroParcelamentoSituacao, \r\n\t \t\t\tParcelamentoSituacao.class.getName()); \r\n\t\t\r\n\t\t if (colecaoSituacaoParcelamento == null || colecaoSituacaoParcelamento.isEmpty()) {\r\n\t\t \tthrow new ActionServletException(\"atencao.entidade_sem_dados_para_selecao\",\r\n\t\t\t\t\tnull, \"Situação do Parcelamento\");\r\n\t\t }\r\n\t\t\r\n\t\t sessao.setAttribute(\"colecaoSituacaoParcelamento\",colecaoSituacaoParcelamento);\r\n\t\t}\r\n\t\t\r\n\t\t// Pesquisando local de instalação\r\n\t\tFiltroParcelamentoMotivoDesfazer filtroParcelamentoMotivoDesfazer = new FiltroParcelamentoMotivoDesfazer();\r\n\r\n\t\tCollection colecaoMotivoDesfazimento = fachada\r\n\t\t\t\t.pesquisar(filtroParcelamentoMotivoDesfazer,\r\n\t\t\t\t\t\tParcelamentoMotivoDesfazer.class.getName());\r\n\r\n\t\tif (colecaoMotivoDesfazimento == null || colecaoMotivoDesfazimento.isEmpty()) {\r\n\t\t\tthrow new ActionServletException(\r\n\t\t\t\t\t\"atencao.entidade_sem_dados_para_selecao\", null, \"Situação do Parcelamento\");\r\n\t\t}\r\n\r\n\t\thttpServletRequest.setAttribute(\"colecaoMotivoDesfazimento\", colecaoMotivoDesfazimento);\r\n\t\t\r\n\t\t\r\n\t\tif(httpServletRequest.getParameter(\"idSituacaoParcelamento\") != null){\r\n\t\t\tInteger idSituacaoParcelamento = new Integer(httpServletRequest.getParameter(\"idSituacaoParcelamento\"));\t\r\n\t\t\tif(idSituacaoParcelamento.equals(ParcelamentoSituacao.DESFEITO)){\r\n\t\t\t\thttpServletRequest.setAttribute(\"Desfeito\", \"sim\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tString idLocalidade = form.getIdLocalidade();\r\n\t\t\r\n\t\tif (idLocalidade != null && !idLocalidade.trim().equals(\"\")) {\r\n\t\t\tFiltroLocalidade filtroLocalidade = new FiltroLocalidade();\r\n\t\t\tfiltroLocalidade.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroLocalidade.ID, idLocalidade));\r\n\r\n\t\t\tCollection colecaoLocalidade = fachada.pesquisar(\r\n\t\t\t\t\tfiltroLocalidade, Localidade.class.getName());\r\n\r\n\t\t\tif (colecaoLocalidade != null && !colecaoLocalidade.isEmpty()) {\r\n\t\t\t\tLocalidade localidade = (Localidade) colecaoLocalidade\r\n\t\t\t\t\t\t.iterator().next();\r\n\r\n\t\t\t\tform.setIdLocalidade(idLocalidade);\r\n\t\t\t\tform.setDescricaoLocalidade(localidade.getDescricao());\r\n\r\n\t\t\t} else {\r\n\t\t\t\tform.setIdLocalidade(\"\");\r\n\t\t\t\tform.setDescricaoLocalidade(\"LOCALIDADE INEXISTENTE\");\r\n\t\t\t\thttpServletRequest.setAttribute(\"localidadeInexistente\",\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tform.setDescricaoLocalidade(\"\");\r\n\t\t}\r\n\t\t\r\n\t\tString codigoSetorComercial = form.getIdSetorComercial();\r\n\t\t\r\n\t\tif (codigoSetorComercial != null && !codigoSetorComercial.trim().equals(\"\")) {\r\n\t\t\tFiltroSetorComercial filtroSetorComercial = new FiltroSetorComercial();\r\n\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroSetorComercial.ID_LOCALIDADE, idLocalidade));\r\n\t\t\t\r\n\t\t\tfiltroSetorComercial.adicionarParametro(new ParametroSimples(\r\n\t\t\t\t\tFiltroSetorComercial.CODIGO_SETOR_COMERCIAL, codigoSetorComercial));\r\n\r\n\t\t\tCollection colecaosetoComercial = fachada.pesquisar(\r\n\t\t\t\t\tfiltroSetorComercial, SetorComercial.class.getName());\r\n\r\n\t\t\tif (colecaosetoComercial != null && !colecaosetoComercial.isEmpty()) {\r\n\t\t\t\tSetorComercial setorComercial = (SetorComercial) colecaosetoComercial\r\n\t\t\t\t\t\t.iterator().next();\r\n\r\n\t\t\t\tform.setIdSetorComercial(codigoSetorComercial);\r\n\t\t\t\tform.setDescricaoSetorComercial(setorComercial.getDescricao());\r\n\r\n\t\t\t} else {\r\n\t\t\t\tform.setIdSetorComercial(\"\");\r\n\t\t\t\tform.setDescricaoSetorComercial(\"SETOR COMERCIAL INEXISTENTE\");\r\n\t\t\t\thttpServletRequest.setAttribute(\"setorComercialInexistente\",true);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tform.setDescricaoSetorComercial(\"\");\r\n\t\t}\r\n \r\n\t\t\r\n\t\tthis.pesquisarPerfilImovel(httpServletRequest);\r\n\t\t/*\r\n\t\t * Felipe Santos\r\n\t\t * \r\n\t\t * Não há nenhuma localidade associada a um municipio (muni_idprincipal != null)\r\n\t\t */\r\n//\t\tthis.pesquisarMunicipioAssociado(httpServletRequest);\r\n\t\t\r\n\t\tif(httpServletRequest.getParameter(\"pesqperfilImoveluisarUsuarioResponsavel\")!=null\r\n\t\t\t\t&& httpServletRequest.getParameter(\"pesquisarUsuarioResponsavel\").toString().equalsIgnoreCase(\"SIM\")\r\n\t\t\t\t&& form.getIdUsuarioResponsavel()!=null \r\n\t\t\t\t&& !form.getIdUsuarioResponsavel().equals(\"\")){\r\n\t\t\t\r\n\t\t\tFiltroUsuario filtro = new FiltroUsuario();\r\n\t\t\t\r\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroUsuario.ID, form.getIdUsuarioResponsavel()));\r\n\t\t\t\r\n\t\t\tCollection<Usuario> colecaoUsuariosResponsaveis = fachada.pesquisar(filtro, Usuario.class.getName());\r\n\t\t\t\r\n\t\t\tif(colecaoUsuariosResponsaveis!=null && !colecaoUsuariosResponsaveis.isEmpty()){\r\n\t\t\t\tUsuario usuarioResponsavel = colecaoUsuariosResponsaveis.iterator().next();\r\n\t\t\t\t\r\n\t\t\t\tform.setIdUsuarioResponsavel(usuarioResponsavel.getId().toString());\r\n\t\t\t\tform.setDescricaoUsuarioResponsavel(usuarioResponsavel.getNomeUsuario());\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tform.setIdUsuarioResponsavel(\"\");\r\n\t\t\t\tform.setDescricaoUsuarioResponsavel(\"USUARIO INEXISTENTE\");\r\n\t\t\t\thttpServletRequest.setAttribute(\"usuarioResponsavelInexistente\",true);\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif(httpServletRequest.getParameter(\"pesquisarUsuarioConfirmacao\")!=null\r\n\t\t\t\t&& httpServletRequest.getParameter(\"pesquisarUsuarioConfirmacao\").toString().equalsIgnoreCase(\"SIM\")\r\n\t\t\t\t&& form.getIdUsuarioConfirmacao()!=null \r\n\t\t\t\t&& !form.getIdUsuarioConfirmacao().equals(\"\")){\r\n\t\t\t\r\n\t\t\tFiltroUsuario filtro = new FiltroUsuario();\r\n\t\t\t\r\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroUsuario.ID, form.getIdUsuarioConfirmacao()));\r\n\t\t\t\r\n\t\t\tCollection<Usuario> colecaoUsuariosConfirmacao = fachada.pesquisar(filtro, Usuario.class.getName());\r\n\t\t\t\r\n\t\t\tif(colecaoUsuariosConfirmacao!=null && !colecaoUsuariosConfirmacao.isEmpty()){\r\n\t\t\t\tUsuario usuarioConfirmacao = colecaoUsuariosConfirmacao.iterator().next();\r\n\t\t\t\t\r\n\t\t\t\tform.setIdUsuarioConfirmacao(usuarioConfirmacao.getId().toString());\r\n\t\t\t\tform.setDescricaoUsuarioConfirmacao(usuarioConfirmacao.getNomeUsuario());\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tform.setIdUsuarioConfirmacao(\"\");\r\n\t\t\t\tform.setDescricaoUsuarioConfirmacao(\"USUARIO INEXISTENTE\");\r\n\t\t\t\thttpServletRequest.setAttribute(\"usuarioConfirmacaoInexistente\",true);\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(form.getIndicadorConfirmacaoOperadora()==null){\r\n\t\t\tform.setIndicadorConfirmacaoOperadora(\"2\");\r\n\t\t}\r\n\t\t\r\n return retorno;\r\n \r\n\t}", "public Method getActionFactory() {\n return this.actionFactory;\n }", "@RequestMapping(value=\"/room/form\", method=RequestMethod.GET)\r\n\tpublic String getRoomForm(Model model) {\r\n\t\tmodel.addAttribute(\"room\", new Room());\r\n\t\treturn \"roomForm\";\r\n\t}", "public ActionForward execute(\r\n\t\t\tActionMapping mapping,\r\n\t\t\tActionForm form,\r\n\t\t\tHttpServletRequest request,\r\n\t\t\tHttpServletResponse response) {\r\n\t\t\r\n\t\tTreeFilterFragmentForm treeFilterForm = (TreeFilterFragmentForm) form;\r\n\t\tMenuHandler menu = new MenuHandler();\r\n\t\t\r\n\t\ttry {\r\n\t\t\ttreeFilterForm.setMenuDesc(\r\n\t\t\t\tmenu.getChildElements(\r\n\t\t\t\t\ttreeFilterForm.getParentStr(),\r\n\t\t\t\t\ttreeFilterForm.getOffset(),\r\n\t\t\t\t\ttreeFilterForm.getBooleanDirection(),\r\n\t\t\t\t\ttreeFilterForm.getQuery(),\r\n\t\t\t\t\ttreeFilterForm.getTitle(),\r\n\t\t\t\t\ttreeFilterForm.isSyncronized()\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tlog.info(\"MenuDesc: \" + treeFilterForm.getMenuDesc());\r\n\r\n } catch (IOException e){\r\n System.out.println(e);\r\n } catch (ParseException e) {\r\n System.out.println(e);\r\n }\r\n return mapping.getInputForward();\r\n }", "@RequestMapping(value = \"getinput.htm\")\n public ModelAndView getInput() {\n ModelAndView modelAndView = new ModelAndView();\n modelAndView.addObject(\"inputentity\", new InputFormBean());\n return modelAndView;\n }", "@Override\n public void doInit() {\n action = (String) getRequestAttributes().get(\"action\");\n }", "public abstract String toFORMParam();", "public Form getPresentationForm() throws ProcessManagerException {\r\n try {\r\n Form form = getPresentationForm(\"presentationForm\");\r\n if (form != null)\r\n return form;\r\n \r\n XmlForm xmlForm = new XmlForm(processModel.getDataFolder()\r\n .toRecordTemplate(currentRole, getLanguage(), true));\r\n xmlForm.setTitle(getString(\"processManager.folder\"));\r\n return xmlForm;\r\n } catch (FormException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.PRESENTATION_FORM_UNAVAILABLE\", e);\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.PRESENTATION_FORM_UNAVAILABLE\", e);\r\n }\r\n }", "public PDAction getPO() {\n/* 247 */ COSDictionary po = (COSDictionary)this.actions.getDictionaryObject(\"PO\");\n/* 248 */ PDAction retval = null;\n/* 249 */ if (po != null)\n/* */ {\n/* 251 */ retval = PDActionFactory.createAction(po);\n/* */ }\n/* 253 */ return retval;\n/* */ }", "public String getAction() {\n\t\treturn action.get();\n\t}", "default T forms(Map<String, String> map) {\n return body(new FormHttpBody(map.entrySet()));\n }", "private String getAnchorAttrs(FacesContext context, String clientId,\n int action) {\n int currentPage = 1;\n //int formNumber = getFormNumber(context);\n Integer curPage = (Integer) getAttributes().get(\"currentPage\");\n if (curPage != null) {\n currentPage = curPage;\n }\n String formId = getFormId(context);\n if (formId == null){\n return\n (\"href=\\\"javascript:void(0);document.forms[0]['\" + clientId +\n \"_action'].value='\" +\n action +\n \"'; \" +\n \"document.forms[0]['\" + clientId +\n \"_curPage'].value='\" +\n currentPage +\n \"'; \" +\n \"document.forms[0].submit()\\\"\");\n } else {\n return\n (\"href=\\\"javascript:void(0);document.forms['\" + formId + \"']['\" + clientId +\n \"_action'].value='\" +\n action +\n \"'; \" +\n \"document.forms['\" + formId + \"']['\" + clientId +\n \"_curPage'].value='\" +\n currentPage +\n \"'; \" +\n \"document.forms['\" + formId + \"'].submit()\\\"\");\n }\n }", "String getForm(String path, Descriptor desc) {\n return new ScriptBuilder()\n .l(\"getForm(paste(ifelse(is.null(server),%s.server(),server), '%s', sep=''), %s)\", \n moduleAnnot.name(), path, getGetFormParamList(desc))\n .toString();\n }", "protected IModel<T> getFormModel() {\n return formModel;\n }", "public ActionForward multiUse(ActionMapping mapping, ActionForm form,\n \t\t\tHttpServletRequest request, HttpServletResponse response)\n \tthrows Exception {\n \t\t\n \t\treturn mapping.findForward(\"backToGeneExp\");\n }" ]
[ "0.63137585", "0.6294548", "0.56872606", "0.55767775", "0.55570334", "0.55088705", "0.54918164", "0.54394513", "0.5422447", "0.54090625", "0.5400075", "0.5397334", "0.5356723", "0.5276346", "0.51670873", "0.5129098", "0.5127162", "0.50624007", "0.5057054", "0.5055812", "0.5042313", "0.5037955", "0.50304765", "0.5011285", "0.4998421", "0.49753425", "0.4935548", "0.4935548", "0.49123716", "0.48864305", "0.48451117", "0.484459", "0.4843593", "0.48241824", "0.4786472", "0.4765513", "0.47647998", "0.47635806", "0.47520718", "0.47309858", "0.47265786", "0.4723115", "0.46983877", "0.46972868", "0.4695666", "0.4678144", "0.46698636", "0.46563578", "0.4656082", "0.46513572", "0.464814", "0.4628875", "0.46222794", "0.46170458", "0.4614814", "0.46002737", "0.45899662", "0.45881334", "0.4580321", "0.45784104", "0.45767882", "0.45700458", "0.45635736", "0.45491466", "0.4539343", "0.45329148", "0.45312583", "0.45309183", "0.45294306", "0.45215508", "0.45161185", "0.4509561", "0.45090175", "0.45077345", "0.45066836", "0.44967246", "0.4489503", "0.4486792", "0.44865543", "0.4480338", "0.4475092", "0.44699517", "0.44616637", "0.44396234", "0.44363967", "0.4432882", "0.44316757", "0.4426413", "0.44257936", "0.442019", "0.44191572", "0.4417819", "0.44100505", "0.4406182", "0.44061658", "0.44048592", "0.43991643", "0.43914652", "0.4390899", "0.43905944" ]
0.67042726
0
Convenience method to get the userForm from the session
protected User getUser(HttpSession session) { // get the user form from the session return (User) session.getAttribute(Constants.USER_KEY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form getForm() {\n return form;\n }", "protected final Form getForm() {\n\t\treturn itsForm;\n\t}", "public Form getUserSettingsForm() throws ProcessManagerException {\r\n try {\r\n com.silverpeas.workflow.api.model.DataFolder userInfos = processModel\r\n .getUserInfos();\r\n if (userInfos == null)\r\n return null;\r\n \r\n return new XmlForm(userInfos.toRecordTemplate(currentRole, getLanguage(),\r\n false));\r\n } catch (FormException we) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_USERSETTINGS_FORM\", we);\r\n } catch (WorkflowException fe) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_USERSETTINGS_FORM\", fe);\r\n }\r\n }", "@Override\n\tpublic PageForm formBackingObject(HttpServletRequest request) throws Exception { \n\n \tHttpSession session = request.getSession();\n \tPageForm theForm = (PageForm) super.formBackingObject(request);\n setPageMessage(session, theForm);\n return theForm;\n }", "UserEditForm getEditForm(User user);", "public UsuarioForm getFormulario() {\n\n\t\treturn this.formulario;\n\t}", "public String getForm() {\r\n\t\treturn form;\r\n\t}", "public Form readForm(String formKey);", "IFormView getFormView();", "protected UIForm getForm(FacesContext context) {\n UIComponent parent = this.getParent();\n while (parent != null) {\n if (parent instanceof UIForm) {\n break;\n }\n parent = parent.getParent();\n }\n return (UIForm) parent;\n }", "public Form getCurrentForm() {\n return currentForm;\n }", "public <T> T getFromSession(FromSession fromSession, Class<T> clazz) {\n return aweSessionObjectFactory.getObject().getParameter(clazz, fromSession.name());\n }", "public Form getPresentationForm(String name) throws ProcessManagerException {\r\n try {\r\n return processModel.getPresentationForm(name, currentRole, getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.UNKNOWN_ACTION\", e);\r\n }\r\n }", "protected IManagedForm getForm(){\r\n\t\treturn _mForm;\r\n\t}", "public User getSession(){\n\t\treturn this.session;\n\t}", "@ModelAttribute(\"loginForm\")\n public LoginForm getCommandObject() {\n log.debug(\"getCommandObject.START\");\n LoginForm formBean = new LoginForm();\n formBean.setUsername(\"TRUONGMH\");\n return formBean;\n }", "public Form getForm() {\n if (form == null) {//GEN-END:|14-getter|0|14-preInit\n // write pre-init user code here\n form = new Form(\"Form\", new Item[] { getStringItem() });//GEN-BEGIN:|14-getter|1|14-postInit\n form.addCommand(getExitCommand());\n form.setCommandListener(this);//GEN-END:|14-getter|1|14-postInit\n // write post-init user code here\n }//GEN-BEGIN:|14-getter|2|\n return form;\n }", "@Override\n\t\tpublic FormTestFacade getForm() {\n\t\t\treturn null;\n\t\t}", "@Override\n\t\tpublic FormTestFacade getForm() {\n\t\t\treturn null;\n\t\t}", "public Form getLoginForm() {\n if (LoginForm == null) {//GEN-END:|14-getter|0|14-preInit\n // write pre-init user code here\n LoginForm = new Form(\"Welcome\", new Item[]{getTextField()});//GEN-BEGIN:|14-getter|1|14-postInit\n LoginForm.addCommand(getExitCommand());\n LoginForm.addCommand(getOkCommand());\n LoginForm.setCommandListener(this);//GEN-END:|14-getter|1|14-postInit\n // write post-init user code here\n }//GEN-BEGIN:|14-getter|2|\n return LoginForm;\n }", "public ResourcesMetadata getForm()\n\t\t{\n\t\t\treturn m_form;\n\t\t}", "public final ScForm findFormWrapper()\n {\n if ( isForm() )\n return asForm();\n\n if ( hasParent() )\n return getParent().findFormWrapper();\n\n return null;\n }", "public MainForm getMainForm(){\n\t\treturn this.mainForm;\n\t}", "private JTextField getLocalUser() {\n if (localUser == null) {\n localUser = new JTextField();\n }\n return localUser;\n }", "protected ActionForm getActionForm(ActionMapping mapping,\r\n\t\t\tHttpServletRequest request) {\r\n\t\tActionForm actionForm = null;\r\n\r\n\t\t// Remove the obsolete form bean\r\n\t\tif (mapping.getAttribute() != null) {\r\n\t\t\tif (\"request\".equals(mapping.getScope())) {\r\n\t\t\t\tactionForm = (ActionForm) request.getAttribute(mapping\r\n\t\t\t\t\t\t.getAttribute());\r\n\t\t\t} else {\r\n\t\t\t\tHttpSession session = request.getSession();\r\n\r\n\t\t\t\tactionForm = (ActionForm) session.getAttribute(mapping\r\n\t\t\t\t\t\t.getAttribute());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn actionForm;\r\n\t}", "protected abstract SESSION getThisAsSession();", "@Override\n\tpublic UtenteBase getSessionUser() {\n\t\tUtenteBase user = (UtenteBase) getThreadLocalRequest().getSession().getAttribute(\"user\");\n\t\treturn user;\n\t}", "public Form getForm() throws IOException {\n if(form == null) {\n form = builder.getInstance();\n }\n return form;\n }", "@JSProperty\n @Nullable\n HTMLFormElement getForm();", "protected ActionForm processActionForm(HttpServletRequest request,\n HttpServletResponse response,\n ActionMapping mapping)\n {\n String scope = mapping.getScope();\n if(scope != null)\n {\n try\n {\n if(scope.equals(\"session\"))\n {\n OperationContext opCon = OperationContext.getOperationContext(request);\n if(opCon != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Looking for ActionForm in OperationContext[id=\" + opCon.getOperationContextId() + \"]\"); //20030124AH\n }\n ActionForm form = opCon.getActionForm();\n if(form != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Found ActionForm in OperationContext\"); //20030124AH\n }\n return form;\n }\n else\n {\n if(_log.isWarnEnabled())\n {\n _log.warn(\"No ActionForm found in OperationContext\"); //20030124AH\n }\n return null; //20030124AH\n }\n }\n }\n }\n catch(OperationException e)\n {\n // OperationExceptions here are normal when we forward from a completed operation\n // to the next action, so we ignore them.\n }\n catch(Throwable t)\n {\n if(_log.isErrorEnabled())\n {\n _log.error(\"Error caught in processActionForm() performing customised ActionForm handling\", t); //20030124AH\n }\n }\n }\n\n if(mapping instanceof GTActionMapping)\n { //20030124AH - Check the mapping to see if we should defer form creation or do it as normal\n if( ((GTActionMapping)mapping).isDeferFormCreation() )\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Deferring ActionForm creation\");\n }\n return null;\n }\n }\n //...\n if(_log.isInfoEnabled())\n {\n _log.info(\"Delegating to superclass to obtain ActionForm\"); //20030124AH\n }\n ActionForm form = super.processActionForm(request, response, mapping);\n return form;\n }", "public XhtmlForm getForm(Element el) {\n\t\tReplacedElementFactory ref = getSharedContext().getReplacedElementFactory();\n\t\tif (ref != null && ref instanceof XHTMLReplacedElementFactoryImpl) {\n\t\t\treturn ((XHTMLReplacedElementFactoryImpl) ref).getForm(el);\n\t\t}\n\t\treturn null;\n\t}", "public Form getPresentationForm() throws ProcessManagerException {\r\n try {\r\n Form form = getPresentationForm(\"presentationForm\");\r\n if (form != null)\r\n return form;\r\n \r\n XmlForm xmlForm = new XmlForm(processModel.getDataFolder()\r\n .toRecordTemplate(currentRole, getLanguage(), true));\r\n xmlForm.setTitle(getString(\"processManager.folder\"));\r\n return xmlForm;\r\n } catch (FormException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.PRESENTATION_FORM_UNAVAILABLE\", e);\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.PRESENTATION_FORM_UNAVAILABLE\", e);\r\n }\r\n }", "private JTextField getJTextFieldUser() {\r\n\t\tif (jTextFieldUser == null) {\r\n\t\t\tjTextFieldUser = new JTextField();\r\n\t\t\tjTextFieldUser.setBounds(new Rectangle(90, 50, 92, 23));\r\n\t\t}\r\n\t\treturn jTextFieldUser;\r\n\t}", "private void readForm() {\n }", "public ManagedBeanSession() {\r\n this.facesContext = FacesContext.getCurrentInstance();\r\n this.httpServletRequest = (HttpServletRequest) this.facesContext.getExternalContext().getRequest();\r\n if (this.httpServletRequest.getSession().getAttribute(\"sessionUsuario\") != null) {\r\n this.usuario = this.httpServletRequest.getSession().getAttribute(\"sessionUsuario\").toString();\r\n }\r\n }", "public static JPanel getFormsPanelInstance(){\n return formsPanel;\n }", "Session getCurrentSession();", "Session getCurrentSession();", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n if (sessionBuilder_ == null) {\n return session_;\n } else {\n return sessionBuilder_.getMessage();\n }\n }", "public Form getStepForm(int index) throws ProcessManagerException {\r\n HistoryStep[] steps = currentProcessInstance.getHistorySteps();\r\n \r\n if (0 <= index && index < steps.length) {\r\n try {\r\n if (steps[index].getAction().equals(\"#question#\")\r\n || steps[index].getAction().equals(\"#response#\")) {\r\n return getQuestionForm(true);\r\n } else\r\n return processModel.getPresentationForm(steps[index].getAction(),\r\n currentRole, getLanguage());\r\n } catch (WorkflowException e) {\r\n SilverTrace.info(\"processManager\", \"sessionController\",\r\n \"processManager.ILL_DATA_STEP\", e);\r\n \r\n return null;\r\n }\r\n } else\r\n return null;\r\n }", "public boolean isForm();", "User getBySession(String session);", "public static String getScopedForm(AjaxGroup aGroup, AjaxElement aElement,\n AjaxEvent aEvent) {\n\n String form = aGroup.getForm();\n if (aElement.getForm() != null) {\n form = aElement.getForm();\n }\n if (aEvent.getForm() != null) {\n form = aEvent.getForm();\n }\n return form;\n\n }", "public Form getViewForm() throws PublicationTemplateException;", "public Form getPrintForm(HttpServletRequest request)\r\n throws ProcessManagerException {\r\n try {\r\n com.silverpeas.workflow.api.model.Form form = processModel\r\n .getForm(\"printForm\");\r\n if (form == null) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.NO_PRINTFORM_DEFINED_IN_MODEL\");\r\n }\r\n \r\n else {\r\n HtmlForm htmlForm = new HtmlForm(processModel.getDataFolder()\r\n .toRecordTemplate(currentRole, getLanguage(), true));\r\n \r\n htmlForm.setFileName(form.getHTMLFileName());\r\n return htmlForm;\r\n }\r\n } catch (Exception e) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.EX_GET_PRINT_FORM\", e);\r\n }\r\n }", "public String getInputFormView() {\n\t\treturn inputFormView;\n\t}", "@RequestMapping(value = \"/session_form.htm\",method = RequestMethod.GET)\r\n\tpublic String sessionForm(ModelMap map,HttpSession session,HttpServletResponse response) throws IOException {\r\n\t\tUserController.protectRoute(session,response);\r\n\t\t\r\n\t\treturn \"home\";\r\n\t}", "public PSUserSession getSession();", "public String getSession() {\n return this.session;\n }", "protected Session getSession() { return session; }", "protected Object formBackingObject( HttpServletRequest request ) throws Exception\n {\n log.info( \"formBackingObject start.\" );\n\n ApplicationProperties appProps = PropertyManager.getApplicationProperties();\n\n LoginForm form = new LoginForm();\n\n if (null == localModel)\n {\n // Session timeout??\n throw new FinanceException( \"Model is null.\" );\n }\n\n// UserTO user = localModel.getUser();\n//\n// if (null == user)\n// {\n// throw new FinanceException( \"User is null.\" );\n// }\n\n\n String userId = localModel.getToLoginAs();\n if (null == userId || \"\".equalsIgnoreCase( userId ))\n {\n //Try and get userid form request params\n userId = request.getParameter( \"id\" );\n }\n\n\n form.setUsername( userId );\n\n form.setLoginURL( appProps.getNewUserPostLoginUrl() );\n\n // get the O2LoginPageUrl. It will be of the format -\n // https://bluedawn.ref.o2.co.uk/login?sendTo=http://dave.o2.co.uk:8080/finance/accountChangeLoginCheck.do\n // We need the sendTo URL in the above value. This will be our return value\n // or\n // if you are using in-memory facade the O2LoginPageUrl value is\n // http://localhost:8080/finance/mocklogin.do?skipreset=true\n // In this case, do nothing \n String rURL = appProps.getO2LoginPageUrl();\n if ( rURL.indexOf( \"mocklogin.do\" ) == -1 )\n {\n \trURL = rURL.substring( ( rURL ).indexOf( \"sendTo\" ) + 7 );\n } \n \n form.setReturnURL( rURL );\n form.setFailureURL( rURL );\n\n\n log.info( \"formBackingObject ends.\" );\n\n return form;\n }", "AuthenticationSessionModel getAuthenticationSession();", "String getAssociatedSession();", "public Session getSessionInFocus()\r\n\t{\r\n\t\treturn sessionInFocus;\r\n\t}", "public AppForm getAppFormById(String id) {\n return (AppForm)super.doFindObjectById(id);\r\n }", "public ConfigurationForm getConfigForm()\n {\n return configForm;\n }", "@RequestMapping(\"/editUsr\")\r\n\tpublic ModelAndView editUsr(@ModelAttribute(\"UserEditForm\") final UserEditForm form) {\r\n\t\tModelAndView mav = new ModelAndView(\"users/edit\");\r\n\t\t// GET ACTUAL SESSION USER\r\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n\t\tUser user = us.findUserSessionByUsername(principal);\r\n\t\tmav.addObject(\"user\", user);\r\n\t\treturn mav;\r\n\t}", "public GrievFormImpl getGrievForm1() {\n return (GrievFormImpl) findViewObject(\"GrievForm1\");\n }", "public static LoginFormProtoType getInstance() {\r\n return loginFormProtoTypeInstance;\r\n }", "public JTextField gettxtUsuario() {\n return txtUsuario;\n }", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n if (sessionBuilder_ != null) {\n return sessionBuilder_.getMessageOrBuilder();\n } else {\n return session_;\n }\n }", "@RequestMapping(value=\"/settings/account\", method=RequestMethod.GET)\n\tpublic String showForm(Model model, HttpServletRequest request, HttpServletResponse response) {\n\t\tString users_id = SessionHandler.sessionExists(request, response);\n\t\tif (users_id == null)\n\t\t\treturn \"login\";\n\t\t\n\t\tUserModel user = UserModel.selectUser(users_id);\t\t\n\t\tmodel.addAllAttributes(user.getUser());\t\t\n\t\treturn \"settingsaccount\";\n\t\t\n\t}", "@RequestMapping(value=\"get_current_user.do\",method= RequestMethod.POST)\r\n @ResponseBody\r\n public ServerResponse<User> getCurrentUser(HttpSession session){\r\n User user = (User) session.getAttribute(Constant.CURRENT_USER);\r\n if(user != null){\r\n return ServerResponse.createBySuccessData(user);\r\n }\r\n return ServerResponse.createByErrorMsg(\"User has not logged in.\");\r\n }", "@RequestMapping(value = \"form\", method = RequestMethod.GET)\n public String form() {\n return \"user_form\";\n }", "public MainPage submitForm() {\n LOGGER.info(\"Clicked the button 'LOGIN'\");\n clickOnElement(loginButtonLocator);\n return MainPage.Instance;\n }", "public Form getUpdateForm() throws PublicationTemplateException;", "@Override\n\tpublic FormContainer getFormContainer() {\n\t\treturn null;\n\t}", "java.lang.String getFormId();", "public Form getCreationForm() throws ProcessManagerException {\r\n try {\r\n Action creation = processModel.getCreateAction();\r\n return processModel.getPublicationForm(creation.getName(), currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_NO_CREATION_FORM\", e);\r\n }\r\n }", "FORM createFORM();", "public Form getActionForm(String stateName, String actionName)\r\n throws ProcessManagerException {\r\n try {\r\n return processModel.getPublicationForm(actionName, currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.UNKNOWN_ACTION\", e);\r\n }\r\n }", "@RequestMapping(value = \"/form\", method = RequestMethod.GET)\n public String getLogin(Model model, HttpSession session)\n {\n RootContextConfig.message.info(\"\\n\\nUrl: /formn\\n\\n\");\n model.addAttribute(\"loginDto\", new LoginDto());\n return \"login/session\";\n }", "javax.swing.JFrame getuservxod(){\n return uservxod;\n }", "public static HttpSession getSession(Boolean session) {\r\n\t\treturn (HttpSession) FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getSession(false);\r\n\t}", "protected Object getValFromSession(HttpSession session, String key) {\n if (session == null) {\n return null;\n }\n return session.getAttribute(key);\n }", "java.lang.String getFormName();", "public NoteForm getOneAsForm(Integer id);", "public Session getSession() { return session; }", "public Form getAssignForm() throws ProcessManagerException {\r\n try {\r\n return new XmlForm(getAssignTemplate());\r\n } catch (FormException ex) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_ASSIGN_FORM\", ex);\r\n }\r\n }", "public UserTicket getUserTicket() {\n return FxJsfUtils.getRequest().getUserTicket();\n }", "public String getSession() {\n return session;\n }", "public JTextField getTextFieldUser() {\r\n\t\treturn textFieldUser;\r\n\t}", "public static KmUserMstr getUserDetails(HttpServletRequest request)\r\n\t{\r\n\t\tKmUserMstr userBean = new KmUserMstr();\r\n\t\tif(request.getSession().getAttribute(\"USER_INFO\")!=null)\r\n\t\t{\r\n\t\t\tuserBean = (KmUserMstr)request.getSession().getAttribute(\"USER_INFO\");\r\n\t\t}\r\n\t\treturn userBean;\r\n\t}", "@RequestMapping( method = RequestMethod.GET )\n\tpublic String showUserForm( ModelMap model, HttpServletRequest request ) {\n\t\tUsuario usuario = new Usuario();\n\t\tmodel.addAttribute( \"usuario\", usuario );\n\t\treturn \"Formulario\";\n\t}", "public synchronized FormDAO getFormDAO() {\n\t\treturn new FormDAO(this);\n\t}", "@SuppressWarnings(\"unchecked\")\n protected <T> T getValFromSession(HttpSession session, String key, Class<T> clsT) {\n if (session == null) {\n return null;\n }\n return (T) session.getAttribute(key);\n }", "public Formateur getFormateur(int indice) {\r\n\t\t\treturn formateurs.get(indice);\r\n\t}", "public Object getObjFromSession(String key)\n\t{\n\t\treturn context.getSession().get(key);\n\t}", "protected IModel<T> getFormModel() {\n return formModel;\n }", "public String getValidationForm() throws InterruptedException\n\t{\n\t\t//Thread.sleep(500);\n\t\twaitForVisibility(validationForm);\n\t\treturn validationForm.getText();\n\t}", "public Session getSession();", "protected SessionBean1 getSessionBean1() {\n return (SessionBean1) getBean(\"SessionBean1\");\n }", "public Form getSearchForm() throws PublicationTemplateException;", "public void getFullForm(SecurityUserBaseinfoForm form,\r\n\t\t\tSecurityUserBaseinfo data) {\n\t\tthis.setForm(form, data);\r\n\t\tthis.getDetail(form);\r\n\t}", "private RTextField getLicenseSessionTextField() {\n if (licenseSessionTextField == null) {\n licenseSessionTextField = new RTextField();\n licenseSessionTextField.setText(\"\");\n licenseSessionTextField.setEditable(false);\n licenseSessionTextField.setName(\"licenseSessionTextField\");\n }\n return licenseSessionTextField;\n }", "public static Session getSession() {\n return session;\n }", "protected String getFormId(FacesContext context) {\n UIComponent lookingForForm = this; \n while (lookingForForm != null) {\n if (lookingForForm instanceof UIForm){\n return lookingForForm.getClientId(context);\n }\n lookingForForm = lookingForForm.getParent(); \n }\n return null;\n }", "Session getSession();", "Session getSession();", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}" ]
[ "0.6655739", "0.6632461", "0.64208823", "0.6280088", "0.62575984", "0.6201525", "0.6192524", "0.6178992", "0.6145784", "0.6073698", "0.60469407", "0.59908193", "0.595143", "0.5932412", "0.5794259", "0.5774676", "0.57561475", "0.5747704", "0.5747704", "0.56968266", "0.5688858", "0.5651539", "0.5629126", "0.5627081", "0.5603237", "0.559916", "0.5595212", "0.5590364", "0.5588921", "0.5583538", "0.5554309", "0.5551726", "0.5536138", "0.5505079", "0.549722", "0.54939693", "0.54625857", "0.54625857", "0.5444912", "0.54396", "0.5429474", "0.5405124", "0.5401761", "0.5399161", "0.53965235", "0.5380966", "0.5380484", "0.53757143", "0.536643", "0.5353792", "0.535239", "0.5325687", "0.53227955", "0.5317636", "0.53167653", "0.5316426", "0.530093", "0.5297832", "0.5295552", "0.52890414", "0.5274041", "0.52701044", "0.5264796", "0.5256513", "0.5256416", "0.52482647", "0.5243104", "0.5211723", "0.5210105", "0.52088094", "0.5207579", "0.52038294", "0.52032965", "0.5198221", "0.51938564", "0.5183758", "0.517725", "0.5176348", "0.5174142", "0.5172963", "0.51646215", "0.51636463", "0.5157706", "0.515547", "0.51527184", "0.5146765", "0.514584", "0.5122482", "0.5113904", "0.51084024", "0.5091646", "0.50873363", "0.5084749", "0.50770247", "0.5058516", "0.50563306", "0.50515604", "0.5035713", "0.5035713", "0.5032622" ]
0.6351533
3
Convenience method to get the Configuration HashMap from the servlet context.
public Map getConfiguration() { Map config = (HashMap) getServlet().getServletContext().getAttribute( Constants.CONFIG); // so unit tests don't puke when nothing's been set if (config == null) { return new HashMap(); } return config; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tfinal public ServletConfig getServletConfig() {\n\n\t\treturn config;\n\n\t}", "public static Configuration getInstance(ServletContext ctx) {\r\n\t\tConfiguration config = null;\r\n config = (Configuration) ctx.getAttribute(KEY);\r\n \r\n if (config == null)\r\n {\r\n ctx.log(\"No Configuration for this context. Initializing.\");\r\n config = new Configuration(ctx);\r\n ctx.setAttribute(KEY, config);\r\n }\r\n\r\n\t\treturn config;\r\n\t}", "@Override\n\tpublic ServletConfig getServletConfig() {\n\t\treturn config;\n\t}", "@Override\n public ServletConfig getServletConfig() {\n logger.log(Level.INFO, \"getServletConfig() Invoked\");\n return super.getServletConfig();\n }", "public ServletConfig getServletConfig() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic ServletConfig getServletConfig() {\n\t\treturn super.getServletConfig();\n\t}", "@Override\n\tpublic ServletConfig getServletConfig() {\n\t\treturn super.getServletConfig();\n\t}", "protected final Dictionary<String, ?> getSiteConfiguration() {\n return config;\n }", "public ServletConfig getServletConfig() {\n\t\treturn null;\n\t}", "static Properties getConfig(final ServletContext context) {\n \n /* Validate parameters */\n if (context == null) { throw new IllegalArgumentException(\"context must be a non-empty string\"); }\n \n final Properties config;\n \n /* Validate config */\n try {\n config = (Properties) context.getAttribute(\"no.feide.moria.web.config\");\n } catch (ClassCastException e) {\n throw new IllegalStateException(\"Config is not correctly set in context. Not a java.util.Properties object.\");\n }\n \n if (config == null) { throw new IllegalStateException(\"Config is not set in context.\"); }\n \n return config;\n }", "@Override\r\n\tpublic ServletConfig getServletConfig() {\n\t\treturn null;\r\n\t}", "public static Configuration getConfiguration() {\r\n\t\treturn config;\r\n\t}", "protected Configuration(ServletContext ctx) {\r\n ctx.log(\"configuring cewolf app..\");\r\n ctx.setAttribute(KEY, this);\r\n\r\n //retrieve the init config params\r\n ServletConfig config = (ServletConfig) ctx.getAttribute(CewolfRenderer.INIT_CONFIG);\r\n if (config != null)\r\n {\r\n Enumeration initParams = config.getInitParameterNames();\r\n try {\r\n while (initParams.hasMoreElements()) {\r\n String param = (String) initParams.nextElement();\r\n String value = config.getInitParameter(param);\r\n if (\"debug\".equalsIgnoreCase(param)) {\r\n debugged = Boolean.valueOf(value).booleanValue();\r\n } else if (\"overliburl\".equalsIgnoreCase(param)) {\r\n overlibURL = value;\r\n } else if (\"storage\".equalsIgnoreCase(param)) {\r\n storageClassName = value;\r\n } else {\r\n ctx.log(param + \" parameter is ignored.\");\r\n }\r\n parameters.put(param,value);\r\n }\r\n } catch (Throwable t) {\r\n ctx.log(\"Error in Cewolf config.\", t);\r\n } \r\n }\r\n else {\r\n \tctx.log(\"Cewolf Misconfiguration. You should add a <load-on-startup> tag \"\r\n \t\t\t+ \"to your web.xml for the Cewolf rendering servlet.\\n\"\r\n\t\t\t\t\t+ \"A default Configuration will be used if not.\");\r\n }\r\n \r\n\t\ttry {\r\n\t\t\tinitStorage(ctx);\r\n\t\t} catch (CewolfException ex) {\r\n\t\t\tctx.log(\"exception during storage init from class \" + storageClassName);\r\n\t\t\tctx.log(\"using \" + DEFAULT_STORAGE);\r\n\t\t\tstorageClassName = DEFAULT_STORAGE;\r\n\t\t\ttry {\r\n\t\t\t\tinitStorage(ctx);\r\n\t\t\t} catch(CewolfException cwex){\r\n\t\t\t\tcwex.printStackTrace();\r\n\t\t\t\tthrow new RuntimeException(storageClassName + \".init() threw exception.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tctx.log(\"using storage class \" + storageClassName);\r\n\t\tctx.log(\"using overlibURL \" + overlibURL);\r\n\t\tctx.log(\"debugging is turned \" + (debugged ? \"on\" : \"off\"));\r\n\t\tctx.log(\"...done.\");\r\n\t}", "protected final Map<String, String> getConfiguration() {\r\n\t\treturn Collections.unmodifiableMap(configuration);\r\n\t}", "private Configuration getConfig() {\n final Configuration config = new Configuration();\n for (final Field field : getClass().getDeclaredFields()) {\n try {\n final Field configField = Configuration.class.getDeclaredField(field.getName());\n field.setAccessible(true);\n configField.setAccessible(true);\n\n final Object value = field.get(this);\n if (value != null) {\n configField.set(config, value);\n getLog().debug(\"using \" + field.getName() + \" = \" + value);\n }\n } catch (final NoSuchFieldException nsfe) {\n // ignored\n } catch (final Exception e) {\n getLog().warn(\"can't initialize attribute \" + field.getName());\n }\n\n }\n if (containerProperties != null) {\n final Properties props = new Properties();\n props.putAll(containerProperties);\n config.setProperties(props);\n }\n if (forceJspDevelopment) {\n if (config.getProperties() == null) {\n config.setProperties(new Properties());\n }\n config.getProperties().put(\"tomee.jsp-development\", \"true\");\n }\n return config;\n }", "@Override\n\tpublic Map<String, String> getConf() {\n\t\treturn null;\n\t}", "@Override\n\tpublic ServletConfig getServletConfig() {\n\t\treturn null;\n\t}", "@Override\n\tpublic ServletConfig getServletConfig() {\n\t\treturn null;\n\t}", "@Override\n\tpublic ServletConfig getServletConfig() {\n\t\treturn null;\n\t}", "protected Map<String, Object> getConfigurationParameters(){\n\t\treturn configurationParameters;\n\t}", "@Override\n public ServletConfig getServletConfig() {\n return null;\n }", "public static Configuration getConfiguration() {\n synchronized (Configuration.class) {\n return configuration;\n }\n }", "public ServletContext getApplication() {\n return servletRequest.getServletContext();\n }", "Map<String, Object> getContext();", "@SuppressWarnings(\"unchecked\")\n public Map<String, String> getMapContextPath() {\n FacesContext facesContext = FacesContext.getCurrentInstance();\n ExternalContext extenalContext = facesContext.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) extenalContext.getRequest();\n return (Map<String, String>) request.getSession().getAttribute(\"MAP_CONTEXT_PATH\");\n //xxx_temp end\n }", "@Override\r\n public ServletConfig getServletConfig() {\n return null;\r\n }", "public static Config getConfig(){\n return _Config;\n }", "public ServletContext getContext() {\r\n\t\treturn new ContextWrapper(getEvent().getServletContext());\r\n\t}", "Map<String, Object> readConfig(Request request, String id);", "public Map<String, InterceptABTestModel> getConfigMap() {\n return Collections.unmodifiableMap(configMap);\n }", "protected Config getConfig () {\n return this.conf;\n }", "public static Config getConfig() {\r\n\t\treturn cfg;\r\n\t}", "public Map<String, Object> context() {\n return unmodifiableMap(context);\n }", "public static ConfigManager getConfiguration() {\n return configuration;\n }", "public ServletContext getServletContext() {\n\t\treturn _context;\n\t}", "public ServletContext getServletContext() {\n return this.context;\n }", "public KernelConfig getConfig()\n {\n Kernel.checkAccess();\n return config;\n }", "Map<String, String> getConfigProperties();", "public JspConfig getJspConfig();", "protected Configuration getConfiguration() {\n return configuration;\n }", "public static ServletContext getServletContext() {\n assert context != null;\n if (context == null)\n throw new IllegalStateException();\n \n return context;\n }", "public Configuration getConfiguration() {\n return config;\n }", "public Configuration getConfiguration() {\n return config;\n }", "public Object getConf() {\n return this.conf;\n }", "public org.apache.axis2.context.xsd.ConfigurationContext getConfigurationContext(){\n return localConfigurationContext;\n }", "public HashMap<String, Object> getUserConfig() {\n return userConfig;\n }", "protected Configuration getConfiguration(){\n return configuration;\n }", "public ConfigurationService getConfigurationService() {\n return configurationService;\n }", "GeneralConfiguration getGeneralConfiguration();", "public static Configuration getCurrentConfig() {\n return ConfigManager.getCurrentConfig();\n }", "@GET\n @Path(\"/config/get\")\n public Response configGet(@Context HttpServletRequest request,@Context HttpServletResponse response,@Context ServletContext servletContext) throws JsonGenerationException, JsonMappingException, IOException{\n return Response.status(200).entity(Json.newObjectMapper(true).writeValueAsString(Config.get())).build();\n }", "public void init( ServletConfig cfg ) throws ServletException {\n super.init( cfg );\n\n String controllerFile = getInitParameter( \"Handler.configFile\" );\n if ( ! ( new File( controllerFile ).exists() ) ) {\n controllerFile = getServletContext().getRealPath( controllerFile );\n }\n String clientContext = this.getInitParameter( \"MapContext.configFile\" );\n if ( ! ( new File( clientContext ).exists() ) ) {\n clientContext = getServletContext().getRealPath( clientContext );\n try {\n File file = new File( clientContext );\n vc = WebMapContextFactory.createViewContext( file.toURL(), null, null );\n appHandler = new MapApplicationHandler( controllerFile, vc );\n } catch(Exception e) {\n e.printStackTrace();\n }\n } \n }", "ApplicationContext getAppCtx();", "@Override\n\tpublic Configuration getConf() {\n\t\treturn this.Conf;\n\t}", "public Map getJMSConnectorConfig()\n\t{\n\t\tMap params = getParams( \"jmsConnectorConfig\" );\n\t\t\n\t\treturn( params );\n\t}", "@Override\n\tprotected Class<?>[] getServletConfigClasses() {\n\t\treturn new Class[] { WebConfiguration.class };\n\t}", "protected ServletContext getServletContext(String context) {\n\t\treturn ((ApplicationInfo)Server.getInstance().getApplication(context).getApplicationInfo()).getServletContext();\n\t}", "final protected ServletBeanContext getServletBeanContext()\n {\n if (_beanContext == null)\n {\n ControlContainerContext ccc = ControlThreadContext.getContext();\n if (! (ccc instanceof ServletBeanContext))\n throw new IllegalStateException(\"No ServletBeanContext available\");\n\n _beanContext = (ServletBeanContext)ccc;\n }\n return _beanContext;\n }", "public static synchronized Configuration getInstance() {\n\t\tif (configuration == null) configuration = new Configuration();\n\t\treturn configuration;\n\t}", "public Map<String, Object> getComponentConfiguration() {\n\t\treturn null;\n\t}", "Map<String, Object> getRequestContextLocalAttrs();", "public ConfigCommon getConfig() {\n return config;\n }", "public Configuration getConfiguration() {\n return configurationParameter.getConfiguration();\n }", "@Deprecated\n @SuppressWarnings(\"unchecked\")\n protected static Map<String, String> getInitParameterMap(Object context) {\n Map<String, String> initParameters = new HashMap<String, String>();\n Class<?> contextClass = context.getClass();\n Method method = ClassUtil.getForcedAccessibleMethod(contextClass,\n \"getInitParameterNames\");\n Enumeration<String> e = (Enumeration<String>) ClassUtil\n .invokeMethod(context, method);\n\n method = ClassUtil.getForcedAccessibleMethod(contextClass,\n \"getInitParameter\", String.class);\n while (e.hasMoreElements()) {\n String key = e.nextElement();\n initParameters.put(key, (String) ClassUtil.invokeMethod(\n context, method, key));\n }\n\n return initParameters;\n }", "public Object getConfig() {\n return config;\n }", "Map<String, Constant> getConstantMap();", "public Configuration getConfiguration() {\n \tif (configurationRef==null)\n \t\treturn null;\n \treturn (Configuration)configurationRef.get();\n }", "public HashMap<String, HttpServlet> createServletMaps(){\n\t\tHashMap<String,String> servletClass = handler.getServletClass();\n\t\tSet<String> allServletName = servletClass.keySet();\n\t\tContext con = createContext();\n\t\t\n\t\tfor(String servletname: allServletName){\n\t\t\tlog.info(\"ServletContainer: servletname is \"+servletname);\n\t\t\tHttpServlet servlet = createServlet(servletname,con);\n\t\t\t\n\t\t\tservletsmap.put(servletname, servlet);\t\t\t\n\t\t}\n\t\t\n\t\treturn servletsmap;\t\t\n\t\t\n\t}", "public Configuration getConfiguration() {\n return configuration;\n }", "public Configuration getConfiguration() {\n return configuration;\n }", "public Configuration getConfiguration() {\n return configuration;\n }", "public Configuration getConfiguration() {\n return configuration;\n }", "public Map<String, ConfigItem<String, State>> getMap() {\n\t\treturn cfg;\n\t}", "public Map<String, Object> getComponentConfiguration() {\n\t\tSystem.out.println(\"WordReader.getComponentConfiguration\");\n\t\treturn null;\n\t}", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "Servlet2Configurator(final ServletContext servletContext) {\n // Nothing to do.\n }", "public void init(ServletConfig config) throws ServletException {\n\t\tcontext = config.getServletContext();\n\t}", "public Config getConfig();", "public ConfigurationHolder getConfiguration() {\n return this.cfg;\n }", "public static ServerConfiguration getServerConfiguration() {\n return getOctaneDescriptor().getServerConfiguration();\n }", "public static KapConfig getInstanceFromEnv() {\n return wrap(KylinConfig.getInstanceFromEnv());\n }", "public FileConfiguration getConfig () {\n if (fileConfiguration == null) {\n this.reloadConfig();\n }\n return fileConfiguration;\n }", "public void init(ServletConfig config) throws ServletException {\r\n\t\tServletContext servletContext = config.getServletContext();\r\n\t\tthis.wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);\r\n\t\tthis.bdgInfoMgmFacade = (BdgInfoMgmFacade) this.wac.getBean(\"bdgInfoMgm\");\r\n\t\tthis.baseMgm = (BaseMgmFacade) Constant.wact.getBean(\"baseMgm\");\r\n\t\tthis.conclaMgm = (ConClaMgmFacade) Constant.wact.getBean(\"conclaMgm\");\r\n\t\tthis.conchaMgm=(ConChaMgmFacade)Constant.wact.getBean(\"conchaMgm\");\r\n\t\tthis.conbreMgm=(ConBreMgmFacade)Constant.wact.getBean(\"conbreMgm\");\r\n\t\tthis.conpayMgm=(ConPayMgmFacade)Constant.wact.getBean(\"conpayMgm\");\r\n\t\tthis.bdgProjectMgm=(BdgProjectMgmFacade)Constant.wact.getBean(\"bdgProjectMgm\");\r\n\t}", "public LocalServerConfig getConfig() {\n return serverConfig;\n }", "public @NotNull ExtServletContext getServletContext(HttpContext context)\n {\n if (context == null)\n {\n context = createDefaultHttpContext();\n }\n\n return this.contextManager.getServletContext(context);\n }", "public static void loadConfig() throws IOException {\n\t\t// initialize hash map\n\t\tserverOptions = new HashMap<>();\n\t\t// Get config from file system\n\t\tClass<ConfigurationHandler> configurationHandler = ConfigurationHandler.class;\n\t\tInputStream inputStream = configurationHandler.getResourceAsStream(\"/Config/app.properties\");\n\t\tInputStreamReader isReader = new InputStreamReader(inputStream);\n\t //Creating a BufferedReader object\n\t BufferedReader reader = new BufferedReader(isReader);\n\t String str;\n\t while((str = reader.readLine())!= null){\n\t \t if (str.contains(\"=\")) {\n\t \t\t String[] config = str.split(\" = \", 2);\n\t \t serverOptions.put(config[0], config[1]);\n\t \t }\n\t }\n\t}", "public void init( ServletConfig cfg ) throws ServletException {\r\n\tm_config = cfg;\r\n\tm_ctx = cfg.getServletContext();\r\n\tconfigure();\r\n }", "public static Context getContext(){\n return appContext;\n }", "public Config getConfig() {\n return config;\n }", "public Map<String, Object> getContextMap(MessageInfo messageInfo) {\n Map<String, Object> internalMap = (Map<String, Object>) messageInfo.getMap()\n .get(AuthenticationFramework.ATTRIBUTE_AUTH_CONTEXT);\n\n if (internalMap == null) {\n internalMap = new HashMap<>();\n messageInfo.getMap().put(AuthenticationFramework.ATTRIBUTE_AUTH_CONTEXT, internalMap);\n }\n\n return internalMap;\n }", "public QueryConfigHandler getQueryConfigHandler() {\n return config;\n }", "@Override\n public void init() throws ServletException {\n super.init();\n\n dbConfigResource = getServletContext().getInitParameter(\"dbConfigResource\");\n jspPath = getServletContext().getInitParameter(\"jspPath\");\n }", "public void init(FilterConfig fConfig) throws ServletException {\n\t\tservletCtxt = fConfig.getServletContext();\r\n\t}", "protected WorkloadConfiguration getConfguration() {\n\t\treturn workloadConfiguration;\n\t}", "public static Config config() {\n return LiveEventBusCore.get().config();\n }", "public static ConcurrentMap<String, WebSocketServer> getWebSocketMap() {\n\t\treturn webSocketMap;\n\t}", "Map<String, Object> readConfig(VirtualHost vhost, String id);" ]
[ "0.6754533", "0.6709042", "0.6695817", "0.65462905", "0.6393215", "0.6353261", "0.6353261", "0.63348806", "0.63297915", "0.62989783", "0.60355955", "0.6029578", "0.5999594", "0.5958436", "0.59087956", "0.58941346", "0.58688927", "0.58688927", "0.58688927", "0.57920206", "0.5781842", "0.57763064", "0.5739998", "0.5739369", "0.57368225", "0.5709582", "0.56934744", "0.5686796", "0.5656345", "0.5648478", "0.5637074", "0.56357074", "0.5619941", "0.559438", "0.5554128", "0.5550565", "0.5469267", "0.54590636", "0.5451192", "0.5440808", "0.54152644", "0.54140496", "0.54140496", "0.54108405", "0.5403926", "0.539774", "0.53966844", "0.5391106", "0.5374401", "0.53740895", "0.5370841", "0.5369134", "0.53577983", "0.53486645", "0.53329605", "0.5328711", "0.5326755", "0.5317506", "0.5303231", "0.529147", "0.5288566", "0.5288032", "0.5281031", "0.52769345", "0.52609617", "0.5251377", "0.5248939", "0.52369255", "0.52291024", "0.52291024", "0.52291024", "0.52291024", "0.52289367", "0.5227104", "0.52241325", "0.52241325", "0.52241325", "0.52241325", "0.52216333", "0.5217741", "0.52112085", "0.5205116", "0.5183386", "0.51782835", "0.51781374", "0.5177847", "0.51676774", "0.5160413", "0.5157794", "0.5149472", "0.51493657", "0.51406425", "0.51383024", "0.5136373", "0.513145", "0.5130271", "0.51255643", "0.50998545", "0.5093693", "0.5091058" ]
0.81718546
0
Public Methods Don't use class variables in Action objects. These are not session safe. Method to check and see if https is required for this resource
protected boolean checkSsl(ActionMapping mapping, HttpServletRequest request, HttpServletResponse response) { String redirectString = SslUtil.getRedirectString(request, getServlet() .getServletContext(), SECURE.equals(mapping.getParameter())); if (redirectString != null) { log.debug("protocol switch needed, redirecting..."); try { // Redirect the page to the desired URL response.sendRedirect(response .encodeRedirectURL(redirectString)); return true; } catch (Exception ioe) { log.error("redirect to new protocol failed..."); // Handle appropriately } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nullable Boolean isHttps();", "public boolean isSecure( ) {\n\t\treturn scheme.equals( \"https\" );\n\t}", "@Override\n\t\tpublic boolean isSecure() {\n\t\t\treturn false;\n\t\t}", "public static boolean isApiProtocolHttps () {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isSecure() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isSecure() {\n\t\treturn false;\n\t}", "public boolean isSecure() {\n return false;\n }", "public boolean isSecure() {\n return false;\n }", "public boolean isHTTPorHTTPS() {\n if (proxyURL.getProtocol().equalsIgnoreCase(\"HTTP\") ||\n proxyURL.getProtocol().equalsIgnoreCase(\"HTTPS\")) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isHttpsEnabled() {\n return httpsEnabled;\n }", "public boolean isSsl() {\n return ssl;\n }", "public boolean useSSL() {\n\t\treturn ssl;\n\t}", "@Override\n public boolean isSecure() {\n return secure;\n }", "private boolean m14041a() {\n return this.f12187c.startsWith(\"https://\");\n }", "@Override\n\tpublic boolean needSecurityCheck() {\n\t\treturn false;\n\t}", "public static boolean isUsingHttp() {\n\t\treturn ((activeAccount == null) ? ((adHocAccount == null) ? false : adHocAccount.useHttp) : activeAccount.useHttp);\n\t}", "@Property(name = \"staging:ssl\")\n public abstract boolean isSsl();", "private static void hackRequestForSwitchingSecureScheme() {\n// Logger.debug(\"SCOPE -> hackRequestForSwitchingSecureScheme\");\n Http.Request.current().secure = true;\n hackRequestPort();\n }", "public boolean isSecureServiceRequest(HttpServletRequest req) {\n String requestURI = req.getRequestURI();\n String serviceName = requestURI.substring(requestURI.lastIndexOf(\"/\") + 1);\n serviceName = requestURI.substring(requestURI.lastIndexOf(\"/\") + 1);\n TBXService service = null;\n try {\n service = serviceManager.getService(serviceName);\n if (service == null) {\n String errorMsg = \"Unknown service: \" + serviceName;\n logger.error(errorMsg);\n return false;\n }\n } catch (ToolboxException ex) {\n return false;\n }\n return service.isWSSecurity();\n }", "@Override\n\tpublic boolean isSecured() {\n\t\treturn false;\n\t}", "public boolean isSecure() {\n return secure;\n }", "public boolean isSecure() {\n return m_Secure;\n }", "private static void hackRequestForSwitchingInsecureScheme() {\n// Logger.debug(\"SCOPE -> hackRequestForSwitchingInsecureScheme\");\n Http.Request.current().secure = false;\n hackRequestPort();\n }", "boolean isSecureAccess();", "public int isSSLEnabled() {\n\t\tint enabled = 0;\n\t\tif (Boolean.parseBoolean(config.getProperty(ssl_yml_key)) == true || config.getProperty(ssl_yml_key).equals(ssl_yml_key)) {\n\t\t\tenabled = 1;\n\t\t}\n\t\t\n\t\treturn enabled;\n\t}", "public final boolean mo50006a(C18846s sVar) {\n String scheme = sVar.f50794d.getScheme();\n if (WebKitApi.SCHEME_HTTP.equals(scheme) || WebKitApi.SCHEME_HTTPS.equals(scheme)) {\n return true;\n }\n return false;\n }", "@java.lang.Override\n public boolean hasHttpRequest() {\n return httpRequest_ != null;\n }", "public boolean requiresSecurityPolicy()\n {\n return true;\n }", "private Boolean hashttp(String s)// checks if url entered has http:// on it\n {\n return s.contains(\"http://\") || s.contains(\"https://\");\n }", "@Override\n\t\t\t\t\tpublic boolean isRedirected(HttpRequest request, HttpResponse response, HttpContext context)\n\t\t\t\t\t\t\tthrows ProtocolException {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}", "public static boolean isHttps(final String urlString) {\n return (urlString != null && urlString.startsWith(\"https:\"));\n }", "public boolean isOKtoCrawl(String site, int port, boolean isSecure) { return true; }", "public boolean sslEnabled(){\n\t\treturn sslEnabled;\n\t}", "public boolean isSslOffloaded() {\n return this.sslOffloaded;\n }", "boolean isNonSecureAccess();", "public boolean isHttpsTransportOnly(Policy policy) throws SecurityConfigException {\n\n // When there is a transport binding sec policy assertion,\n // the service should be exposed only via HTTPS\n boolean httpsRequired = false;\n\n try {\n Iterator alternatives = policy.getAlternatives();\n if (alternatives.hasNext()) {\n List it = (List) alternatives.next();\n\n RampartPolicyData rampartPolicyData = RampartPolicyBuilder.build(it);\n if (rampartPolicyData.isTransportBinding()) {\n httpsRequired = true;\n } else if (rampartPolicyData.isSymmetricBinding()) {\n Token encrToken = rampartPolicyData.getEncryptionToken();\n if (encrToken instanceof SecureConversationToken) {\n Policy bsPol = ((SecureConversationToken) encrToken).getBootstrapPolicy();\n Iterator alts = bsPol.getAlternatives();\n List bsIt = (List) alts.next();\n RampartPolicyData bsRampartPolicyData = RampartPolicyBuilder.build(bsIt);\n httpsRequired = bsRampartPolicyData.isTransportBinding();\n }\n }\n }\n } catch (WSSPolicyException e) {\n log.error(\"Error in checking http transport only\", e);\n throw new SecurityConfigException(\"Error in checking http transport only\", e);\n }\n\n return httpsRequired;\n }", "public Boolean allowInsecure() {\n return this.allowInsecure;\n }", "public boolean getSecure()\n\t{\n\t\treturn this.secure;\n\t}", "public final boolean getIsSocketSSLConnection(){\r\n return isSocketSSL;\r\n }", "private boolean checkInternetPermission() {\n if (ActivityCompat.checkSelfPermission(mLayout.getContext().getApplicationContext(), Manifest.permission.INTERNET)\n == PackageManager.PERMISSION_GRANTED) {\n return true;\n\n } else {\n\n return false;\n }\n }", "public static boolean isSecurityOnlyLocalRequests() {\r\n return (isSecurityOnlyLocalRequests);\r\n }", "private static String getRequestsProtocol() {\n boolean isXForwardedProtoHttps = Controller.request().header(\"X-Forwarded-Proto\").map(h -> h.equals(\"https\"))\n .orElse(false);\n boolean isRefererProtoHttps = Controller.request().header(\"Referer\").map(h -> h.startsWith(\"https\")).orElse(\n false);\n return isXForwardedProtoHttps || isRefererProtoHttps || Controller.request().secure() ? \"https\" : \"http\";\n }", "@Override\n\t\t\t\tpublic boolean verify(String urlHostName, SSLSession session) {\n\t\t\t\t\treturn true;\n\t\t\t\t}", "public boolean isSSLEnabled() {\n return agentConfig.isSSLEnabled();\n }", "private void checkInternetConnection() {\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}", "public boolean verify (String urlHostname, SSLSession session)\n {\n return true;\n }", "public boolean isSecure() {\n return channel.isSecure();\n }", "boolean hasPaymentUrl();", "private boolean isRedirect(String sHTTPRequest) {\n return sRedirects.containsKey(sHTTPRequest);\n }", "public boolean isTls() {\n return tls;\n }", "@java.lang.Override\n public boolean hasUrl() {\n return instance.hasUrl();\n }", "@java.lang.Override\n public boolean hasUrl() {\n return instance.hasUrl();\n }", "private boolean checkBackend() {\n \ttry{\n \t\tif(sendRequest(generateURL(0,\"1\")) == null ||\n \tsendRequest(generateURL(1,\"1\")) == null)\n \t\treturn true;\n \t} catch (Exception ex) {\n \t\tSystem.out.println(\"Exception is \" + ex);\n\t\t\treturn true;\n \t}\n\n \treturn false;\n \t}", "public boolean isAuthRequired() {\n\t\treturn false;\n\t}", "private String verifyHttpProcess(String url) {\n synchronized (httpClient) {\n int statusCode = -1;\n try {\n GetMethod get = getCachedMethod(url);\n statusCode = httpClient.executeMethod(get);\n } catch (HttpException e1) {\n String msg = \"Unable to execute GET against the collaboration dataserver at \"\n + url;\n logger.error(msg, e1);\n setOffline(msg);\n } catch (IOException e2) {\n String msg = \"Unable to read the response from the collaboration dataserver at \"\n + url;\n logger.error(msg, e2);\n setOffline(msg);\n }\n\n if ((statusCode == HttpStatus.SC_OK) == false) {\n String msg = \"Dataserver not is not available - received status \"\n + statusCode;\n logger.error(msg);\n setOffline(msg);\n return null;\n } else {\n String urlConfig = \"sessionDataHttpURL : \" + url;\n setOnline(urlConfig);\n return urlConfig;\n }\n }\n }", "public boolean isSslEnabled() {\n\t\treturn sslEnabled;\n\t}", "@java.lang.Override\n public boolean hasProtocol() {\n return protocol_ != null;\n }", "public boolean handleSslErrorRequest(SslError error) {\n return false;\n }", "boolean hasApiUrl();", "public final boolean isSecure(Socket sock)\n/* */ throws IllegalArgumentException\n/* */ {\n/* 168 */ if (sock == null) {\n/* 169 */ throw new IllegalArgumentException(\"Socket may not be null.\");\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 174 */ if (sock.getClass() != Socket.class) {\n/* 175 */ throw new IllegalArgumentException(\"Socket not created by this factory.\");\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 180 */ if (sock.isClosed()) {\n/* 181 */ throw new IllegalArgumentException(\"Socket is closed.\");\n/* */ }\n/* */ \n/* 184 */ return false;\n/* */ }", "public final void isSocketSSLConnection(boolean isSecure){\r\n isSocketSSL = isSecure;\r\n }", "final public boolean requiresAuthentication()\r\n {\r\n return requires_AUT;\r\n }", "public Boolean hasSecurity() {\n return this.hasSecurity;\n }", "public boolean verify(String urlHostName, SSLSession session) {\n\t\t return true;\r\n\t\t }", "public boolean verify(String urlHostName, SSLSession session) {\n\t\t return true;\r\n\t\t }", "boolean hasUrl();", "boolean hasUrl();", "boolean hasUrl();", "boolean hasUrl();", "boolean hasUrl();", "@Override\npublic SSL_MODES getSSLMode() {\n\treturn null;\n}", "void assertSecureChannel(HttpServletRequest request) throws AccessControlException;", "public Https()\n\t{\n\t\ttry\n\t\t{\n\t\t\tPropertyConfigurator.configure(\"conf/log4j.properties\"); \t\n\t\t\tpropXML.load(new FileInputStream(\"conf/HTTPS.txt\"));\n\t\t\tkey=propXML.getProperty(\"key\");\t\t\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tlogger.error(this.getClass().getName()+\" \"+e.getMessage());\n\t\t} \n\n\t}", "public static boolean isSecurityEnabled()\n {\n return Security.getInstance() != null || getAuthorizer() != null;\n }", "@Override\nprotected Void doInBackground(Void... params){\n TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\n public java.security.cert.X509Certificate[] getAcceptedIssuers() {\n return null;\n }\n\n public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType) {\n }\n\n public void checkServerTrusted(java.security.cert.X509Certificate[] certs, String authType) {\n }\n } };\n\n // Install the all-trusting trust manager\n try {\n SSLContext sc = SSLContext.getInstance(\"SSL\");\n sc.init(null, trustAllCerts, new java.security.SecureRandom());\n HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n\n // Your code ...\n URL url = null;\n HttpsURLConnection conn = null;\n try {\n url = new URL(\"https://example.com\");\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n // ...\n}", "public boolean isSetUrl() {\n return this.url != null;\n }", "public boolean isAuthenticationRequired() {\n\t\treturn true;\n\t}", "public Optional<URI> HTTPSAddress() {\n return https;\n }", "@java.lang.Override\n public boolean hasDownloadRequest() {\n return downloadRequest_ != null;\n }", "@Test\r\n\tpublic void testHttpURLBuilderSecure() {\r\n\t\tthis.httpURLBuilder.setSecure(true);\r\n\t\tthis.httpURLBuilder.setPort(0);\r\n\t\tAssert.assertEquals(443, this.httpURLBuilder.getPort());\r\n\t\tAssert.assertNotNull(this.httpURLBuilder.toString());\r\n\t\tAssert.assertNotNull(this.httpURLBuilder.toURL());\r\n\t\t// Assert.assertTrue(this.httpURLBuilder.canEqual(this.httpURLBuilder));\r\n\t\tAssert.assertTrue(this.httpURLBuilder.equals(this.httpURLBuilder));\r\n\t\tAssert.assertNotNull(Integer.valueOf(this.httpURLBuilder.hashCode()));\r\n\t}", "@Stability.Internal\n public static boolean opensslAvailable() {\n return InitOnDemandHolder.OPENSSL_AVAILABLE;\n }", "protected boolean isHeadRequest(ActionInvocation actionInvocation) {\n return actionInvocation.method != null && HTTPMethod.HEAD.is(actionInvocation.method.httpMethod);\n }", "@Override\n protected URLConnection openConnection(URL url, Proxy proxy) throws IOException {\n\n final HttpsURLConnectionImpl httpsURLConnection = (HttpsURLConnectionImpl) super.openConnection(url, proxy);\n if (\"artisan.okta.com\".equals(url.getHost()) && \"/home/amazon_aws/0oad7khqw5gSO701p0x7/272\".equals(url.getPath())) {\n\n return new URLConnection(url) {\n @Override\n public void connect() throws IOException {\n httpsURLConnection.connect();\n }\n\n public InputStream getInputStream() throws IOException {\n byte[] content = IOUtils.toByteArray(httpsURLConnection.getInputStream());\n String contentAsString = new String(content, \"UTF-8\");\n\n //System.out.println(\"########################## got stream content ##############################\");\n //System.out.println(contentAsString);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n //contentAsString = contentAsString.replaceAll(\",\\\"ENG_ENABLE_SCRIPT_INTEGRITY\\\"\", \"\"); // nested SRIs?\n baos.write(contentAsString.replaceAll(\"integrity ?=\", \"integrity.disabled=\").getBytes(\"UTF-8\"));\n return new ByteArrayInputStream(baos.toByteArray());\n }\n\n public OutputStream getOutputStream() throws IOException {\n return httpsURLConnection.getOutputStream();\n }\n\n };\n\n } else {\n return httpsURLConnection;\n }\n }", "public RequestBuilder https(boolean https) {\n this.https = https;\n return this;\n }", "public java.lang.Boolean getLoginBySSLThumbprintSupported() {\r\n return loginBySSLThumbprintSupported;\r\n }", "@java.lang.Override\n public boolean hasFirewall() {\n return stepInfoCase_ == 6;\n }", "void assertSecureRequest(HttpServletRequest request) throws AccessControlException;", "@java.lang.Override\n public boolean hasFirewall() {\n return stepInfoCase_ == 6;\n }", "boolean hasDownloadRequest();", "boolean hasHadithUrl();", "@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }", "@SuppressWarnings(\"unused\")\n private static boolean isURLExists(String urlName) throws Exception {\n // SSLContext sslcontext = SSLContext.getInstance(\"TLSv1\");\n //\n // sslcontext.init(null,\n // null,\n // null);\n // SSLSocketFactory noSSLv3Factory = new NoSSLv3Factory(sslcontext.getSocketFactory());\n //\n // HttpsURLConnection.setDefaultSSLSocketFactory(noSSLv3Factory);\n //\n // HttpsURLConnection con = (HttpsURLConnection) new URL(urlName).openConnection();\n //\n // HttpsURLConnection.setFollowRedirects(false);\n // con.setConnectTimeout(1000);\n // con.setReadTimeout(1000);\n // con.setRequestMethod(\"HEAD\");\n //\n // return con.getResponseCode() == HttpsURLConnection.HTTP_OK;\n\n // Runtime runtime = Runtime.getRuntime();\n // Process proc = runtime.exec(\"ping \" + urlName); //<- Try ping -c 1 www.serverURL.com\n // int mPingResult = proc.waitFor();\n // if (mPingResult == 0) {\n // Log.e(\"thanh.dao\", \"isURLExists: \" + true);\n // return true;\n // } else {\n // Log.e(\"thanh.dao\", \"isURLExists: \" + false);\n // return false;\n // }\n\n Jsoup.connect(urlName).timeout(CONNECT_TIMEOUT).get();\n return true;\n }", "@Override\r\n\tpublic boolean isRedirect() {\n\t\treturn false;\r\n\t}", "boolean hasRequest();", "boolean hasRequest();", "boolean hasRequest();", "boolean hasRequest();", "boolean hasRequest();", "boolean hasRequest();", "boolean hasRequest();" ]
[ "0.7154843", "0.69078773", "0.65360194", "0.6513781", "0.6509946", "0.6509946", "0.64712864", "0.64712864", "0.64375335", "0.6406929", "0.6285002", "0.6262092", "0.6240812", "0.615302", "0.5992975", "0.593088", "0.59218156", "0.5919928", "0.5915089", "0.5883011", "0.5864363", "0.58592904", "0.5856202", "0.5855282", "0.5699519", "0.56614274", "0.5644521", "0.5629847", "0.56056744", "0.56038034", "0.5597199", "0.559587", "0.55942005", "0.5588942", "0.55235606", "0.5519615", "0.5505667", "0.5499875", "0.54888374", "0.54684275", "0.5419934", "0.53956026", "0.5391769", "0.53743505", "0.53716207", "0.5370246", "0.53640413", "0.53603554", "0.5352809", "0.5329454", "0.52946496", "0.52946496", "0.52776444", "0.5269841", "0.5248533", "0.52476895", "0.5242631", "0.52370477", "0.5215696", "0.52118915", "0.5211688", "0.5203362", "0.5201508", "0.5187226", "0.5187226", "0.5164738", "0.5164738", "0.5164738", "0.5164738", "0.5164738", "0.51521975", "0.5145627", "0.51438636", "0.51390004", "0.5136973", "0.5136044", "0.51285905", "0.5111206", "0.51097953", "0.5104933", "0.5095916", "0.50819063", "0.50816846", "0.5052978", "0.50512826", "0.5047753", "0.504398", "0.50283915", "0.50246185", "0.50214523", "0.50154245", "0.50120497", "0.5006217", "0.4987052", "0.4987052", "0.4987052", "0.4987052", "0.4987052", "0.4987052", "0.4987052" ]
0.6033016
14
Convenience method for removing the obsolete form bean.
protected void removeFormBean(ActionMapping mapping, HttpServletRequest request) { // Remove the obsolete form bean if (mapping.getAttribute() != null) { if ("request".equals(mapping.getScope())) { request.removeAttribute(mapping.getAttribute()); } else { HttpSession session = request.getSession(); session.removeAttribute(mapping.getAttribute()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void removeForm(ERForm form) {\n\t\t\n\t}", "@Override\n public void remove( )\n {\n FormPortletHome.getInstance( ).remove( this );\n }", "public void removeFormField(FormField formField) {\n\t\tif (formFields != null) {\n\t\t\tthis.formFields.remove(formField);\n\t\t}\n\t}", "Form removeElement(Element element);", "protected void updateFormBean(ActionMapping mapping,\r\n\t\t\tHttpServletRequest request, ActionForm form) {\r\n\t\t// Remove the obsolete form bean\r\n\t\tif (mapping.getAttribute() != null) {\r\n\t\t\tif (\"request\".equals(mapping.getScope())) {\r\n\t\t\t\trequest.setAttribute(mapping.getAttribute(), form);\r\n\t\t\t} else {\r\n\t\t\t\tHttpSession session = request.getSession();\r\n\r\n\t\t\t\tsession.setAttribute(mapping.getAttribute(), form);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "Form removeValidator(FormValidator validator);", "Form removeElement(String id);", "public void removeFormWrapListener(FormWrapListener listener);", "public static void removeViewScopedBean(String beanName){\r\n FacesContext.getCurrentInstance().getViewRoot().getViewMap().remove(beanName);\r\n }", "@Override\n\tpublic void clearForm() {\n\t\t\n\t}", "public abstract void remove(BEAN bean);", "Form removeDecorator(String id);", "public void remove( )\n {\n JasperPortletHome.getInstance( ).remove( this );\n }", "@Override\n public void formClearRegistry() {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n }", "@Override\n public void formClearRegistry() {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n }", "void removeDeprecatedBookNo(Object oldDeprecatedBookNo);", "protected void unsetContribution(ComponentFactory factory) {\n\t\tComponentInstance ci;\n\t\tComponent c;\n\t\tsynchronized (this) {\n\t\t\tci = mapping.remove(factory);\n\t\t\tc = (Component) ci.getInstance();\n\t\t\ttabs.removeComponent(c);\n\t\t}\n\t\tc.detach();\n\t\tci.dispose();\n\t}", "public LoginConfigType<T> removeFormLoginConfig()\n {\n childNode.remove(\"form-login-config\");\n return this;\n }", "public static void remove() {\n if (create()) {\n DOM.removeChild((com.google.gwt.user.client.Element) \n tag.getParentElement(), \n (com.google.gwt.user.client.Element) tag);\n tag = null;\n removed = true;\n }\n }", "void removeDeprecatedHadithNo(Object oldDeprecatedHadithNo);", "public final void clearForm() {\n\t\tlb.addItem(\"\");\n\t\tlb.clear();\n\t}", "Form removeProperty(String key);", "public void clearForm()\n {\n this.category = new Category();\n }", "public void borrarBeanActual() {\n\t\t// borrar el bean(controller) que se esta utilizando.\n\t\tString bean = this.getNombreBeanActual();\n\t\t// borrar el bean de session\n\t\tif (!TratamientoDeDatos.esNullCeroVacio(bean)) {\n\t\t\tFacesUtils.deleteSession(bean);\n\t\t}\n\t}", "public void removeEditDocumentationPage()\r\n {\r\n getSemanticObject().removeProperty(swpres_editDocumentationPage);\r\n }", "public void removeLayoutComponent(Component component) { }", "public void removeLayoutComponent(Component comp) {}", "public void removeLayoutComponent(Component comp) {}", "@Override\n public void remove() {\n }", "void removeFieldBinding( FieldBinding binding );", "@Override\n\tpublic void remove(MainFrameUpdater mfu) {\n\t\t\n\t}", "@Override\n public void remove() {\n }", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\tpublic boolean afterRemove(Class<?> clz, String beanName, String scope, DefaultListableBeanFactory dlbf) {\n\t\treturn false;\n\t}", "private static void destroyControl( Object controlInstance )\n {\n assert controlInstance instanceof ControlBean : controlInstance.getClass().getName();\n BeanContext beanContext = ( ( ControlBean ) controlInstance ).getBeanContext();\n if ( beanContext != null ) {\n if(LOG.isTraceEnabled())\n LOG.trace(\"Removing control \" + controlInstance + \" from ControlBeanContext \" + beanContext);\n beanContext.remove( controlInstance );\n }\n }", "protected void removeSelection() {\n\t\tBEAN oldBean = getInternalValue();\n\t\tsetInternalValue(null);\n\t\ttextField.setValue(null);\n\t\tif (searchListener != null) {\n\t\t\tsearchListener.remove(oldBean);\n\t\t}\n\t}", "@Deprecated\n public void forceRemove() {\n try {\n variant.removeAlloc(this, true);\n } catch (AbandonedSuccessorException e) {\n // This will never happen\n }\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public static void clearManagedBean(String beanName) {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tELContext elc = fc.getELContext();\r\n\t\tExpressionFactory ef = fc.getApplication().getExpressionFactory();\r\n\t\tef.createValueExpression(elc, getJsfEl(beanName), Object.class).setValue(elc, null);\r\n\r\n\t}", "public void remove() {\r\n super.remove();\r\n }", "public void removeLayoutComponent(Component comp) \n {\n\t\n }", "@Override\r\n\tpublic void removeLayoutComponent(Component arg0) {\n\t\t\r\n\t}", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "@Override\n\tpublic void remove() { }", "public void delete() {\n mapping.getFieldOrFieldExclude().remove(field);\n }", "public void clearForm() throws SQLException{\n actionItemClass obj = new actionItemClass();\n obj.clearForm(this);\n }", "public void resetForm() {\n\t\tthis.boleta = new Boleta();\n\t}", "public void remove() {\n\n }", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "void removeHasSCF(SCF oldHasSCF);", "@Override\r\n\tpublic void refrescarFormulario() {\n\t\t\r\n\t}", "public final void remove () {\r\n }", "public void eliminarMateria() {\n ejbFacade.remove(materia);\n items = ejbFacade.findAll();\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.update(\"MateriaListForm:datalist\");\n requestContext.execute(\"PF('Confirmacion').hide()\");\n departamento = new Departamento();\n materia = new Materia();\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se eliminó con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n requestContext.update(\"MateriaListForm\");\n }", "public RemoveUserForm(JFrame parent) {\n initComponents();\n \n Toolkit toolkit = getToolkit();\n setResizable(false);\n Dimension size = toolkit.getScreenSize();\n setLocation(size.width / 2 - getWidth() / 2, size.height / 2 - getHeight() / 2);\n this.parent = parent;\n \n }", "Form clearValidators();", "public void instanceRemoved(Contextual<?> bean, CreationalContext<?> context, Object instance);", "public void removeInvalid() {\n invalidLabel.setVisible(false);\n }", "void removeComponent(Class<? extends Component> componentClass);", "Form removeDefaultRendererForElementClass(Class<? extends Element> clazz);", "void unregisterResourceBuilder(ResourceBuilderModel resourceBuilder);", "protected void remove() {\n injectors.remove();\n }", "public void remove() {\n ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).remove();\n }", "public void remove() {\n ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).remove();\n }", "public void remove() {\n ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).remove();\n }", "public void DFRemoveAllMyServices() {\n try {\n DFService.deregister(this);\n } catch (FIPAException ex) {\n\n }\n }", "@Override\n\tpublic boolean remove(Widget w) {\n\t\treturn false;\n\t}", "public void remove() {\n ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).remove();\n }", "public void remove() {\n ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).remove();\n }", "public void remove() {\n ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).remove();\n }", "public abstract void removedFromWidgetTree();", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "public void remove() {\r\n return;\r\n }", "Form clearValidation();", "public void unsetPrf()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PRF$26, 0);\r\n }\r\n }", "public void unsetExtLst()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(EXTLST$14, 0);\n }\n }", "@Override\n public void removedService(final ServiceReference<ComponentFactory> reference, final ComponentFactory service)\n {\n final String productType = (String)reference.getProperty(ComponentConstants.COMPONENT_NAME);\n \n m_Logging.info(\"Unregistering factory for: %s\", productType);\n \n final FactoryInternal factory = m_Factories.get(productType);\n \n //make unavailable via framework\n tryMakeFactoryUnavailable(factory);\n \n // allow proxy services to do clean up first\n tryProxyOnRemoveFactory(factory);\n \n //remove all associated factory objects\n tryRemoveAllFactoryObjects(factory);\n //unreg the rest of the services and other cleanup\n tryCleanupFactory(factory);\n \n //make unavailable to management services\n tryRemoveFactory(productType);\n \n //dispose of the factory instance\n tryDisposeFactory(productType);\n \n //remove reference to service\n tryUngetService(reference);\n }", "@Override\r\n\t\tpublic void remove() {\n\r\n\t\t}", "@Override\n\t/**\n\t * feature is not supported\n\t */\n\tpublic void remove() {\n\t}", "public void removeLayoutComponent(Component comp)\n {\n }", "public void unsetExtLst()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(EXTLST$28, 0);\n }\n }", "public void eliminarControlProducto(RequisitoConformidadDto control) {\n\t\tcurrentPao.getListaRequisitosConformidad().remove(control);\r\n\t\tFacesContext context = FacesContext.getCurrentInstance();\r\n\t\tcontext.addMessage(null, new FacesMessage(\"Mensaje\", \"Se eliminó control de producto correctamente\"));\r\n\t}" ]
[ "0.76364636", "0.70677876", "0.66544014", "0.64777356", "0.6376555", "0.6338089", "0.6313708", "0.6214458", "0.5978973", "0.5847395", "0.58339787", "0.58138156", "0.574837", "0.56587845", "0.56587845", "0.5569816", "0.5567705", "0.5564041", "0.5557316", "0.5546865", "0.5528313", "0.5498923", "0.5461924", "0.5443283", "0.5428027", "0.54211384", "0.5387801", "0.5387801", "0.5385425", "0.5363943", "0.5346751", "0.53335625", "0.5324364", "0.5324364", "0.53179693", "0.53041863", "0.5295461", "0.52725655", "0.5269711", "0.5269711", "0.5269711", "0.5269711", "0.5269711", "0.5269711", "0.5269711", "0.52642155", "0.5258507", "0.52559704", "0.5255669", "0.5231367", "0.5230103", "0.5230103", "0.5230103", "0.5227847", "0.52211857", "0.521213", "0.5202139", "0.51914006", "0.5188756", "0.5188216", "0.5188216", "0.5172378", "0.5157433", "0.51472586", "0.51348466", "0.5126905", "0.51238316", "0.5118828", "0.50992376", "0.50939584", "0.50924206", "0.5085059", "0.5082229", "0.50795376", "0.50795376", "0.50795376", "0.5075071", "0.50693315", "0.5061777", "0.5061777", "0.5061777", "0.5048819", "0.50444263", "0.50444263", "0.50444263", "0.50444263", "0.50444263", "0.50444263", "0.50444263", "0.50444263", "0.5043049", "0.5042629", "0.50306004", "0.50268155", "0.50255364", "0.5017694", "0.50147045", "0.500263", "0.5002458", "0.5001439" ]
0.72581095
1
Convenience method to update a formBean in it's scope
protected void updateFormBean(ActionMapping mapping, HttpServletRequest request, ActionForm form) { // Remove the obsolete form bean if (mapping.getAttribute() != null) { if ("request".equals(mapping.getScope())) { request.setAttribute(mapping.getAttribute(), form); } else { HttpSession session = request.getSession(); session.setAttribute(mapping.getAttribute(), form); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void fillFormBean(IBookFormBean formBean);", "@Override\n\tpublic void update(DhtmlxGridForm f) throws Exception {\n\t\t\n\t}", "private void setCurrentBean(Object newBean)\r\n {\r\n T oldValue = getValue();\r\n\r\n if (bean != null)\r\n {\r\n PropertyChangeUtils.tryRemoveNamedPropertyChangeListenerUnchecked(\r\n bean, name, propertyChangeListener);\r\n }\r\n bean = newBean;\r\n if (bean != null)\r\n {\r\n PropertyChangeUtils.tryAddNamedPropertyChangeListenerUnchecked(\r\n bean, name, propertyChangeListener);\r\n }\r\n T newValue = getValue();\r\n if (!Objects.equals(oldValue, newValue))\r\n {\r\n fireValueChanged(oldValue, newValue);\r\n }\r\n }", "protected void setForm(final T bean, final AjaxRequestTarget target) {\n LOG.debug(\"Setting form to {}\", bean);\n\n // update the model with the new bean\n formModel.setObject(bean);\n\n // add the form to the target\n target.add(form);\n\n // update the button\n updateSaveButton.setModel(Model.of(\"Update\"));\n target.add(updateSaveButton);\n }", "public void update(InterfaceBean object) {\n\t\t\n\t}", "private void updateBinding(){\n\t\tif(propertiesObj == null)\n\t\t\treturn;\n\n\t\tif(txtBinding.getText().trim().length() == 0)\n\t\t\treturn;\n\n\t\tif(propertiesObj instanceof QuestionDef)\n\t\t\t((QuestionDef)propertiesObj).setVariableName(txtBinding.getText());\n\t\telse if(propertiesObj instanceof OptionDef)\n\t\t\t((OptionDef)propertiesObj).setVariableName(txtBinding.getText());\n\t\telse if(propertiesObj instanceof FormDef)\n\t\t\t((FormDef)propertiesObj).setVariableName(txtBinding.getText());\n\t\telse if(propertiesObj instanceof PageDef){\n\t\t\ttry{\n\t\t\t\t((PageDef)propertiesObj).setPageNo(Integer.parseInt(txtBinding.getText()));\n\t\t\t}catch(Exception ex){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t}", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@RequestMapping(value = \"/{id}\", params = \"form\", method = RequestMethod.GET) \n\tpublic String updateForm(@PathVariable(\"id\") Long id, Model uiModel) {\n\t\tuiModel.addAttribute(\"customer\", customerService.findById(id));\n\t\treturn \"customers/update\"; \n\t}", "@Override\n\tpublic T update(F domainForm) throws Exception {\n\t\tT domainObj = getAppCrudDao().getDomainUsingPk(domainForm.getDomainId());\n\n\t\t// update input doaminForm object values with the database values\n\t\tdomainObj = getDomainFactory().populateUsingFormForUpdate(domainForm, domainObj);\n\n\t\treturn this.getAppCrudDao().update(domainObj);\n\t}", "@Override\n\t\tpublic void refreshBeanElement() {\n\n\t\t}", "public void edit(RequestBean request) {\n\t\t\r\n\t}", "@RequestMapping(value = \"editQuestion\", method = RequestMethod.POST)\r\n\tpublic ModelAndView editQuestion(@ModelAttribute AdminFormBean formBean) {\r\n\t\tModelAndView modelAndView = new ModelAndView(\"questionPage\");\r\n\t\tquestionService.updateQuestion(formBean.getQuestion());\r\n\t\tformBean.setQuestionList(questionService.getQuestionByCategoryId(formBean.getQuestion().getCategoryId()));\r\n\t\tmodelAndView.addObject(\"adminForm\", formBean);\r\n\t\treturn modelAndView;\r\n\t}", "public void setForm(Form form)\n {\n this.form = form;\n }", "public ActionForward update(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n PurchaseOrderItemReceipt poir = this.getPurchaseOrderItemReceiptFromRequest(request);\r\n this.checkEditPower(poir, request);\r\n \r\n BeanForm purchaseOrderItemReceiptForm = (BeanForm) form;\r\n purchaseOrderItemReceiptForm.populateToBean(poir, request);\r\n \r\n PurchaseOrderItemReceiptManager pm = ServiceLocator.getPurchaseOrderItemReceiptManager(request);\r\n \r\n if(!pm.checkQty(poir))\r\n throw new BackToInputActionException(\"purchaseOrderItemReceipt.qtyExceeds\"); \r\n \r\n PurchaseOrderItemReceipt oldPoir = this.getPurchaseOrderItemReceiptFromRequest(request);\r\n request.setAttribute(\"X_OBJECT\", pm.updatePurchaseOrderItemReceipt(oldPoir,poir,this.getCurrentUser(request)));\r\n request.setAttribute(\"X_ROWPAGE\", \"purchaseOrderItemReceipt/row.jsp\");\r\n\r\n return mapping.findForward(\"success\");\r\n }", "@Override\n\tpublic void updateStudent(StudentForm student) {\n\t\t\n\t}", "public Form getUpdateForm() throws PublicationTemplateException;", "@Override\n protected void beforeOpen(HttpServletRequest request, ActionForm form)\n \t\tthrows Exception {\n \tsuper.beforeOpen(request, form);\n \tLong id = RequestUtils.getLongParameter(\"id\", -1);\n \tif(id != -1){\n \t\trequest.setAttribute(\"bean\", this.getService().load(id));\n \t}\n }", "public void testValueRefScope() throws Exception {\n \n TestBean testBean = new TestBean();\n boolean exceptionThrown = false;\n \n //testing with:\n // valueref in application scope\n // managed bean in session scope\n getFacesContext().getExternalContext().getApplicationMap().put(\n \"TestRefBean\", testBean);\n \n ValueBindingImpl valueBinding =\n new ValueBindingImpl(new ApplicationImpl());\n \n valueBinding.setRef(\"TestRefBean.one\");\n valueBinding.setValue(getFacesContext(), \"one\");\n \n bean = new ManagedBeanBean();\n bean.setManagedBeanClass(beanName);\n bean.setManagedBeanScope(\"session\");\n \n property = new ManagedPropertyBean();\n property.setPropertyName(\"one\");\n property.setValue(\"#{TestRefBean.one}\");\n bean.addManagedProperty(property);\n \n mbf = new ManagedBeanFactory(bean);\n \n //testing with an application scope property set in a session scope bean\n assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));\n \n //make sure bean instantiated properly. Get property back from bean.\n assertTrue(testBean.getOne().equals(\"one\"));\n \n //make sure scope is stored properly\n assertTrue(mbf.getScope().equals(\"session\"));\n \n \n //testing with:\n // valueref in request scope\n // managed bean in application scope\n getFacesContext().getExternalContext().getRequestMap().put(\n \"TestRefBean\", testBean);\n \n valueBinding = new ValueBindingImpl(new ApplicationImpl());\n \n valueBinding.setRef(\"TestRefBean.one\");\n valueBinding.setValue(getFacesContext(), \"one\");\n \n bean = new ManagedBeanBean();\n bean.setManagedBeanClass(beanName);\n bean.setManagedBeanScope(\"application\");\n \n property = new ManagedPropertyBean();\n property.setPropertyName(\"one\");\n property.setValue(\"#{TestRefBean.one}\");\n \n bean.addManagedProperty(property);\n \n mbf = new ManagedBeanFactory(bean);\n \n exceptionThrown = false;\n try {\n mbf.newInstance(getFacesContext());\n fail(\"Should have thrown FacesException\");\n } catch (FacesException ex) {\n exceptionThrown = true;\n }\n assertTrue(exceptionThrown);\n \n //make sure scope is stored properly\n assertTrue(mbf.getScope().equals(\"application\"));\n \n //cleanup\n getFacesContext().getExternalContext().getRequestMap().remove(\n \"TestRefBean\");\n \n //testing with:\n // valueref in session scope\n // managed bean in no scope\n getFacesContext().getExternalContext().getSessionMap().put(\n \"TestRefBean\", testBean);\n \n valueBinding = new ValueBindingImpl(new ApplicationImpl());\n \n valueBinding.setRef(\"sessionScope.TestRefBean.one\");\n valueBinding.setValue(getFacesContext(), \"one\");\n \n bean = new ManagedBeanBean();\n bean.setManagedBeanClass(beanName);\n bean.setManagedBeanScope(null);\n \n property = new ManagedPropertyBean();\n property.setPropertyName(\"one\");\n property.setValue(\"#{sessionScope.TestRefBean.one}\");\n bean.addManagedProperty(property);\n \n mbf = new ManagedBeanFactory(bean);\n \n exceptionThrown = false;\n try {\n mbf.newInstance(getFacesContext());\n fail(\"Should have thrown FacesException\");\n } catch (FacesException ex) {\n exceptionThrown = true;\n }\n assertTrue(exceptionThrown);\n \n //make sure scope is stored properly\n assertTrue(mbf.getScope() == null);\n }", "public void setForm(Form form) {\n this.data.setForm(form.getDataFormToSend());\n }", "@Override\n\tpublic void updateProjectTeam(ProjectTeamBean bean) {\n\t\t\n\t}", "public void update(T obj) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tsession.update(obj);\n\t\t\n\t}", "Optional<RacePlanForm> partialUpdate(RacePlanForm racePlanForm);", "@RequestMapping(value = \"editOption\", method = RequestMethod.POST)\r\n\tpublic ModelAndView editOption(@ModelAttribute AdminFormBean formBean) {\r\n\t\tModelAndView modelAndView = new ModelAndView(\"optionsPage\");\r\n\t\toptionsService.updateOptions(formBean.getOption());\r\n\t\tformBean.setOptionsList(optionsService.getOptionsByQuestionId(formBean.getOption().getQuestionId()));\r\n\t\tmodelAndView.addObject(\"adminForm\", formBean);\r\n\t\treturn modelAndView;\r\n\t}", "public void update( )\n {\n FormPortletHome.getInstance( ).update( this );\n }", "@Override\n public void doUpdate(FasciaOrariaBean bean) throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"UPDATE fasciaoraria SET fascia=? WHERE id=?\";\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n statement.setString(1, bean.getFascia());\n statement.setInt(2, bean.getId());\n System.out.println(\"doUpdate=\" + statement);\n statement.executeUpdate();\n con.commit();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n }", "public void update(T obj) {\n\t\tSession session = this.sessionFactory.getCurrentSession();\n\t\tsession.update(obj);\n\t}", "int updateByPrimaryKey(AbiFormsForm record);", "public void updateByObject()\r\n\t{\n\t}", "public static void populate(ActionForm formBean, HttpServletRequest req,\n ActionErrors errors) {\n\n Map viewsMap = (Map) req.getSession().getAttribute(ATTR_VIEWS_MAP);\n Map formData = (Map) viewsMap.get(req.getAttribute(ATTR_VIEWS_MAP_KEY));\n\n try {\n BeanUtils.populate(formBean, formData);\n } catch (IllegalAccessException iae) {\n log.error(ERR_ILLEGAL_ACCESS);\n errors.add(ERR_POP_FORM_BEAN, new ActionMessage(ERR_ILLEGAL_ACCESS));\n } catch (InvocationTargetException ite) {\n log.error(ERR_ILLEGAL_INVOC);\n errors.add(ERR_POP_FORM_BEAN, new ActionMessage(ERR_ILLEGAL_INVOC));\n }\n }", "@Override\n\tpublic void update(ConfirmDto dto) {\n\t\tsession.update(\"confirm.update\",dto);\n\t}", "public void update(ReceiptFormPO po) throws RemoteException {\n\t\tSystem.out.println(\"Update ReceiptFormPO Start!!\");\n\t\tSystem.out.println(\"client do\");\n\t\tif(po==null){\n\t\t\tthrow new IllegalArgumentException();\n\t\t}else{\n\t\t\tinsert(po);\n\t\t}\n\t\tSystem.out.println(\"update over!\");\n\t}", "public void updateData(MemberBean b) {\n\t\tem.merge(b);\n\t}", "public void editarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.edit(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaEditDialog').hide()\");\n ejbFacade.limpiarCache();\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n// FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\"));\n// requestContext.execute(\"PF('mensajeRegistroExitoso').show()\");\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n\n }", "public void update() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.update(this); // routine now uses leaseDao to get CampLease class\r\n\t}", "public void elSetReference(Object bean);", "@Override\n public void updateBeanDetails(TimeSheet t)\n {\n \n }", "public void update(CrGrupoFormularioPk pk, CrGrupoFormulario dto) throws CrGrupoFormularioDaoException;", "public void firstLoadBookUpdate(CheckOutForm myForm) {\n\t\tString isbn=myForm.getFrmIsbn();\r\n\t\tViewDetailBook myViewDetailBook=myViewDetailBookDao.getBookInfoByIsbn(isbn);\r\n\t\tmyForm.setFrmViewDetailBook(myViewDetailBook);\r\n\t\tint cp=myViewDetailBook.getNoofcopies();\r\n\t\tSystem.out.println(\"No of Copy in First Load Book Update=\"+cp);\r\n\t\tmyForm.setNoOfcopies(cp);\r\n\t\t\r\n\t}", "@Override\n\tpublic void updatePass(MemberBean param) {\n\t\t\n\t}", "public boolean update(ModelObject obj);", "@Override\n\tpublic void updateTeam(ProjectTeamBean projectTeamBean) {\n\t\t\n\t}", "public void updateNonDynamicFields() {\n\n\t}", "@RequestMapping(value = \"editCategory\", method = RequestMethod.POST)\r\n\tpublic ModelAndView editCategory(@ModelAttribute AdminFormBean formBean) {\r\n\t\tCategory category = formBean.getCategory();\r\n\t\tcategoryService.updateCategory(category);\r\n\t\treturn new ModelAndView(\"redirect:/admin\");\r\n\t}", "public void updateEditService(){\r\n \tMap<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();\r\n\t\tint serviceId = Integer.parseInt(params.get(\"serviceId\"));\r\n\t\tthis.getLog().info(\"serviceId:\" + serviceId);\r\n\t\t\r\n\t\tif(serviceId == 0){\r\n\t\t\teditService = new ServiceDTO();\r\n\t\t}else{\r\n\t\t\tfor (ServiceDTO s : this.getServiceList().getAvailableServiceList()) {\r\n\t\t\t\tif(s.getId() == serviceId){\r\n\t\t\t\t\teditService = s;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "@RequestMapping(\"/showFormForUpdate\")\n\tpublic String showFormForUpdate(@RequestParam(\"personId\") int theId, Model theModel) {\n\t\tPerson thePerson = patientKeeperService.getPerson(theId);\n\n\t\t// set person as a model attribute to pre-populate the form\n\t\ttheModel.addAttribute(\"person\", thePerson);\n\n\t\t// send over to our form\n\t\treturn \"person-form\";\n\t}", "@RequestMapping(value=\"/update\", method = RequestMethod.GET)\n public String conferenceUpdateForm(Model model) {\n model.addAttribute(\"conference\", new Conference());\n return \"admin/updateForm\";\n }", "public void processFormRequest(OAPageContext pageContext, \n OAWebBean webBean) {\n super.processFormRequest(pageContext, webBean);\n CuxDocinfoManageAMImpl pgAM = \n (CuxDocinfoManageAMImpl)pageContext.getRootApplicationModule();\n if (pageContext.getParameter(\"SaveBTN\") != null) {\n pgAM.commit();\n pageContext.putDialogMessage(new OAException(\"保存成功\", \n OAException.INFORMATION));\n HashMap params = new HashMap(1);\n params.put(\"RequeryFlag\", \"Y\");\n pageContext.forwardImmediately(\"OA.jsp?page=/cux/oracle/apps/cux/docinfo/webui/CuxDocinfoManageResultPG\", \n null, \n OAWebBeanConstants.KEEP_MENU_CONTEXT, \n null, params, true, \n OAWebBeanConstants.ADD_BREAD_CRUMB_YES);\n } else if (pageContext.getParameter(\"CancelBTN\") != null) {\n pgAM.rollback();\n pageContext.forwardImmediately(\"OA.jsp?page=/cux/oracle/apps/cux/docinfo/webui/CuxDocinfoManageResultPG\", \n null, \n OAWebBeanConstants.KEEP_MENU_CONTEXT, \n null, null, true, \n OAWebBeanConstants.ADD_BREAD_CRUMB_YES);\n }\n }", "@Override\r\n\t@Transactional\r\n\tpublic FmtEstado update(FmtEstado fmtestado){\r\n\t\tgetSession().update(fmtestado);\r\n\t\treturn fmtestado;\r\n\t}", "int updateByPrimaryKeySelective(AbiFormsForm record);", "public void testNoneScope() throws Exception {\n TestBean testBean = new TestBean();\n boolean exceptionThrown = false;\n \n // valueref in request scope\n // managed bean in none scope\n // this should fail\n getFacesContext().getExternalContext().getRequestMap().put(\n \"TestRefBean\", testBean);\n \n ValueBindingImpl valueBinding = \n new ValueBindingImpl(new ApplicationImpl());\n \n valueBinding.setRef(\"TestRefBean.one\");\n valueBinding.setValue(getFacesContext(), \"one\");\n \n bean = new ManagedBeanBean();\n bean.setManagedBeanClass(beanName);\n bean.setManagedBeanScope(\"none\");\n \n property = new ManagedPropertyBean();\n property.setPropertyName(\"one\");\n property.setValue(\"#{TestRefBean.one}\");\n \n bean.addManagedProperty(property);\n \n mbf = new ManagedBeanFactory(bean);\n \n exceptionThrown = false;\n try {\n mbf.newInstance(getFacesContext());\n fail(\"Should have thrown FacesException\");\n } catch (FacesException ex) {\n exceptionThrown = true;\n }\n assertTrue(exceptionThrown);\n \n //make sure scope is stored properly\n assertTrue(mbf.getScope().equals(\"none\"));\n \n //cleanup\n getFacesContext().getExternalContext().getRequestMap().remove(\n \"TestRefBean\");\n \n // valueref in none scope\n // managed bean in none scope\n // this should pass\n ValueBinding valueBinding1 = \n getFacesContext().getApplication().createValueBinding(\"#{testBean.customerBean.name}\");\n exceptionThrown = false;\n try {\n valueBinding1.getValue(getFacesContext());\n } catch (FacesException ex) {\n exceptionThrown = true;\n }\n assertFalse(exceptionThrown);\n \n }", "private void mostrarEditForm(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint id = Integer.parseInt(request.getParameter(\"id\"));\n\t\tUsuario existingUser = dao.selecionarUsuario(id);\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"usuario-form.jsp\");\n\t\trequest.setAttribute(\"usuario\", existingUser);\n\t\tdispatcher.forward(request, response);\n\t}", "int updateByExample(@Param(\"record\") AbiFormsForm record, @Param(\"example\") AbiFormsFormExample example);", "public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)\r\n {\r\n super.processFormRequest(pageContext, webBean);\r\n }", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "@RequestMapping(\"updat\")\r\n\tpublic String update(Model m) \r\n\t{\n\t\tm.addAttribute(\"update1\",new Employee());\r\n\t\treturn \"update\";//register.jsp==form action=register\r\n\t}", "public DisponibilidadEntity update(DisponibilidadEntity entity) {\r\n\r\n return em.merge(entity);\r\n\r\n }", "public void updateEditParameter(){\r\n \tMap<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();\r\n\t\tint paramId = Integer.parseInt(params.get(\"parameterId\"));\r\n\t\tthis.getLog().info(\"parameterId:\" + paramId);\r\n\t\t\r\n\t\tif(paramId == 0){\r\n\t\t\teditParameter = new AdditionalParametersDTO();\r\n\t\t}else{\r\n\t\t\tfor (AdditionalParametersDTO p : this.getParameterList()) {\r\n\t\t\t\tif(p.getId() == paramId){\r\n\t\t\t\t\teditParameter = p;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "E update(ID id, E entity, RequestContext context);", "public void processFormRequest(OAPageContext pageContext, \n OAWebBean webBean) {\n super.processFormRequest(pageContext, webBean);\n }", "@Override\r\n\tpublic void update(GroupBeds bean) {\n\r\n\t}", "@Override\r\n\tpublic void update(T t) {\n\t\tsuper.getSessionFactory().getCurrentSession().update(t);\r\n\t\tsuper.getSessionFactory().getCurrentSession().flush();\r\n\t}", "@RequestMapping(\"/item/{id}/update\")\n\tpublic ModelAndView showEditForm(@PathVariable(\"id\")Long id) {\n\t\tModelAndView mv = new ModelAndView(\"item-form\");\n\t\tmv.addObject(\"title\", \"Edit item!\"); //1st var is name we wanna call it\n\t\tmv.addObject(\"item\", itemDao.findById(id).orElse(null)); //2nd is data we use over and over again\n\t\t\t\t\n\t\t\t\treturn mv;\n\t\t\n\t}", "public int updateByFormId(FCouncilSummaryDO FCouncilSummary) throws DataAccessException {\n \tif (FCouncilSummary == null) {\n \t\tthrow new IllegalArgumentException(\"Can't update by a null data object.\");\n \t}\n\n\n return getSqlMapClientTemplate().update(\"MS-F-COUNCIL-SUMMARY-UPDATE-BY-FORM-ID\", FCouncilSummary);\n }", "public boolean update(BaseBean baseBean) throws Exception {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic void update(BbsDto dto) {\n\t\t\r\n\t}", "public PtJJdwcy update(PtJJdwcy entity);", "public void updateEmp(Emp emp) {\n\t\t\n\t}", "@Override\r\n\tpublic void update(Cidade obj) {\n\r\n\t}", "public Team update(TeamDTO teamForm) throws TeamNotFoundException;", "public void elSetValue(Object bean, Object value, boolean populate, boolean reference);", "public void modifyFormData(AwardDocumentBean awardDocumentBean) throws CoeusException {\r\n RequesterBean requesterBean = new RequesterBean();\r\n requesterBean.setDataObject(awardDocumentBean);\r\n requesterBean.setFunctionType(MODIFY_AWARD_DOC_DATA);\r\n AppletServletCommunicator appletServletCommunicator = new\r\n AppletServletCommunicator(AWARD_MAINTENANCE_SERVLET, requesterBean);\r\n appletServletCommunicator.send();\r\n ResponderBean responder = appletServletCommunicator.getResponse();\r\n\r\n if ( !responder.isSuccessfulResponse() ){\r\n setOkClicked(false);\r\n dlgAwardUploadDoc.dispose();\r\n CoeusOptionPane.showErrorDialog(responder.getMessage());\r\n throw new CoeusException(responder.getMessage(),0);\r\n }else{\r\n setOkClicked(true);\r\n }\r\n }", "public final void setBean(String bean) {\n this.bean = bean;\n }", "public void updateModel()\n {\n if (beanModel instanceof EnterTillPayrollPayOutBeanModel)\n {\n EnterTillPayrollPayOutBeanModel model = (EnterTillPayrollPayOutBeanModel) beanModel;\n model.setAmount(amountField.getText());\n model.setSelectedReasonCode(reasonCodeField.getSelectedIndex());\n model.setPaidTo(paidToField.getText());\n model.setEmployeeID(employeeIDField.getText());\n model.setAddressLine(0, addressLine1Field.getText());\n model.setAddressLine(1, addressLine2Field.getText());\n model.setAddressLine(2, addressLine3Field.getText());\n model.setSelectedApprovalCodeIndex(approvalCodeField.getSelectedIndex());\n model.setComment(commentField.getText());\n }\n }", "@RequestMapping(value = \"/updatepostback/{oid}\", method = RequestMethod.POST, produces = \"application/json;charset=UTF-8\")\n public @ResponseBody String updatepostback(@PathVariable(\"oid\") AdhocCustomer adhocCustomer, @RequestParam(value = \"bean\",\n required = false) AdhocCustomerBean bean, Model model) {\n this.setAdhocCustomerBean(bean, model);\n return getBeanJson(bean);\n }", "@Override\n\tpublic void updateExam(ExamBean exam) {\n\t\t\n\t}", "public void testValueRefProperty() throws Exception {\n \n TestBean testBean = new TestBean();\n getFacesContext().getExternalContext().getSessionMap().put(\n \"TestRefBean\", testBean);\n \n ValueBindingImpl valueBinding = new\n ValueBindingImpl(new ApplicationImpl());\n \n valueBinding.setRef(\"TestRefBean.one\");\n valueBinding.setValue(getFacesContext(), \"one\");\n \n bean = new ManagedBeanBean();\n bean.setManagedBeanClass(beanName);\n bean.setManagedBeanScope(\"session\");\n \n property = new ManagedPropertyBean();\n property.setPropertyName(\"one\");\n property.setValue(\"#{TestRefBean.one}\");\n bean.addManagedProperty(property);\n \n mbf = new ManagedBeanFactory(bean);\n \n //testing with a property set\n assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));\n \n //make sure bean instantiated properly. Get property back from bean.\n assertTrue(testBean.getOne().equals(\"one\"));\n \n //make sure scope is stored properly\n assertTrue(mbf.getScope().equals(\"session\"));\n \n }", "@Override\r\n\tpublic void update(HttpServletResponse paramHttpServletResponse) {\n\t\t\r\n\t}", "private void syncListFormPage() {\n\t\tif (_listForm != null && _listForm.getDataTable() != null) {\r\n\t\t\tDataStoreBuffer listFormDs = _listForm.getDataStore();\r\n\t\t\tJspDataTable listFormDataTable = _listForm.getDataTable();\r\n\t\t\tif (listFormDs != null && listFormDataTable != null) {\r\n\t\t\t\tif (listFormDs.getRow() != -1) {\r\n\t\t\t\t\tif (!listFormDataTable.isRowOnPage(listFormDs.getRow())) {\r\n\t\t\t\t\t\tlistFormDataTable.setPage(listFormDataTable.getPage(listFormDs.getRow()));\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\tpublic boolean update(Order bean) {\n\t\treturn false;\n\t}", "@RequestMapping(value = \"/editPersona\", method = RequestMethod.GET)\n\tpublic String showFormForUpdate(@RequestParam(\"id_persona\") int id_persona, Model model) {\n\t\tPersona Person = personaService.getPersona(id_persona);\n\t\tmodel.addAttribute(\"Person\", Person);\n\t\treturn \"editPersona\";\n\t}", "public void updateByEntity(Paciente paciente) {\n\t\n}", "@Override\n\tpublic void update(Object o) {\n\n\t}", "@Override\n\tpublic void update(Object o) {\n\n\t}", "@GetMapping(\"/showFormForUpdate\")\r\n\tpublic String showFormForUpdate(@RequestParam(\"customerId\") int id, Model theModel){\n\t\tCustomer theCustomer = customerService.getCustomer(id);\r\n\t\t\r\n\t\t//set customer as model attribute to pre-populate\r\n\t\ttheModel.addAttribute(\"customer\",theCustomer);\r\n\t\t\r\n\t\t//send over to our form\r\n\t\treturn \"customer-form\";\r\n\t}", "protected void updateForm() {\n //Set the number of contacts\n Long numContacts = myContactList.rowCount();\n this.textContactWorld.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Africa\");\n this.textContactAfrica.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Americas\");\n this.textContactAmericas.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Asia\");\n this.textContactAsia.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Australasia\");\n this.textContactAustralasia.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Europe\");\n this.textContactEurope.setText(String.valueOf(numContacts));\n\n }", "protected void edit(HttpServletRequest request, HttpServletResponse response, CleanerServiceItemForm _CleanerServiceItemForm, CleanerServiceItem _CleanerServiceItem) throws Exception{\n\r\n m_logger.debug(\"Before update \" + CleanerServiceItemDS.objectToString(_CleanerServiceItem));\r\n\r\n _CleanerServiceItem.setServiceId(WebParamUtil.getLongValue(_CleanerServiceItemForm.getServiceId()));\r\n\r\n\r\n _CleanerServiceItem.setServiceItemId(WebParamUtil.getLongValue(_CleanerServiceItemForm.getServiceItemId()));\r\n\r\n\r\n _CleanerServiceItem.setItemType(WebParamUtil.getIntegerValue(_CleanerServiceItemForm.getItemType()));\r\n\r\n\r\n _CleanerServiceItem.setTitle(WebParamUtil.getStringValue(_CleanerServiceItemForm.getTitle()));\r\n\r\n\r\n _CleanerServiceItem.setImagePath(WebParamUtil.getStringValue(_CleanerServiceItemForm.getImagePath()));\r\n\r\n\r\n _CleanerServiceItem.setImagePathLocal(WebParamUtil.getStringValue(_CleanerServiceItemForm.getImagePathLocal()));\r\n\r\n\r\n _CleanerServiceItem.setBasePrice(WebParamUtil.getDoubleValue(_CleanerServiceItemForm.getBasePrice()));\r\n\r\n\r\n _CleanerServiceItem.setNote(WebParamUtil.getStringValue(_CleanerServiceItemForm.getNote()));\r\n\r\n\r\n\r\n m_actionExtent.beforeUpdate(request, response, _CleanerServiceItem);\r\n m_ds.update(_CleanerServiceItem);\r\n m_actionExtent.afterUpdate(request, response, _CleanerServiceItem);\r\n m_logger.debug(\"After update \" + CleanerServiceItemDS.objectToString(_CleanerServiceItem));\r\n }", "@Override\n\tpublic void update(Object entidade) {\n\t\t\n\t}", "protected void edit(HttpServletRequest request, HttpServletResponse response, EcAnonymousPaymentInfoForm _EcAnonymousPaymentInfoForm, EcAnonymousPaymentInfo _EcAnonymousPaymentInfo) throws Exception{\n\r\n _EcAnonymousPaymentInfo.setAnonymousUserId(WebParamUtil.getLongValue(_EcAnonymousPaymentInfoForm.getAnonymousUserId()));\r\n _EcAnonymousPaymentInfo.setFirstName(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getFirstName()));\r\n _EcAnonymousPaymentInfo.setMiddleInitial(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getMiddleInitial()));\r\n _EcAnonymousPaymentInfo.setLastName(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getLastName()));\r\n _EcAnonymousPaymentInfo.setAddress1(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getAddress1()));\r\n _EcAnonymousPaymentInfo.setAddress2(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getAddress2()));\r\n _EcAnonymousPaymentInfo.setCity(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getCity()));\r\n _EcAnonymousPaymentInfo.setState(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getState()));\r\n _EcAnonymousPaymentInfo.setZip(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getZip()));\r\n _EcAnonymousPaymentInfo.setCountry(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getCountry()));\r\n _EcAnonymousPaymentInfo.setPaymentType(WebParamUtil.getIntValue(_EcAnonymousPaymentInfoForm.getPaymentType()));\r\n _EcAnonymousPaymentInfo.setPaymentNum(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getPaymentNum()));\r\n _EcAnonymousPaymentInfo.setPaymentExpireMonth(WebParamUtil.getIntValue(_EcAnonymousPaymentInfoForm.getPaymentExpireMonth()));\r\n _EcAnonymousPaymentInfo.setPaymentExpireYear(WebParamUtil.getIntValue(_EcAnonymousPaymentInfoForm.getPaymentExpireYear()));\r\n _EcAnonymousPaymentInfo.setPaymentExtraNum(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getPaymentExtraNum()));\r\n _EcAnonymousPaymentInfo.setTimeCreated(WebParamUtil.getDateValue(_EcAnonymousPaymentInfoForm.getTimeCreated()));\r\n\r\n m_actionExtent.beforeUpdate(request, response, _EcAnonymousPaymentInfo);\r\n m_ds.update(_EcAnonymousPaymentInfo);\r\n m_actionExtent.afterUpdate(request, response, _EcAnonymousPaymentInfo);\r\n }", "int updateByExampleSelective(@Param(\"record\") AbiFormsForm record, @Param(\"example\") AbiFormsFormExample example);", "@Override\n\tpublic PageForm formBackingObject(HttpServletRequest request) throws Exception { \n\n \tHttpSession session = request.getSession();\n \tPageForm theForm = (PageForm) super.formBackingObject(request);\n setPageMessage(session, theForm);\n return theForm;\n }", "public void setForm(boolean form);", "@GetMapping(\"/updatePharmacist\")\n public String pharmacistFormUpdate(Model model) {\n model.addAttribute(\"pharmacist\", new Pharmacist());\n return \"updatePharmacist\";\n }", "public String updateEmpregado() {\n this.empregadosFacade.edit(this.empregado);\n updateMB(empregado);\n\n return \"areaPessoal.xhtml?faces-redirect=true\";\n }", "public ActionForward updateJqcsh(ActionMapping mapping, ActionForm form,\n\t\t\t\tHttpServletRequest request, HttpServletResponse response) {\n\t\t\tString jqbh=request.getParameter(\"jqbh\");\n\t\t\tString sql=\"update skq_jqxx set cshsj=null where jqbh='\"+jqbh+\"'\";\n\t\t\tQuery.updateField(sql);\n\t\t\tString nsrwjbm = request.getParameter(\"nsrwjbm\");\n\t\t\tNsrxx nsrxx = new Nsrxx(nsrwjbm);\n\t\t\trequest.setAttribute(\"nsrxx\", nsrxx);\n\t\t\treturn mapping.findForward(\"isExist\");\n\t\t\t \n\t\t}", "public void setDirty(boolean value){this.dirty = value;}", "private void showEditForm(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int id = Integer.parseInt(request.getParameter(\"id\"));\n Customer customerEdit = CustomerDao.getCustomer(id);\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"customer/editCustomer.jsp\");\n dispatcher.forward(request, response);\n }", "@Override\r\n\tpublic void ConfigurationUpdated(Configuration configuration) {\n\t\t\r\n\t\twhile (form == null);\r\n\t\tform.UpdateConfiguration(configuration);\r\n\t}", "@Override\n\tpublic void update(CardRule bean) {\n\n\t}", "@Override\n public void update(Promocion prm) {\n promocionRepository.update(prm);\n }", "@Override\n\tprotected void doUpdate(Session session) {\n\n\t}", "@RequestMapping(path=\"/actualizaFormulario\")\r\n public String viewUpdateForm(@RequestParam(name=\"id\")int id,Model model)\r\n {\n \tProducto producto=productoDAO.getProducto(id);\r\n \t//Introducimos el producto en el modelo\r\n \tmodel.addAttribute(\"producto\", producto);\r\n \t//Llamamos al formulario de actualizacion\r\n \treturn \"formularioProducto2\";\r\n }" ]
[ "0.63765615", "0.61203414", "0.59799063", "0.5944499", "0.5728281", "0.5674731", "0.5575208", "0.5536834", "0.5462775", "0.54298043", "0.54112214", "0.54101825", "0.53257203", "0.5325689", "0.53218347", "0.53195626", "0.53071475", "0.52727133", "0.52724105", "0.5219517", "0.5217784", "0.52175814", "0.5215171", "0.5201204", "0.517085", "0.5161304", "0.51251936", "0.5124295", "0.5113768", "0.510559", "0.5082031", "0.50673616", "0.503599", "0.5032197", "0.50118124", "0.5006707", "0.5004997", "0.5002445", "0.5002008", "0.50011444", "0.49968112", "0.499389", "0.49737126", "0.4969434", "0.49643412", "0.49467546", "0.49418166", "0.49394232", "0.4937027", "0.49236578", "0.49211252", "0.49192265", "0.49012026", "0.48914117", "0.48908895", "0.48895764", "0.48846772", "0.4881893", "0.48807156", "0.48802474", "0.4873447", "0.486928", "0.486145", "0.485414", "0.4852664", "0.48518628", "0.4849633", "0.48487765", "0.48480788", "0.48457238", "0.48301947", "0.48245078", "0.4813527", "0.48031554", "0.48004314", "0.47868767", "0.47858512", "0.478222", "0.478064", "0.47780007", "0.47771916", "0.47771916", "0.47771016", "0.4775439", "0.4774175", "0.47681823", "0.47680095", "0.47652066", "0.47646734", "0.4763621", "0.4763347", "0.47606283", "0.47572163", "0.47558296", "0.475393", "0.4751342", "0.47502452", "0.47479758", "0.4747496", "0.47457895" ]
0.65808105
0
NEW: added by Jaap Lookup the key name corresponding to the client request's locale. This method is overwritten here because the key names are hardcoded in the global forwards of the strutsconfig.xml file. This in turn is required to make the StrutsMenu tags work (amongst others). Whatever the reason, this hardcoding is breaking the default i18nmechanism used by the LookupDispatchAction finds the Actionmethod name. What I am doing now is to first call the LookupDispatchAction.getLookupMapName method, catching any ServletException that might arise. There are two reasons why getLookupMapName would throw an exception: first because the keyName cannot be found in the resourcebundle associated with the User's Localea and second because no method name is specified for the corresponding key. We're only interested in the first exception, but catching the second doesn't do any harm, it will just get rethrown.
protected String getLookupMapName(HttpServletRequest request, String keyName, ActionMapping mapping) throws ServletException { if (log.isDebugEnabled()) { log.debug("BaseAction: getLookupMapName( keyName = " + keyName + " )"); } String methodName = null; try { this.setLocale(request, request.getLocale()); // MR - added to // default to JSTL methodName = super.getLookupMapName(request, keyName, mapping); } catch (ServletException ex) { if (log.isDebugEnabled()) { log .debug("BaseAction: keyName not found in resource bundle with locale " + request.getLocale()); } // the keyname is not available in the resource bundle associated // with the user's locale // --> get find the key name in the default locale's resource bundle if (defaultKeyNameKeyMap == null) { defaultKeyNameKeyMap = this.initDefaultLookupMap(request); } // Find the key for the resource String key = (String) defaultKeyNameKeyMap.get(keyName); if (key == null) { if (log.isDebugEnabled()) { log.debug("keyName '" + keyName + "' not found in resource bundle with locale " + request.getLocale()); } return keyName; //String message = messages.getMessage("dispatch.resource", // mapping.getPath(), keyName); //throw new ServletException(message); } // Find the method name methodName = (String) keyMethodMap.get(key); if (methodName == null) { String message = messages.getMessage("dispatch.lookup", mapping .getPath(), key); throw new ServletException(message); } } return methodName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Map initDefaultLookupMap(HttpServletRequest request) {\r\n\t\tMap lookupMap = new HashMap();\r\n\t\tthis.keyMethodMap = this.getKeyMethodMap();\r\n\r\n\t\tModuleConfig moduleConfig = (ModuleConfig) request\r\n\t\t\t\t.getAttribute(Globals.MODULE_KEY);\r\n\r\n\t\tMessageResourcesConfig[] mrc = moduleConfig\r\n\t\t\t\t.findMessageResourcesConfigs();\r\n\r\n\t\t// Look through all module's MessageResources\r\n\t\tfor (int i = 0; i < mrc.length; i++) {\r\n\t\t\tMessageResources resources = this.getResources(request, mrc[i]\r\n\t\t\t\t\t.getKey());\r\n\r\n\t\t\t// Look for key in MessageResources\r\n\t\t\tIterator iter = this.keyMethodMap.keySet().iterator();\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\tString key = (String) iter.next();\r\n\t\t\t\tString text = resources.getMessage(Locale.ENGLISH, key);\r\n\r\n\t\t\t\t// Found key and haven't added to Map yet, so add the text\r\n\t\t\t\tif ((text != null) && !lookupMap.containsKey(text)) {\r\n\t\t\t\t\tlookupMap.put(text, key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn lookupMap;\r\n\t}", "private String getDisplayNameI18N() throws JspException {\n Object args[] = new Object[5];\n args[0] = arg0;\n args[1] = arg1;\n args[2] = arg2;\n args[3] = arg3;\n args[4] = arg4;\n\n\n if (getKey() == null) {\n\n Object o = null;\n\n if (getScope().equals(\"session\")) {\n\n o = pageContext.getAttribute(getName(), pageContext.SESSION_SCOPE);\n\n } else if (getScope().equals(\"request\")) {\n\n o = pageContext.getAttribute(getName(), pageContext.REQUEST_SCOPE);\n\n } else if (getScope().equals(\"page\")) {\n\n o = pageContext.getAttribute(getName(), pageContext.PAGE_SCOPE);\n\n }\n\n if (o != null) {\n\n try {\n\n String _property = getProperty();\n String innerPropertyName, innerGetterName;\n Method _method;\n\n while (_property.indexOf(\".\") > 0) {\n\n innerPropertyName = _property.substring(0, _property.indexOf(\".\"));\n innerGetterName = \"get\" + innerPropertyName.substring(0,1).toUpperCase() + innerPropertyName.substring(1);\n\n _method = o.getClass().getMethod(innerGetterName, null);\n\n o = _method.invoke(o, null);\n\n _property = _property.substring(_property.indexOf(\".\") +1);\n }\n\n String getterName = \"get\" + _property.substring(0,1).toUpperCase() + _property.substring(1);\n\n Method method = o.getClass().getMethod(getterName, null);\n\n if (method.getReturnType() == String.class) {\n String messageKey = (String)method.invoke(o, null);\n\n setKey(messageKey);\n }\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (SecurityException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n }\n }\n\n // Retrieve the message string we are looking for\n String message = RequestUtils.message(pageContext, this.bundle,\n this.localeKey, this.key, args);\n if (message == null) {\n message = key;\n }\n\n return message;\n }", "String getLookupKey();", "@Override\n\tprotected String getLookupKey(PortletRequest request) throws Exception {\n\t\treturn request.getParameter(this.parameterName);\n\t}", "public abstract String getLocalizationKey();", "public Map getKeyMethodMap() {\r\n\t\tMap map = new HashMap();\r\n\r\n\t\tString pkg = this.getClass().getPackage().getName();\r\n\t\tResourceBundle methods = ResourceBundle.getBundle(pkg\r\n\t\t\t\t+ \".LookupMethods\");\r\n\r\n\t\tEnumeration keys = methods.getKeys();\r\n\r\n\t\twhile (keys.hasMoreElements()) {\r\n\t\t\tString key = (String) keys.nextElement();\r\n\t\t\tmap.put(key, methods.getString(key));\r\n\t\t}\r\n\r\n\t\treturn map;\r\n\t}", "public static String lookup(String baseName, String key, Object args,\r\n Locale locale)\r\n {\r\n return lookup(baseName, key, args, locale, null);\r\n }", "public String getName() {\n return I18nUtil.getBundle().getString(\"CTL_I18nAction\");\n }", "protected String getKeyAndLookupInBundle(FacesContext context,\n \t\t\t\t\t UIComponent component, \n \t\t\t\t\t String keyAttr) throws MissingResourceException{\n \tString key = null, bundleName = null;\n \tResourceBundle bundle = null;\n \n \tParameterCheck.nonNull(context);\n \tParameterCheck.nonNull(component);\n \tParameterCheck.nonNull(keyAttr);\n \n key = (String) component.getAttribute(keyAttr);\n bundleName = (String)component.getAttribute(RIConstants.BUNDLE_ATTR);\n \n // if the bundleName is null for this component, it might have\n // been set on the root component.\n if ( bundleName == null ) {\n UIComponent root = context.getTree().getRoot();\n Assert.assert_it(root != null);\n bundleName = (String)root.getAttribute(RIConstants.BUNDLE_ATTR);\n }\n \t// verify our component has the proper attributes for key and bundle.\n \tif (null == key || null == bundleName) {\n \t throw new MissingResourceException(Util.getExceptionMessage(\n Util.MISSING_RESOURCE_ERROR_MESSAGE_ID),bundleName, key);\n \t}\n \t\n \t// verify the required Class is loadable\n \t// PENDING(edburns): Find a way to do this once per ServletContext.\n \tif (null == Thread.currentThread().getContextClassLoader().\n \t getResource(\"javax.servlet.jsp.jstl.fmt.LocalizationContext\")){\n \t Object [] params = { \"javax.servlet.jsp.jstl.fmt.LocalizationContext\" };\n \t throw new MissingResourceException(Util.getExceptionMessage(Util.MISSING_CLASS_ERROR_MESSAGE_ID, params), bundleName, key);\n \t}\n \t\n \t// verify there is a ResourceBundle for this modelReference\n \tjavax.servlet.jsp.jstl.fmt.LocalizationContext locCtx = null;\n \tif (null == (locCtx = (javax.servlet.jsp.jstl.fmt.LocalizationContext) \n \t\t context.getModelValue(bundleName)) ||\n \t null == (bundle = locCtx.getResourceBundle())) {\n \t throw new MissingResourceException(Util.getExceptionMessage(Util.MISSING_RESOURCE_ERROR_MESSAGE_ID), bundleName, key);\n \t}\n \t\n \treturn bundle.getString(key);\n }", "@Override\n protected String handleGetExceptionKey()\n {\n\n final String type = this.getExceptionType();\n final int dotIndex = type.lastIndexOf(\".\");\n\n // the dot may not be the last character\n return StringUtilsHelper.toResourceMessageKey((dotIndex < (type.length() - 1)) ? type.substring(dotIndex + 1) : type);\n\n }", "protected String toDisplayString(final String name, final Locale locale) {\n try {\n return ResourceBundle.getBundle(name, locale).getString(key);\n } catch (ClassCastException | MissingResourceException ignored) {\n return key; // return the non-localized key\n }\n }", "@Override\n\tprotected Object getCacheKey(String viewName, Locale locale) {\n\t\treturn viewName;\n\t}", "public String getLocalizedName() {\n return resourceMap.getString(getLocalizationKey());\n }", "protected String getKeymapName() {\n String nm = getClass().getName();\n int index = nm.lastIndexOf('.');\n if (index >= 0) {\n nm = nm.substring(index+1);\n }\n return nm;\n }", "public static String getLabel(String key){\r\n \tFacesContext context = FacesContext.getCurrentInstance();\r\n \tString el = String.format(\"#{%s['%s']}\", Constantes.RESOURCE_BUNDLE_VAR,key);\r\n return context.getApplication().evaluateExpressionGet(context, el, String.class);\r\n }", "public static String lookup(String baseName, String key)\r\n {\r\n return lookup(baseName, key, null, null, null);\r\n }", "public Object get(Object key)\r\n\t{\r\n\r\n\t\tint index;\r\n\t\tString orDefault = null;\r\n\t\tString k = (String) key;\r\n\t\tif ((index = k.indexOf(DEFAULT_ID)) > 0) {\r\n\t\t\torDefault = k.substring(index+DEFAULT_ID.length());\r\n\t\t\tk = k.substring(0,index);\r\n\t\t\tkey = k;\r\n\t\t}\r\n\t\tValidate.notEmpty(k, \"Empty key passed as parameter for call to get(key)\");\r\n\t\tif ((index = k.indexOf(':')) > 0 && index < k.length() - 1) {\r\n\t\t\tif (index == LANG_REF.length() && k.startsWith(LANG_REF)) {\r\n\t\t\t\treturn new LanguageLocale().getLang(this,k);\r\n\t\t\t} else if (index == REPLACE_REF.length() && k.startsWith(REPLACE_REF)) {\r\n\t\t\t\treturn org.xmlactions.action.utils.StringUtils.replace(this, replace(k));\r\n\t\t\t} else if (index == THEME_REF.length() && k.startsWith(THEME_REF)) {\r\n\t\t\t\treturn getThemeValueQuietly(k.substring(index + 1));\r\n\t\t\t} else if (index == APPLICATIONCONTEXT_REF.length() && k.startsWith(APPLICATIONCONTEXT_REF)) {\r\n\t\t\t\treturn getApplicationContext().getBean(k.substring(index + 1));\r\n\t\t\t} else if (index == CODE_REF.length() && k.startsWith(CODE_REF)) {\r\n\t\t\t\tCodeParser codeParser = new CodeParser();\r\n\t\t\t\treturn codeParser.parseCode(this, k.substring(index + 1));\r\n\t\t\t} else {\r\n\t\t\t\tMap<String, Object> map = getMap(k.substring(0, index));\r\n\t\t\t\tif (map != null) {\r\n\t\t\t\t\tString [] keys = k.substring(index + 1).split(\"/\");\r\n\t\t\t\t\tfor (int keyIndex = 0 ; keyIndex < keys.length; keyIndex++ ) {\r\n\t\t\t\t\t\tk = keys[keyIndex];\r\n\t\t\t\t\t\tObject obj = map.get(k);\r\n\t\t\t\t\t\tif (obj != null && obj instanceof String) {\r\n\t String s = (String)obj;\r\n\t if (s.startsWith(\"${\") && s.indexOf(k) == 2) {\r\n\t obj = \"[\" + k + \"]\";\r\n\t } else {\r\n\t obj = replace((String)obj);\r\n\t }\r\n\t\t\t\t\t\t} else if (obj == null){\r\n\t\t\t\t\t\t\tobj = orDefault;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(keyIndex+1 >= keys.length) {\r\n\t\t\t\t\t\t\treturn obj;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (obj instanceof Map) {\r\n\t\t\t\t\t\t\tmap = (Map)obj;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\treturn obj;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn orDefault;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tString [] keys = k.split(\"/\");\r\n\t\t\tObject obj = null;\r\n\t\t\tMap map = null;\r\n\t\t\tfor (int keyIndex = 0 ; keyIndex < keys.length; keyIndex++ ) {\r\n\t\t\t\tk = keys[keyIndex];\r\n\r\n\t\t\t\tif (keyIndex == 0) {\r\n\t\t\t\t\tif (rootMap.containsKey(k)) {\r\n\t\t\t\t\t\tobj = rootMap.get(k);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tif (applicationContext != null) {\r\n\t\t\t\t\t\t\t\tobj = applicationContext.getBean((String)k);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (Throwable t) {\r\n\t\t log.info(t.getMessage());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (map.containsKey(k)) {\r\n\t\t\t\t\t\tobj = map.get(k);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (obj != null && obj instanceof String) {\r\n\t\t\t\t\tobj = replace((String)obj);\r\n\t\t\t\t} else if (obj == null){\r\n\t\t\t\t\tobj = orDefault;\r\n\t\t\t\t}\r\n\t\t\t\tif(keyIndex+1 >= keys.length) {\r\n\t\t\t\t\treturn obj;\r\n\t\t\t\t}\r\n\t\t\t\tif (obj instanceof Map) {\r\n\t\t\t\t\tmap = (Map)obj;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn obj;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn orDefault;\r\n\t\t}\r\n\t}", "public String getString( String key )\n {\n String translation = key;\n\n if ( specificResourceBundle != null )\n {\n try\n {\n translation = specificResourceBundle.getString( key );\n }\n catch ( MissingResourceException ignored )\n {\n }\n }\n\n if ( translation.equals( key ) && globalResourceBundle != null )\n {\n try\n {\n translation = globalResourceBundle.getString( key );\n }\n catch ( MissingResourceException ignored )\n {\n }\n }\n\n return translation;\n }", "public String getKey(Request request) {\n // Let's see if we already have a binding for this request:\n try{\n ToHeader toHeader=(ToHeader)request.getHeader(ToHeader.NAME);\n Address address=null;\n address = toHeader.getAddress();\n \n javax.sip.address.URI cleanedUri;\n if (address==null) {\n cleanedUri= getCleanUri(request.getRequestURI());\n }\n else {\n // We have to build the key, all\n // URI parameters MUST be removed:\n cleanedUri = getCleanUri(address.getURI());\n }\n String keyresult=cleanedUri.toString();\n\n return keyresult.toLowerCase();\n } catch(Exception ex) {\n\t if (ProxyDebug.debug) {\n ProxyDebug.println(\"Registrar, hasDomainRegistered(), internal error, \"+\n \"exception raised:\");\n ProxyDebug.logException(ex);\n }\n return null;\n }\n }", "String lookupKey(String key) throws CommunicationFailureException, TimeoutReachedException, NoSuccessorsExceptions;", "public String getActionLabel(String actionName) {\r\n try {\r\n Action action = processModel.getAction(actionName);\r\n if (action == null)\r\n return actionName;\r\n \r\n else\r\n return action.getLabel(currentRole, getLanguage());\r\n } catch (WorkflowException we) {\r\n return actionName;\r\n }\r\n }", "public abstract String getMachineUnlocalizedName();", "public String getUnicodeLocaleType(String key) {\n/* 1032 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static String getLabelBundle(String key){\r\n \tFacesContext context = FacesContext.getCurrentInstance();\r\n \tResourceBundle bundle = context.getApplication().getResourceBundle(context, Constantes.RESOURCE_BUNDLE_VAR);\r\n \treturn bundle.getString(key);\r\n }", "protected String getEntryName( HttpServletRequest request )\n {\n return (String) request.getParameter( ENTRY_NAME_HTTP_PARAM );\n }", "public String getLanguageKey();", "String lookupKeyBasic(String key) throws CommunicationFailureException, TimeoutReachedException, NoSuccessorsExceptions;", "private ApplicationActionMap getAppActionMap() {\n\t\treturn Application.getInstance().getContext().getActionMap(this);\n\t}", "protected abstract void initKeyNameMapping(Context context, HashMap<String, RemoteKey> keyMapping);", "public static String getString(String key, ResourceBundle resourceBundle) {\n if (resourceBundle == null) {\n return KEY_NOT_FOUND_PREFIX + key + KEY_NOT_FOUND_SUFFIX;\n }\n log.debug(\"Getting key\" + key + \"in\" + resourceBundle.toString()); //$NON-NLS-1$ //$NON-NLS-2$\n try {\n return resourceBundle.getString(key);\n } catch (MissingResourceException e) {\n return KEY_NOT_FOUND_PREFIX + key + KEY_NOT_FOUND_SUFFIX;\n }\n }", "protected ICUResourceBundle findResource(String key, String resPath, int _resource, HashMap<String, String> table, UResourceBundle requested)\n/* */ {\n/* 1150 */ ClassLoader loaderToUse = this.loader;\n/* 1151 */ String locale = null;String keyPath = null;\n/* */ \n/* 1153 */ String rpath = getAliasValue(_resource);\n/* 1154 */ if (table == null) {\n/* 1155 */ table = new HashMap();\n/* */ }\n/* 1157 */ if (table.get(rpath) != null) {\n/* 1158 */ throw new IllegalArgumentException(\"Circular references in the resource bundles\");\n/* */ }\n/* */ \n/* 1161 */ table.put(rpath, \"\");\n/* 1162 */ String bundleName; if (rpath.indexOf('/') == 0) {\n/* 1163 */ int i = rpath.indexOf('/', 1);\n/* 1164 */ int j = rpath.indexOf('/', i + 1);\n/* 1165 */ String bundleName = rpath.substring(1, i);\n/* 1166 */ if (j < 0) {\n/* 1167 */ locale = rpath.substring(i + 1);\n/* */ \n/* */ \n/* 1170 */ keyPath = resPath;\n/* */ } else {\n/* 1172 */ locale = rpath.substring(i + 1, j);\n/* 1173 */ keyPath = rpath.substring(j + 1, rpath.length());\n/* */ }\n/* */ \n/* 1176 */ if (bundleName.equals(\"ICUDATA\")) {\n/* 1177 */ bundleName = \"com/ibm/icu/impl/data/icudt48b\";\n/* 1178 */ loaderToUse = ICU_DATA_CLASS_LOADER;\n/* 1179 */ } else if (bundleName.indexOf(\"ICUDATA\") > -1) {\n/* 1180 */ int idx = bundleName.indexOf('-');\n/* 1181 */ if (idx > -1) {\n/* 1182 */ bundleName = \"com/ibm/icu/impl/data/icudt48b/\" + bundleName.substring(idx + 1, bundleName.length());\n/* 1183 */ loaderToUse = ICU_DATA_CLASS_LOADER;\n/* */ }\n/* */ }\n/* */ }\n/* */ else {\n/* 1188 */ int i = rpath.indexOf('/');\n/* 1189 */ if (i != -1) {\n/* 1190 */ locale = rpath.substring(0, i);\n/* 1191 */ keyPath = rpath.substring(i + 1);\n/* */ } else {\n/* 1193 */ locale = rpath;\n/* */ \n/* */ \n/* 1196 */ keyPath = resPath;\n/* */ }\n/* 1198 */ bundleName = this.baseName;\n/* */ }\n/* 1200 */ ICUResourceBundle bundle = null;\n/* 1201 */ ICUResourceBundle sub = null;\n/* 1202 */ if (bundleName.equals(\"LOCALE\")) {\n/* 1203 */ bundleName = this.baseName;\n/* 1204 */ keyPath = rpath.substring(\"LOCALE\".length() + 2, rpath.length());\n/* 1205 */ locale = ((ICUResourceBundle)requested).getLocaleID();\n/* */ \n/* */ \n/* 1208 */ bundle = (ICUResourceBundle)getBundleInstance(bundleName, locale, loaderToUse, false);\n/* 1209 */ if (bundle != null) {\n/* 1210 */ sub = findResourceWithFallback(keyPath, bundle, null);\n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* */ \n/* */ \n/* 1223 */ if (locale == null)\n/* */ {\n/* 1225 */ bundle = (ICUResourceBundle)getBundleInstance(bundleName, \"\", loaderToUse, false);\n/* */ }\n/* */ else {\n/* 1228 */ bundle = (ICUResourceBundle)getBundleInstance(bundleName, locale, loaderToUse, false);\n/* */ }\n/* */ \n/* */ \n/* 1232 */ StringTokenizer st = new StringTokenizer(keyPath, \"/\");\n/* 1233 */ ICUResourceBundle current = bundle;\n/* 1234 */ while (st.hasMoreTokens()) {\n/* 1235 */ String subKey = st.nextToken();\n/* 1236 */ sub = (ICUResourceBundle)current.get(subKey, table, requested);\n/* 1237 */ if (sub == null) {\n/* */ break;\n/* */ }\n/* 1240 */ current = sub;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1248 */ if (sub == null) {\n/* 1249 */ throw new MissingResourceException(this.localeID, this.baseName, key);\n/* */ }\n/* 1251 */ return sub;\n/* */ }", "@Override\n protected void populateLocalisationMap() {\n localisationKeyConstantToKeyMap.put(ADDRESSES_TITLE, \"receiveBitcoinPanel.receivingAddressesTitle\"); \n localisationKeyConstantToKeyMap.put(CREATE_NEW_TOOLTIP, \"createOrEditAddressAction.createReceiving.tooltip\"); \n }", "public static String getName(String localeID) {\n/* 350 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private String getKey (String keyBase, Object field)\n\t{\n\t\treturn ((field == null) ? keyBase : (keyBase + \"_related\"));\t//NOI18N\n\t}", "public static String getRequestActionName(HttpServletRequest request) {\n return request.getRequestURI().split(\"/\")[request.getRequestURI().split(\"/\").length - 1].split(\"-\")[0].split(\n \".html\")[0];\n }", "public static String lookup(String baseName, String key, Object args)\r\n {\r\n return lookup(baseName, key, args, null, null);\r\n }", "public interface MenuNames {\n public static final String FILE = I18N.get(\"ui.MenuNames.FILE\");\n public static final String FILE_NEW = I18N.get(\"ui.MenuNames.FILE.NEW\");\n public static final String FILE_SAVEVIEW = I18N.get(\"ui.MenuNames.FILE.SAVEVIEW\");\n public static final String EDIT = I18N.get(\"ui.MenuNames.EDIT\");\n public static final String TOOLS_EDIT_ATTRIBUTES = I18N.get(\"ui.MenuNames.EDIT\") + \" \" + I18N.get(\"ui.MenuNames.ATTRIBUTS\");\n public static final String TOOLS_EDIT_GEOMETRY = I18N.get(\"ui.MenuNames.EDIT\") + \" \" + I18N.get(\"ui.MenuNames.GEOMETRY\");\n public static final String VIEW = I18N.get(\"ui.MenuNames.VIEW\");\n public static final String MAP_DECORATIONS = I18N.get(\"ui.MenuNames.VIEW.MAP_DECORATIONS\");\n public static final String LAYER = I18N.get(\"ui.MenuNames.LAYER\");\n public static final String TOOLS = I18N.get(\"ui.MenuNames.TOOLS\");\n //public static final String TOOLS_ADVANCED = I18N.get(\"ui.MenuNames.TOOLS.ADVANCED\"); // not used, not translated\n public static final String TOOLS_ANALYSIS = I18N.get(\"ui.MenuNames.TOOLS.ANALYSIS\");\n public static final String TOOLS_GENERALIZATION = I18N.get(\"ui.MenuNames.TOOLS.GENERALIZATION\");\n public static final String TOOLS_GENERATE = I18N.get(\"ui.MenuNames.TOOLS.GENERATE\");\n public static final String TOOLS_JOIN = I18N.get(\"ui.MenuNames.TOOLS.JOIN\");\n public static final String TOOLS_QA = I18N.get(\"ui.MenuNames.TOOLS.QA\");\n public static final String TOOLS_WARP = I18N.get(\"ui.MenuNames.TOOLS.WARP\");\n //public static final String TOOLS_PROGRAMMING =I18N.get(\"ui.MenuNames.TOOLS.PROGRAMMING\");\n public static final String TOOLS_QUERIES =I18N.get(\"org.openjump.core.ui.plugin.queries.SimpleQuery.menu\");\n public static final String WINDOW = I18N.get(\"ui.MenuNames.WINDOW\");\n public static final String RASTERTOOLS = I18N.get(\"ui.MenuNames.RASTER\");\n // Michael Michaud 2008-04-06\n // New menu for synchronization\n public static final String WINDOW_SYNCHRONIZATION = I18N.get(\"ui.MenuNames.WINDOW.SYNCHRONIZATION\");\n public static final String HELP = I18N.get(\"ui.MenuNames.HELP\");\n public static final String PLUGINS = I18N.get(\"ui.MenuNames.PLUGINS\");\n \n // Michael Michaud 2007-03-23\n // New menu for plugin manager, beanshell console, scripts\n public static final String CUSTOMIZE = I18N.get(\"ui.MenuNames.CUSTOMIZE\");\n \n //erwan begin 2005-12-01 --- SIGLE\t\n //Menu\n public static final String ATTRIBUTS = I18N.get(\"ui.MenuNames.ATTRIBUTS\");\n public static final String SELECTION = I18N.get(\"ui.MenuNames.SELECTION\");\n public static final String RASTER = I18N.get(\"ui.MenuNames.RASTER\");\n public static final String STATISTICS = I18N.get(\"ui.MenuNames.STATISTICS\");\n public static final String GEOPROCESSING = \"SIGLE-\" + I18N.get(\"ui.MenuNames.GEOPROCESSING\");\n \n //Submenu\n //public static final String ONELAYER = I18N.get(\"ui.MenuNames.ONELAYER\");\n //public static final String TWOLAYERS = I18N.get(\"ui.MenuNames.TWOLAYERS\");\n \n public static final String CONVERT = I18N.get(\"ui.MenuNames.CONVERT\");\n public static final String EXTRACT = I18N.get(\"ui.MenuNames.EXTRACT\");\n public static final String MERGE = I18N.get(\"ui.MenuNames.MERGE\");\n public static final String GENERALIZATION = I18N.get(\"ui.MenuNames.GENERALIZATION\");\n public static final String TOPOLOGY = I18N.get(\"ui.MenuNames.TOPOLOGY\");\n //public static final String QA = I18N.get(\"ui.MenuNames.QA\"); // see MenuNames.TOOLS_QA\n public static final String DELETE = I18N.get(\"ui.MenuNames.DELETE\");\n public static final String DETECT = I18N.get(\"ui.MenuNames.DETECT\");\n public static final String PLOT = I18N.get(\"ui.MenuNames.PLOT\");\n \t\n //\terwan end 2005-12-01\n // Submenus for LayerName PopupMenu\n public static final String STYLE = I18N.get(\"ui.MenuNames.STYLE\");\n public static final String DATASTORE = I18N.get(\"ui.MenuNames.DATASTORE\");\n public static final String SCHEMA = I18N.get(\"ui.MenuNames.SCHEMA\");\n \n public static final String LAYERVIEWPANEL_POPUP = I18N.get(\"ui.MenuNames.LAYERVIEWPANEL_POPUP\");\n public static final String ATTRIBUTEPANEL_POPUP = I18N.get(\"ui.MenuNames.ATTRIBUTEPANEL_POPUP\");\n public static final String LAYERNAMEPANEL_LAYER_POPUP = I18N.get(\"ui.MenuNames.LAYERNAMEPANEL_LAYER_POPUP\");\n public static final String LAYERNAMEPANEL_CATEGORY_POPUP = I18N.get(\"ui.MenuNames.LAYERNAMEPANEL_CATEGORY_POPUP\");\n}", "protected String getLocaleSpecificKey(String localeKey) {\n return CONTENT_KEY.concat(\"-\").concat(localeKey);\n }", "protected String getString(String key) {\r\n\t\ttry {\r\n\t\t\tResourceBundle bundle = ResourceBundle.getBundle(bundleName);\r\n\t\t\treturn bundle.getString(key);\r\n\t\t} catch (MissingResourceException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@java.lang.Override\n public java.lang.String getLabelsOrThrow(java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();\n if (!map.containsKey(key)) {\n throw new java.lang.IllegalArgumentException();\n }\n return map.get(key);\n }", "@java.lang.Override\n public java.lang.String getLabelsOrThrow(java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();\n if (!map.containsKey(key)) {\n throw new java.lang.IllegalArgumentException();\n }\n return map.get(key);\n }", "@MapName(\"lnfkey\")\n \tString getLnfKey();", "protected String getResourceString(String key)\r\n\t\t\tthrows MissingResourceException {\r\n\t\treturn StripesFilter.getConfiguration().getLocalizationBundleFactory()\r\n\t\t\t\t.getErrorMessageBundle(locale).getString(key);\r\n\t\t\r\n\t}", "@java.lang.Override\n public java.lang.String getLabelsOrThrow(java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();\n if (!map.containsKey(key)) {\n throw new java.lang.IllegalArgumentException();\n }\n return map.get(key);\n }", "@java.lang.Override\n public java.lang.String getLabelsOrThrow(java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();\n if (!map.containsKey(key)) {\n throw new java.lang.IllegalArgumentException();\n }\n return map.get(key);\n }", "abstract protected String getResourceBundlePropName();", "@Override\r\n protected String determineLocale(final Map<String, Object> descGetterMap, final JPAPath localeAttribute,\r\n final int index) throws ODataJPAProcessorException {\n return null;\r\n }", "protected Map getKeyMethodMap() {\n\t\tHashMap<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"cmd.planilla.lista\", \"lista\");\n\t\tmap.put(\"cmd.planilla.buscar\", \"buscar\");\n\t\tmap.put(\"cmd.planilla.verificar\", \"verificar\");\n\t\tmap.put(\"cmd.planilla.cargar\", \"cargar\");\n\t\tmap.put(\"cmd.planilla.actualizar\", \"actualizar\");\n\t\tmap.put(\"cmd.planilla.generar\", \"generar\");\n\t\tmap.put(\"cmd.planilla.cargaFin\", \"cargaFin\");\n\t\tmap.put(\"cmd.planilla.descEmpleadoFiador\", \"descEmpleadoFiador\");\n\t\tmap.put(\"cmd.planilla.verReporte\", \"verReporte\");\n\t\treturn map;\n\t}", "public String getMessage(Locale locale, String key, Object... params) {\n String value;\n try {\n value = ResourceBundle.getBundle(OPP_BUNDLE_NAME, locale).getString(key);\n } catch (final Throwable e) {\n LOGGER.warn(\"missing bundle key: key=\" + key + \", locale=\" + locale, e);\n value = null;\n }\n\n if (null == value || \"\".equals(value)) {\n value = \"???\" + key + \"???\";\n return value;\n }\n String message = MessageFormat.format(value, params);\n return message;\n }", "protected String get(String key)\n {\n // if this string is tainted, we don't translate it, instead we\n // simply remove the taint character and return it to the caller\n if (MessageUtil.isTainted(key))\n {\n return MessageUtil.untaint(key);\n }\n try\n {\n return _msgs.getString(key);\n }\n catch (MissingResourceException mre)\n {\n log.warning(\"Missing translation message '\" + key + \"'.\");\n return key;\n }\n }", "public static String getDisplayName(String localeID, String displayLocaleID) {\n/* 780 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@SuppressWarnings(\"unchecked\")\n public Map<String, String> getMapContextPath() {\n FacesContext facesContext = FacesContext.getCurrentInstance();\n ExternalContext extenalContext = facesContext.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) extenalContext.getRequest();\n return (Map<String, String>) request.getSession().getAttribute(\"MAP_CONTEXT_PATH\");\n //xxx_temp end\n }", "protected abstract Object doLocalLookup( Name name )\n throws NamingException;", "private String getLocalizedString(String key) {\n\t\treturn new StringResourceModel(key, null).getObject();\n\t}", "public interface LocalizationService {\n\n /**\n *\n * @param locale - the languge that we like to present\n * @return\n */\n Map<String, String> getAllLocalizationStrings(Locale locale);\n\n /**\n * @param prefix - show all strings which start with thr prefix\n * @param locale - the languge that we like to present\n * @return\n */\n// Map<String, String> getAllLocalizationStringsByPrefix(String prefix, Locale locale);\n\n\n /**\n * @param key - the specific key\n * @param locale - the language that we like to present\n * @return\n */\n String getLocalizationStringByKey(String key, Locale locale);\n\n /**\n * Get the default system locale\n * @return\n */\n Locale getDefaultLocale();\n\n /**\n * Get evidence name\n * @param evidence\n * @return\n */\n String getIndicatorName(Evidence evidence);\n\n\n String getAlertName(Alert alert);\n\n Map<String,Map<String, String>> getMessagesToAllLanguages();\n}", "@Override\r\n\t\tpublic ActionMap getHotKeysActionMapper() {\n\t\t\treturn null;\r\n\t\t}", "public static String retrieveMAPFaultName(Message message) {\n return (String)message.get(MAP_FAULT_NAME_PROPERTY);\n }", "java.lang.String getLabelsOrThrow(java.lang.String key);", "java.lang.String getLabelsOrThrow(java.lang.String key);", "java.lang.String getLabelsOrThrow(java.lang.String key);", "java.lang.String getLabelsOrThrow(java.lang.String key);", "java.lang.String getRoutingKey();", "public final java.lang.String getDisplayName(android.icu.util.ULocale locale) { throw new RuntimeException(\"Stub!\"); }", "public final java.lang.String getDisplayName(java.util.Locale locale) { throw new RuntimeException(\"Stub!\"); }", "protected abstract void beforeLookup(Lookup.Template t);", "static String nameOf(final Object key) {\n if (key instanceof Key) {\n return key.toString();\n }\n int t = 0;\n while (true) {\n final Class<?> type;\n switch (t++) {\n case 0: {\n try {\n type = Class.forName(\"java.awt.RenderingHints\");\n } catch (ClassNotFoundException e) {\n continue;\n } catch (NoClassDefFoundError e) {\n // May occurs because of indirect JAI dependencies.\n continue;\n }\n break;\n }\n case 1: {\n try {\n type = Class.forName(\"javax.media.jai.JAI\");\n break;\n } catch (ClassNotFoundException e) {\n continue;\n } catch (NoClassDefFoundError e) {\n // May occurs because of indirect JAI dependencies.\n continue;\n }\n }\n default: {\n return key.toString();\n }\n }\n final String name = nameOf(type, key);\n if (name != null) {\n return name;\n }\n }\n }", "private static String getMessage(String key, Object... o) {\n String msg = getLogger().getResourceBundle().getString(key);\n return MessageFormat.format(msg, o);\n }", "ActionMap getActionMap() {\n String mapName = getPropertyPrefix() + \".actionMap\";\n ActionMap map = (ActionMap)UIManager.get(mapName);\n\n if (map == null) {\n map = createActionMap();\n if (map != null) {\n UIManager.getLookAndFeelDefaults().put(mapName, map);\n }\n }\n ActionMap componentMap = new ActionMapUIResource();\n componentMap.put(\"requestFocus\", new FocusAction());\n /*\n * fix for bug 4515750\n * JTextField & non-editable JTextArea bind return key - default btn not accessible\n *\n * Wrap the return action so that it is only enabled when the\n * component is editable. This allows the default button to be\n * processed when the text component has focus and isn't editable.\n *\n */\n if (getEditorKit(editor) instanceof DefaultEditorKit) {\n if (map != null) {\n Object obj = map.get(DefaultEditorKit.insertBreakAction);\n if (obj instanceof DefaultEditorKit.InsertBreakAction breakAction) {\n Action action = new TextActionWrapper(breakAction);\n componentMap.put(action.getValue(Action.NAME),action);\n }\n }\n }\n if (map != null) {\n componentMap.setParent(map);\n }\n return componentMap;\n }", "public static Enumeration<String> getKeys(String baseName, Locale locale) {\n\n Enumeration<String> keys = null;\n\n try {\n ResourceBundle resource = getResourceBundle(baseName, locale);\n keys = resource.getKeys();\n } catch (Exception ex) {\n return keys;\n }\n return keys;\n }", "XClass getMapKey();", "protected String getMethodName(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response,\n String parameter) throws Exception {\n // Return the unresolved mapping parameter.\n return parameter;\n }", "abstract java.lang.String getLocalizedMessage();", "public static String getResourceString(String key) {\r\n\t\tResourceBundle bundle = APLDebugCorePlugin.getDefault().getResourceBundle();\r\n\t\ttry {\r\n\t\t\treturn (bundle != null) ? bundle.getString(key) : key;\r\n\t\t} catch (MissingResourceException e) {\r\n\t\t\treturn key;\r\n\t\t}\r\n\t}", "protected String getResourceString (String key)\n {\n try {\n if (_bundle != null) {\n return _bundle.getString(key);\n }\n \n } catch (MissingResourceException mre) {\n Log.warning(\"Missing translation message \" +\n \"[bundle=\" + _path + \", key=\" + key + \"].\");\n }\n return null;\n }", "public String getLookupKey() {\n return queryLookupKey(contactId);\n }", "Messages getApplicationCatalog(Locale locale);", "public static String getDisplayName(String localeID, ULocale displayLocale) {\n/* 790 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private String getMessage(FacesContext facesContext, String msgKey, Object... args) {\n Locale locale = facesContext.getViewRoot().getLocale();\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n ResourceBundle bundle = ResourceBundle.getBundle(\"Messages\", locale, classLoader);\n String msgValue = bundle.getString(msgKey);\n return MessageFormat.format(msgValue, args);\n }", "public String getName()\r\n/* 91: */ {\r\n/* 92:112 */ return k_() ? aL() : \"container.minecart\";\r\n/* 93: */ }", "String getShortNameKey();", "public String getClassLabel(String key);", "public RequestAction geRequestHandler(String request){\n RequestAction requestHandler =requestHandlerMap.get(request);\n if(requestHandler ==null)\n return requestHandlerMap.get(\"notSupported\");\n return requestHandler;\n }", "@Override\n\tprotected Map getKeyMethodMap() {\n\t\treturn null;\n\t}", "public static String getMessageResourceString(String key, String lang) {\n\t\tif(lang == null) {\n\t\t\tlang = \"en\";\n\t\t}\n\t\t\n\t\tResourceBundle bundle = ResourceBundle.getBundle(Constants.RESOURCE_BUNDLE + \"_\" + lang);\t\t\n\t\t\n\t\tString text = null;\n\t\ttry {\n\t\t\ttext = bundle.getString(key);\n\t\t} catch (MissingResourceException e) {\n\t\t\ttext = \"?? key \" + key + \" not found ??\";\n\t\t}\n\t\t\n\t\treturn text;\n\t}", "String getMessage(String bundleKey, Locale locale, Object... args);", "public static String getRequestParameter(String key) {\r\n\t\treturn FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(key);\r\n\t}", "private void doLookup(int key)\n {\n String value = getLocalValue(key);\n if (value != null)\n {\n display(key, value);\n }\n else\n {\n getValueFromDB(key);\n } \n }", "public abstract String resolveText(Locale locale, String key, Serializable[] arguments);", "protected String localize(Map<String, String> labels, String s) {\n return labels.containsKey(s) ? labels.get(s) : (\"Untranslated:\" + s);\n }", "public String get (String key)\n {\n // if this string is tainted, we don't translate it, instead we\n // simply remove the taint character and return it to the caller\n if (key.startsWith(TAINT_CHAR)) {\n return key.substring(1);\n }\n \n String msg = getResourceString(key);\n return (msg != null) ? msg : key;\n }", "@Override\n\tpublic K lookup(K key) {\n\t\treturn lookup(root, key);\n\t}", "String getMenuName();", "private static String getMessage(String key)\n {\n return mh.getMessage(key);\n }", "protected Object lookupHandler(String urlPath, HttpServletRequest request) throws Exception\r\n\t{\n\t\tObject handler = super.lookupHandler(urlPath, request);\r\n\t\tif (handler == null)\r\n\t\t{ // 800, 如果uri直接查找不到,则匹配前面一个\r\n\t\t\tString path = urlPath.substring(0, urlPath.indexOf('/', 2));\r\n\t\t\thandler = super.lookupHandler(path, request);\r\n//\t\t\tSystem.out.println(\"path: \" + path + \":\" + handler);\r\n\t\t}\r\n\t\thandler = handler == null ? getRootHandler() : handler;\r\n//\t\tSystem.out.println(\"urlPath: \" + urlPath + \":\" + handler);\r\n\t\treturn handler;\r\n\t}", "public interface NameService {\n \n\t/**\n\t * See {@link #getName(Class, OgemaLocale, boolean)}. Uses default setting\n\t * useDefaultLanguage = true, i.e. if a name in the language provided is not available, a default language is selected. \n\t * If no name could be determined, null is returned.\n\t */\n\tpublic String getName(Class<? extends Resource> resourceType, OgemaLocale locale);\n\t\n\t/**\n\t * Returns a human-friendly name of the resource type provided, in the given language.<br>\n\t * @param useDefaultLanguage \n\t * \t\ttrue: if a name is not found in the given language, a default name is provided (depends on implementation, English if available in default implementation)<br>\n\t * \t\tfalse: if a name is not found in the given language null is returned \n\t * @return either a name or null, if a name has not been registered for the given resource type\n\t */\n\tpublic String getName(Class<? extends Resource> resourceType, OgemaLocale locale, boolean useDefaultLanguage);\t\n\t\n\t/**\n\t * Get a list of resource types with available names.<br>\n\t * Return empty list if no dictionary for the requested language is available.\n\t */\n\tpublic List<Class<? extends Resource>> getAvailableTypes(OgemaLocale locale);\n\t\n\t/**\n\t * Check whether a name is available for the given type\n\t */\n\tpublic boolean isTypeAvailable(Class<? extends Resource> resourceType, OgemaLocale locale);\n\t\n\t/**\n\t * See {@link #getName(Resource, OgemaLocale, boolean, boolean)}. Default values useRelativePathAsAlias = false and \n\t * useDefaultLanguage = true are used.\n\t */\n\tpublic String getName(Resource resource, OgemaLocale locale);\t\n\t/**\n\t * Tries to determine a human-friendly name for the given resource with the strategy defined below.\n\t * If none can be determined, null is returned. \n\t * The strategy of the default name service is as follows:\n\t * <ul>\n\t * \t<li>If the resource has a <code>name()</code>-subresource of type StringResource, the value of the latter is returned.\n\t * So for resources having a direct name subresource the argument locale is irrelevant</li>\n\t * <li>If any parent resource has a <code>name()</code>-subresource, the returned String is a concatenation of this name\n\t * \tplus an alias for the relativ path from the parent to the original resource. If no alias is known for this, the behaviour \n\t * \tdepends on the flag useRelativePathAsAlias. If it is true, the relative resource path is appended, if it is false (default), null is returned.</li>\n\t * <li>otherwise null is returned</li>\t \n\t * </ul>\n\t * @param locale language for which the resource name shall be returned\n\t */\n\tpublic String getName(Resource resource, OgemaLocale locale, boolean useRelativePathAsAlias, boolean useDefaultLanguage);\t\n\t\n\t//would require much overhead to implement this\n// public List<OgemaLocale> getAvailableLanguages(Class<? extends Resource> resourceType);\n \n public String getServletUrl() throws UnsupportedOperationException;\n}", "private javax.swing.JLabel getLblOSLocale() {\n\tif (ivjLblOSLocale == null) {\n\t\ttry {\n\t\t\tivjLblOSLocale = new javax.swing.JLabel();\n\t\t\tivjLblOSLocale.setName(\"LblOSLocale\");\n\t\t\tivjLblOSLocale.setText(\"Locale:\");\n\t\t\tivjLblOSLocale.setBounds(10, 94, 140, 14);\n\t\t\t// user code begin {1}\n ivjLblOSLocale.setText(ResourceManager.getResource(PlatformInfoPanel.class, \"LblOSLocale_text\"));\n\t\t\t// user code end\n\t\t} catch (java.lang.Throwable ivjExc) {\n\t\t\t// user code begin {2}\n\t\t\t// user code end\n\t\t\thandleException(ivjExc);\n\t\t}\n\t}\n\treturn ivjLblOSLocale;\n}", "@SuppressWarnings(\"deprecation\")\n public String getLocalizedString(String key, Object... parameters) {\n\n // On server, use deprecated I18n.\n if (FMLCommonHandler.instance().getSide() == Side.SERVER)\n return net.minecraft.util.text.translation.I18n.translateToLocalFormatted(key, parameters);\n\n // On client, use the new client-side I18n.\n String str = I18n.format(key, parameters).trim();\n\n if (replacesAmpersandWithSectionSign)\n str = str.replaceAll(\"&\", \"\\u00a7\");\n if (hideFormatErrors)\n str = str.replaceFirst(\"Format error: \", \"\");\n\n return str;\n }", "String getLocaleKey(String subject);", "private OperationType methodSignatureMapping() {\n String methodName = this.methodSignature.getName();\n try {\n MethodNameMapping methodNameMapping = SpiOrIocUtils.getBean(applicationContext, MethodNameMapping.class);\n assignOperationType(methodNameMapping, methodName);\n return operationType == null ? doDefaultMapping(methodName) : operationType;\n } catch (GetBeanException gbe) {\n if (logger.isErrorEnabled()) {\n logger.error(\"get the method name mapping from spi or spring ioc happen error. \" +\n \"demote the default mapping\", gbe);\n }\n return doDefaultMapping(methodName);\n }\n }", "private void setTranslationKey(String name) {\n\t\t\r\n\t}" ]
[ "0.6363801", "0.62284577", "0.6185801", "0.6048044", "0.5962811", "0.56289434", "0.5590615", "0.55579424", "0.55168474", "0.54220295", "0.5413562", "0.53430486", "0.531872", "0.5209151", "0.5166324", "0.5126551", "0.5125192", "0.5099417", "0.5067809", "0.5029783", "0.5019415", "0.49663016", "0.49651223", "0.49483606", "0.49447083", "0.49417692", "0.49394855", "0.49372214", "0.4924191", "0.48920143", "0.48834035", "0.48808295", "0.48450902", "0.48392028", "0.48186725", "0.48164964", "0.48075217", "0.48055342", "0.47931382", "0.47931203", "0.47931203", "0.47898176", "0.4785639", "0.477754", "0.477754", "0.4773819", "0.47681564", "0.47642764", "0.47604805", "0.47537047", "0.4748551", "0.4740821", "0.4736187", "0.47277656", "0.4727006", "0.4722147", "0.47192088", "0.47163263", "0.47163263", "0.47163263", "0.47163263", "0.47153747", "0.46937174", "0.46897626", "0.4682452", "0.46813706", "0.46780628", "0.46730262", "0.4671829", "0.46575856", "0.46544343", "0.46517107", "0.46468058", "0.46429214", "0.46376956", "0.4637652", "0.46376055", "0.46361274", "0.4633061", "0.46289", "0.46262112", "0.46195304", "0.46190593", "0.46174493", "0.46104082", "0.46082798", "0.46022546", "0.45977342", "0.45974636", "0.45959583", "0.45886964", "0.45841295", "0.45809886", "0.45751673", "0.4570319", "0.45699373", "0.4553966", "0.45419446", "0.45353514", "0.45331788" ]
0.7917995
0
NEW: added by Jaap This is the first time the default Locale is used so build the reverse lookup Map. Search for message keys in all configured MessageResources for the current module.
protected Map initDefaultLookupMap(HttpServletRequest request) { Map lookupMap = new HashMap(); this.keyMethodMap = this.getKeyMethodMap(); ModuleConfig moduleConfig = (ModuleConfig) request .getAttribute(Globals.MODULE_KEY); MessageResourcesConfig[] mrc = moduleConfig .findMessageResourcesConfigs(); // Look through all module's MessageResources for (int i = 0; i < mrc.length; i++) { MessageResources resources = this.getResources(request, mrc[i] .getKey()); // Look for key in MessageResources Iterator iter = this.keyMethodMap.keySet().iterator(); while (iter.hasNext()) { String key = (String) iter.next(); String text = resources.getMessage(Locale.ENGLISH, key); // Found key and haven't added to Map yet, so add the text if ((text != null) && !lookupMap.containsKey(text)) { lookupMap.put(text, key); } } } return lookupMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initMessages() {\n\t\tthis.languagesMessagesMap = new HashMap<String, Map<String, String>>();\n\n\t\tBufferedReader reader = null;\n\t\treader = initMessagesReader(reader);\n\t\tif (reader == null) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tList<Map<String, String>> languagesMessagesList = readMessagesHeaderWithLanguages(reader);\n\n\t\t\tStringTokenizer st;\n\t\t\tString line;\n\n\t\t\t// load all messages\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t// skip empty line\n\t\t\t\tif (line.trim().length() == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tline = line.replace(\"\\\";\\\"\", \"\\\"\\t\\\"\").replaceFirst(\";$\", \"\");\n\t\t\t\tst = new StringTokenizer(line, \"\\t\");\n\n\t\t\t\t// read key\n\t\t\t\tString key = Tools.removeQuotas(st.nextToken());\n\t\t\t\tint index = 0;\n\n\t\t\t\t// read all messages for the key\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tif (index == languagesMessagesList.size()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tString message = Tools.removeQuotas(st.nextToken());\n\t\t\t\t\tlanguagesMessagesList.get(index).put(key, message);\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlog.error(\"Error reading messages file\", e);\n\t\t} finally {\n\t\t\tIOUtils.closeQuietly(reader);\n\t\t}\n\t}", "public List<MessageResource> listMessageResourceByLocale(String locale);", "Language findByMessageKeyAndLocale(String key, String locale);", "public MessageResource loadMessageResourceForLocale(String messageKey, String locale) throws MessageResourceLoadException;", "public abstract String getLocalizationKey();", "public Map<Language,String> getAllMessageFired(final SessionContext ctx)\r\n\t{\r\n\t\treturn (Map<Language,String>)getAllLocalizedProperties(ctx,MESSAGEFIRED,C2LManager.getInstance().getAllLanguages());\r\n\t}", "private MessageResources getMessageResources(PageContext pageContext) {\n return ((MessageResources)\n pageContext.getRequest().getAttribute(Globals.MESSAGES_KEY));\n }", "@Override\n protected void populateLocalisationMap() {\n localisationKeyConstantToKeyMap.put(ADDRESSES_TITLE, \"receiveBitcoinPanel.receivingAddressesTitle\"); \n localisationKeyConstantToKeyMap.put(CREATE_NEW_TOOLTIP, \"createOrEditAddressAction.createReceiving.tooltip\"); \n }", "public SrvI18n() {\n try { //to fix Android Java\n messages = ResourceBundle.getBundle(\"MessagesBundle\");\n } catch (Exception e) {\n Locale locale = new Locale(\"en\", \"US\");\n messages = ResourceBundle.getBundle(\"MessagesBundle\", locale);\n }\n }", "public List<MessageResource> listMessageResourceByMessageKey(String messageKey);", "private static void initializeMessages() {\n messages = ResourceBundle.getBundle(\"org.apache.ws.commons.tcpmon.tcpmon\");\n }", "Messages getApplicationCatalog(Locale locale);", "protected static ResourceBundle getMessages() {\n return _messages;\n }", "public List<MessageResource> listMessageResourceByLocaleReferenceId(Long localeReferenceId);", "public Map<Language,String> getAllMessageCouldHaveFired(final SessionContext ctx)\r\n\t{\r\n\t\treturn (Map<Language,String>)getAllLocalizedProperties(ctx,MESSAGECOULDHAVEFIRED,C2LManager.getInstance().getAllLanguages());\r\n\t}", "private void loadSystemMessages() {\n // As a back-up, load the messages from the class path\n LOGGER.warn(null, MODULE_NAME, \"Loading message-properties file from class path\");\n systemMessages = ResourceBundle.getBundle(\"messages\");\n }", "public interface LocalizationService {\n\n /**\n *\n * @param locale - the languge that we like to present\n * @return\n */\n Map<String, String> getAllLocalizationStrings(Locale locale);\n\n /**\n * @param prefix - show all strings which start with thr prefix\n * @param locale - the languge that we like to present\n * @return\n */\n// Map<String, String> getAllLocalizationStringsByPrefix(String prefix, Locale locale);\n\n\n /**\n * @param key - the specific key\n * @param locale - the language that we like to present\n * @return\n */\n String getLocalizationStringByKey(String key, Locale locale);\n\n /**\n * Get the default system locale\n * @return\n */\n Locale getDefaultLocale();\n\n /**\n * Get evidence name\n * @param evidence\n * @return\n */\n String getIndicatorName(Evidence evidence);\n\n\n String getAlertName(Alert alert);\n\n Map<String,Map<String, String>> getMessagesToAllLanguages();\n}", "public Map getKeyMethodMap() {\r\n\t\tMap map = new HashMap();\r\n\r\n\t\tString pkg = this.getClass().getPackage().getName();\r\n\t\tResourceBundle methods = ResourceBundle.getBundle(pkg\r\n\t\t\t\t+ \".LookupMethods\");\r\n\r\n\t\tEnumeration keys = methods.getKeys();\r\n\r\n\t\twhile (keys.hasMoreElements()) {\r\n\t\t\tString key = (String) keys.nextElement();\r\n\t\t\tmap.put(key, methods.getString(key));\r\n\t\t}\r\n\r\n\t\treturn map;\r\n\t}", "public static void display(){\r\n String baseName = \"res.Messages\";\r\n ResourceBundle messages = ResourceBundle.getBundle(baseName, Locale.getDefault());\r\n System.out.println(messages.getString(\"locales\"));\r\n\r\n Locale available[] = Locale.getAvailableLocales();\r\n for(Locale locale : available) {\r\n System.out.println(locale.getDisplayCountry() + \"\\t\" + locale.getDisplayLanguage(locale));\r\n }\r\n }", "public interface MessageResolver {\n\t\n\tstatic final Logger LOG = LoggerFactory.getLogger( Validator.class );\n\t\n\tvoid setConfiguration( ContextConfigurion configuration );\n\tContextConfigurion getConfiguration();\n\t\n\tvoid setDefaultLocale( Locale defaultLocale );\n\tLocale getDefaultLocale();\n\n\tvoid addResourceBundle( String resourceName, String ... preloadings );\n\tvoid addResourceBundles( List<MessageResource> resources );\n\tSet<ResourceBundle> getResourceBundles();\n\n\tString getMessageKey( String key );\n\n\tString resolve( String key );\n\tString resolve( String key, String defaultValue );\n\t\n\tString resolve( String key, Locale locale );\n\tString resolve( String key, Locale locale, String defaultValue );\n\t\n}", "Language findByTenantIdAndMessageKeyAndLocale(Long tenantId, String key, String locale);", "public interface SecurityMessages extends org.openelis.ui.messages.UIMessages {\n \n /**\n * Translated \"Description\".\n * \n * @return translated \"Description\"\n */\n @DefaultMessage(\"Description\")\n @Key(\"application.description\")\n String application_description();\n\n /**\n * Translated \"The system module {0} cannot be deleted as it has been added to one or more users\".\n * \n * @return translated \"The system module {0} cannot be deleted as it has been added to one or more users\"\n */\n @DefaultMessage(\"The system module {0} cannot be deleted as it has been added to one or more users\")\n @Key(\"application.moduleAssignedToUserException\")\n String application_moduleAssignedToUserException(String arg0);\n\n /**\n * Translated \"Name\".\n * \n * @return translated \"Name\"\n */\n @DefaultMessage(\"Name\")\n @Key(\"application.name\")\n String application_name();\n\n /**\n * Translated \"The section {0} cannot be deleted as it has been added to one or more users \".\n * \n * @return translated \"The section {0} cannot be deleted as it has been added to one or more users \"\n */\n @DefaultMessage(\"The section {0} cannot be deleted as it has been added to one or more users \")\n @Key(\"application.sectionAssignedToUserException\")\n String application_sectionAssignedToUserException(String arg0);\n\n /**\n * Translated \"Abort\".\n * \n * @return translated \"Abort\"\n */\n @DefaultMessage(\"Abort\")\n @Key(\"btn.abort\")\n String btn_abort();\n\n /**\n * Translated \"Add\".\n * \n * @return translated \"Add\"\n */\n @DefaultMessage(\"Add\")\n @Key(\"btn.add\")\n String btn_add();\n\n /**\n * Translated \"Cancel\".\n * \n * @return translated \"Cancel\"\n */\n @DefaultMessage(\"Cancel\")\n @Key(\"btn.cancel\")\n String btn_cancel();\n\n /**\n * Translated \"Commit\".\n * \n * @return translated \"Commit\"\n */\n @DefaultMessage(\"Commit\")\n @Key(\"btn.commit\")\n String btn_commit();\n\n /**\n * Translated \"Delete\".\n * \n * @return translated \"Delete\"\n */\n @DefaultMessage(\"Delete\")\n @Key(\"btn.delete\")\n String btn_delete();\n\n /**\n * Translated \"Duplicate\".\n * \n * @return translated \"Duplicate\"\n */\n @DefaultMessage(\"Duplicate\")\n @Key(\"btn.duplicateRecord\")\n String btn_duplicateRecord();\n\n /**\n * Translated \"Duplicate the current record\".\n * \n * @return translated \"Duplicate the current record\"\n */\n @DefaultMessage(\"Duplicate the current record\")\n @Key(\"btn.duplicateRecordDescription\")\n String btn_duplicateRecordDescription();\n\n /**\n * Translated \"Next\".\n * \n * @return translated \"Next\"\n */\n @DefaultMessage(\"Next\")\n @Key(\"btn.next\")\n String btn_next();\n\n /**\n * Translated \"OK\".\n * \n * @return translated \"OK\"\n */\n @DefaultMessage(\"OK\")\n @Key(\"btn.ok\")\n String btn_ok();\n\n /**\n * Translated \"Options\".\n * \n * @return translated \"Options\"\n */\n @DefaultMessage(\"Options\")\n @Key(\"btn.options\")\n String btn_options();\n\n /**\n * Translated \"Previous\".\n * \n * @return translated \"Previous\"\n */\n @DefaultMessage(\"Previous\")\n @Key(\"btn.previous\")\n String btn_previous();\n\n /**\n * Translated \"Query\".\n * \n * @return translated \"Query\"\n */\n @DefaultMessage(\"Query\")\n @Key(\"btn.query\")\n String btn_query();\n\n /**\n * Translated \"Update\".\n * \n * @return translated \"Update\"\n */\n @DefaultMessage(\"Update\")\n @Key(\"btn.update\")\n String btn_update();\n\n /**\n * Translated \"Applications\".\n * \n * @return translated \"Applications\"\n */\n @DefaultMessage(\"Applications\")\n @Key(\"ge.applications\")\n String ge_applications();\n\n /**\n * Translated \"Active\".\n * \n * @return translated \"Active\"\n */\n @DefaultMessage(\"Active\")\n @Key(\"gen.active\")\n String gen_active();\n\n /**\n * Translated \"Add aborted\".\n * \n * @return translated \"Add aborted\"\n */\n @DefaultMessage(\"Add aborted\")\n @Key(\"gen.addAborted\")\n String gen_addAborted();\n\n /**\n * Translated \"Add\".\n * \n * @return translated \"Add\"\n */\n @DefaultMessage(\"Add\")\n @Key(\"gen.addPerm\")\n String gen_addPerm();\n\n /**\n * Translated \"Add Row\".\n * \n * @return translated \"Add Row\"\n */\n @DefaultMessage(\"Add Row\")\n @Key(\"gen.addRow\")\n String gen_addRow();\n\n /**\n * Translated \"Adding...\".\n * \n * @return translated \"Adding...\"\n */\n @DefaultMessage(\"Adding...\")\n @Key(\"gen.adding\")\n String gen_adding();\n\n /**\n * Translated \"Adding...Complete\".\n * \n * @return translated \"Adding...Complete\"\n */\n @DefaultMessage(\"Adding...Complete\")\n @Key(\"gen.addingComplete\")\n String gen_addingComplete();\n\n /**\n * Translated \"Application\".\n * \n * @return translated \"Application\"\n */\n @DefaultMessage(\"Application\")\n @Key(\"gen.application\")\n String gen_application();\n\n /**\n * Translated \"Asn\".\n * \n * @return translated \"Asn\"\n */\n @DefaultMessage(\"Asn\")\n @Key(\"gen.assignPerm\")\n String gen_assignPerm();\n\n /**\n * Translated \"Authentication Failure\".\n * \n * @return translated \"Authentication Failure\"\n */\n @DefaultMessage(\"Authentication Failure\")\n @Key(\"gen.authFailure\")\n String gen_authFailure();\n\n /**\n * Translated \"Canceling changes ...\".\n * \n * @return translated \"Canceling changes ...\"\n */\n @DefaultMessage(\"Canceling changes ...\")\n @Key(\"gen.cancelChanges\")\n String gen_cancelChanges();\n\n /**\n * Translated \"Cncl\".\n * \n * @return translated \"Cncl\"\n */\n @DefaultMessage(\"Cncl\")\n @Key(\"gen.cancelPerm\")\n String gen_cancelPerm();\n\n /**\n * Translated \"Clause\".\n * \n * @return translated \"Clause\"\n */\n @DefaultMessage(\"Clause\")\n @Key(\"gen.clause\")\n String gen_clause();\n\n /**\n * Translated \"Cmp\".\n * \n * @return translated \"Cmp\"\n */\n @DefaultMessage(\"Cmp\")\n @Key(\"gen.completePerm\")\n String gen_completePerm();\n\n /**\n * Translated \"Please correct the errors indicated, then press Commit\".\n * \n * @return translated \"Please correct the errors indicated, then press Commit\"\n */\n @DefaultMessage(\"Please correct the errors indicated, then press Commit\")\n @Key(\"gen.correctErrors\")\n String gen_correctErrors();\n\n /**\n * Translated \"Delete Aborted\".\n * \n * @return translated \"Delete Aborted\"\n */\n @DefaultMessage(\"Delete Aborted\")\n @Key(\"gen.deleteAborted\")\n String gen_deleteAborted();\n\n /**\n * Translated \"Delete...Complete\".\n * \n * @return translated \"Delete...Complete\"\n */\n @DefaultMessage(\"Delete...Complete\")\n @Key(\"gen.deleteComplete\")\n String gen_deleteComplete();\n\n /**\n * Translated \"Pressing commit will delete the current record from the database\".\n * \n * @return translated \"Pressing commit will delete the current record from the database\"\n */\n @DefaultMessage(\"Pressing commit will delete the current record from the database\")\n @Key(\"gen.deleteMessage\")\n String gen_deleteMessage();\n\n /**\n * Translated \"Del\".\n * \n * @return translated \"Del\"\n */\n @DefaultMessage(\"Del\")\n @Key(\"gen.deletePerm\")\n String gen_deletePerm();\n\n /**\n * Translated \"Deleting...\".\n * \n * @return translated \"Deleting...\"\n */\n @DefaultMessage(\"Deleting...\")\n @Key(\"gen.deleting\")\n String gen_deleting();\n\n /**\n * Translated \"Description\".\n * \n * @return translated \"Description\"\n */\n @DefaultMessage(\"Description\")\n @Key(\"gen.description\")\n String gen_description();\n\n /**\n * Translated \"Enter fields to query by then press Commit\".\n * \n * @return translated \"Enter fields to query by then press Commit\"\n */\n @DefaultMessage(\"Enter fields to query by then press Commit\")\n @Key(\"gen.enterFieldsToQuery\")\n String gen_enterFieldsToQuery();\n\n /**\n * Translated \"Enter information in the fields, then press Commit.\".\n * \n * @return translated \"Enter information in the fields, then press Commit.\"\n */\n @DefaultMessage(\"Enter information in the fields, then press Commit.\")\n @Key(\"gen.enterInformationPressCommit\")\n String gen_enterInformationPressCommit();\n\n /**\n * Translated \"This record is locked by {0} until {1}\".\n * \n * @return translated \"This record is locked by {0} until {1}\"\n */\n @DefaultMessage(\"This record is locked by {0} until {1}\")\n @Key(\"gen.entityLockException\")\n String gen_entityLockException(String arg0, String arg1);\n\n /**\n * Translated \"Your Lock on this record has expired; Please abort and try again\".\n * \n * @return translated \"Your Lock on this record has expired; Please abort and try again\"\n */\n @DefaultMessage(\"Your Lock on this record has expired; Please abort and try again\")\n @Key(\"gen.expiredLockException\")\n String gen_expiredLockException();\n\n /**\n * Translated \"Error: Could not retrieve the record\".\n * \n * @return translated \"Error: Could not retrieve the record\"\n */\n @DefaultMessage(\"Error: Could not retrieve the record\")\n @Key(\"gen.fetchFailed\")\n String gen_fetchFailed();\n\n /**\n * Translated \"Fetching ...\".\n * \n * @return translated \"Fetching ...\"\n */\n @DefaultMessage(\"Fetching ...\")\n @Key(\"gen.fetching\")\n String gen_fetching();\n\n /**\n * Translated \"Field is required\".\n * \n * @return translated \"Field is required\"\n */\n @DefaultMessage(\"Field is required\")\n @Key(\"gen.fieldRequiredException\")\n String gen_fieldRequiredException();\n\n /**\n * Translated \"A record with this value already exists. Please enter a unique value for this field\".\n * \n * @return translated \"A record with this value already exists. Please enter a unique value for this field\"\n */\n @DefaultMessage(\"A record with this value already exists. Please enter a unique value for this field\")\n @Key(\"gen.fieldUniqueException\")\n String gen_fieldUniqueException();\n\n /**\n * Translated \"Please enter a unique value for this field\".\n * \n * @return translated \"Please enter a unique value for this field\"\n */\n @DefaultMessage(\"Please enter a unique value for this field\")\n @Key(\"gen.fieldUniqueOnlyException\")\n String gen_fieldUniqueOnlyException();\n\n /**\n * Translated \"Id:\".\n * \n * @return translated \"Id:\"\n */\n @DefaultMessage(\"Id:\")\n @Key(\"gen.id\")\n String gen_id();\n\n /**\n * Translated \"Locking record for Update...\".\n * \n * @return translated \"Locking record for Update...\"\n */\n @DefaultMessage(\"Locking record for Update...\")\n @Key(\"gen.lockForUpdate\")\n String gen_lockForUpdate();\n\n /**\n * Translated \"Login Name\".\n * \n * @return translated \"Login Name\"\n */\n @DefaultMessage(\"Login Name\")\n @Key(\"gen.loginName\")\n String gen_loginName();\n\n /**\n * Translated \"You do not have {0} permission in {1,number}\".\n * \n * @return translated \"You do not have {0} permission in {1,number}\"\n */\n @DefaultMessage(\"You do not have {0} permission in {1,number}\")\n @Key(\"gen.modulePermException\")\n String gen_modulePermException(String arg0, Integer arg1);\n\n /**\n * Translated \"Modules\".\n * \n * @return translated \"Modules\"\n */\n @DefaultMessage(\"Modules\")\n @Key(\"gen.modules\")\n String gen_modules();\n\n /**\n * Translated \"You must Commit or Abort changes first\".\n * \n * @return translated \"You must Commit or Abort changes first\"\n */\n @DefaultMessage(\"You must Commit or Abort changes first\")\n @Key(\"gen.mustCommitOrAbort\")\n String gen_mustCommitOrAbort();\n\n /**\n * Translated \"Name\".\n * \n * @return translated \"Name\"\n */\n @DefaultMessage(\"Name\")\n @Key(\"gen.name\")\n String gen_name();\n\n /**\n * Translated \"No more records in this direction\".\n * \n * @return translated \"No more records in this direction\"\n */\n @DefaultMessage(\"No more records in this direction\")\n @Key(\"gen.noMoreRecordInDir\")\n String gen_noMoreRecordInDir();\n\n /**\n * Translated \"No records found\".\n * \n * @return translated \"No records found\"\n */\n @DefaultMessage(\"No records found\")\n @Key(\"gen.noRecordsFound\")\n String gen_noRecordsFound();\n\n /**\n * Translated \"Password\".\n * \n * @return translated \"Password\"\n */\n @DefaultMessage(\"Password\")\n @Key(\"gen.password\")\n String gen_password();\n\n /**\n * Translated \"Query aborted\".\n * \n * @return translated \"Query aborted\"\n */\n @DefaultMessage(\"Query aborted\")\n @Key(\"gen.queryAborted\")\n String gen_queryAborted();\n\n /**\n * Translated \"Querying....\".\n * \n * @return translated \"Querying....\"\n */\n @DefaultMessage(\"Querying....\")\n @Key(\"gen.querying\")\n String gen_querying();\n\n /**\n * Translated \"Querying...Complete\".\n * \n * @return translated \"Querying...Complete\"\n */\n @DefaultMessage(\"Querying...Complete\")\n @Key(\"gen.queryingComplete\")\n String gen_queryingComplete();\n\n /**\n * Translated \"Rls\".\n * \n * @return translated \"Rls\"\n */\n @DefaultMessage(\"Rls\")\n @Key(\"gen.releasePerm\")\n String gen_releasePerm();\n\n /**\n * Translated \"Remove Row\".\n * \n * @return translated \"Remove Row\"\n */\n @DefaultMessage(\"Remove Row\")\n @Key(\"gen.removeRow\")\n String gen_removeRow();\n\n /**\n * Translated \"Section\".\n * \n * @return translated \"Section\"\n */\n @DefaultMessage(\"Section\")\n @Key(\"gen.section\")\n String gen_section();\n\n /**\n * Translated \"You do not have permission to {0} for section {1}\".\n * \n * @return translated \"You do not have permission to {0} for section {1}\"\n */\n @DefaultMessage(\"You do not have permission to {0} for section {1}\")\n @Key(\"gen.sectionPermException\")\n String gen_sectionPermException(String arg0, String arg1);\n\n /**\n * Translated \"Sections\".\n * \n * @return translated \"Sections\"\n */\n @DefaultMessage(\"Sections\")\n @Key(\"gen.sections\")\n String gen_sections();\n\n /**\n * Translated \"Select Application\".\n * \n * @return translated \"Select Application\"\n */\n @DefaultMessage(\"Select Application\")\n @Key(\"gen.selectApplication\")\n String gen_selectApplication();\n\n /**\n * Translated \"Sel\".\n * \n * @return translated \"Sel\"\n */\n @DefaultMessage(\"Sel\")\n @Key(\"gen.selectPerm\")\n String gen_selectPerm();\n\n /**\n * Translated \"\\\"Select\\\" permission must not be unchecked for a module\".\n * \n * @return translated \"\\\"Select\\\" permission must not be unchecked for a module\"\n */\n @DefaultMessage(\"\\\"Select\\\" permission must not be unchecked for a module\")\n @Key(\"gen.selectPermRequiredException\")\n String gen_selectPermRequiredException();\n\n /**\n * Translated \"Show Clause\".\n * \n * @return translated \"Show Clause\"\n */\n @DefaultMessage(\"Show Clause\")\n @Key(\"gen.showClause\")\n String gen_showClause();\n\n /**\n * Translated \"Sign In\".\n * \n * @return translated \"Sign In\"\n */\n @DefaultMessage(\"Sign In\")\n @Key(\"gen.signin\")\n String gen_signin();\n\n /**\n * Translated \"System User\".\n * \n * @return translated \"System User\"\n */\n @DefaultMessage(\"System User\")\n @Key(\"gen.systemUser\")\n String gen_systemUser();\n\n /**\n * Translated \"Template\".\n * \n * @return translated \"Template\"\n */\n @DefaultMessage(\"Template\")\n @Key(\"gen.template\")\n String gen_template();\n\n /**\n * Translated \"Templates\".\n * \n * @return translated \"Templates\"\n */\n @DefaultMessage(\"Templates\")\n @Key(\"gen.templates\")\n String gen_templates();\n\n /**\n * Translated \"Extend Time\".\n * \n * @return translated \"Extend Time\"\n */\n @DefaultMessage(\"Extend Time\")\n @Key(\"gen.timeoutExtendTime\")\n String gen_timeoutExtendTime();\n\n /**\n * Translated \"Timeout Warning\".\n * \n * @return translated \"Timeout Warning\"\n */\n @DefaultMessage(\"Timeout Warning\")\n @Key(\"gen.timeoutHeader\")\n String gen_timeoutHeader();\n\n /**\n * Translated \"Logout\".\n * \n * @return translated \"Logout\"\n */\n @DefaultMessage(\"Logout\")\n @Key(\"gen.timeoutLogout\")\n String gen_timeoutLogout();\n\n /**\n * Translated \"Your session is about to expire, do you want to\\nlogout or extend your session\".\n * \n * @return translated \"Your session is about to expire, do you want to\\nlogout or extend your session\"\n */\n @DefaultMessage(\"Your session is about to expire, do you want to\\nlogout or extend your session\")\n @Key(\"gen.timeoutWarning\")\n String gen_timeoutWarning();\n\n /**\n * Translated \"Update aborted\".\n * \n * @return translated \"Update aborted\"\n */\n @DefaultMessage(\"Update aborted\")\n @Key(\"gen.updateAborted\")\n String gen_updateAborted();\n\n /**\n * Translated \"Upd\".\n * \n * @return translated \"Upd\"\n */\n @DefaultMessage(\"Upd\")\n @Key(\"gen.updatePerm\")\n String gen_updatePerm();\n\n /**\n * Translated \"Updating...\".\n * \n * @return translated \"Updating...\"\n */\n @DefaultMessage(\"Updating...\")\n @Key(\"gen.updating\")\n String gen_updating();\n\n /**\n * Translated \"Updating...Complete\".\n * \n * @return translated \"Updating...Complete\"\n */\n @DefaultMessage(\"Updating...Complete\")\n @Key(\"gen.updatingComplete\")\n String gen_updatingComplete();\n\n /**\n * Translated \"Username\".\n * \n * @return translated \"Username\"\n */\n @DefaultMessage(\"Username\")\n @Key(\"gen.username\")\n String gen_username();\n\n /**\n * Translated \"Users\".\n * \n * @return translated \"Users\"\n */\n @DefaultMessage(\"Users\")\n @Key(\"gen.users\")\n String gen_users();\n\n /**\n * Translated \"View\".\n * \n * @return translated \"View\"\n */\n @DefaultMessage(\"View\")\n @Key(\"gen.viewPerm\")\n String gen_viewPerm();\n\n /**\n * Translated \"\\\"View\\\" permission must not be unchecked for a section\".\n * \n * @return translated \"\\\"View\\\" permission must not be unchecked for a section\"\n */\n @DefaultMessage(\"\\\"View\\\" permission must not be unchecked for a section\")\n @Key(\"gen.viewPermRequiredException\")\n String gen_viewPermRequiredException();\n\n /**\n * Translated \"Logout\".\n * \n * @return translated \"Logout\"\n */\n @DefaultMessage(\"Logout\")\n @Key(\"menu.logout\")\n String menu_logout();\n\n /**\n * Translated \"Exit the application.\".\n * \n * @return translated \"Exit the application.\"\n */\n @DefaultMessage(\"Exit the application.\")\n @Key(\"menu.logoutDescription\")\n String menu_logoutDescription();\n\n /**\n * Translated \"Permissions\".\n * \n * @return translated \"Permissions\"\n */\n @DefaultMessage(\"Permissions\")\n @Key(\"menu.permissions\")\n String menu_permissions();\n\n /**\n * Translated \"System\".\n * \n * @return translated \"System\"\n */\n @DefaultMessage(\"System\")\n @Key(\"menu.system\")\n String menu_system();\n\n /**\n * Translated \"Utilities\".\n * \n * @return translated \"Utilities\"\n */\n @DefaultMessage(\"Utilities\")\n @Key(\"menu.utilities\")\n String menu_utilities();\n\n /**\n * Translated \"Active\".\n * \n * @return translated \"Active\"\n */\n @DefaultMessage(\"Active\")\n @Key(\"systemUser.active\")\n String systemUser_active();\n\n /**\n * Translated \"This action will remove all the permissions for this user and make it inactive. The user itself will not be removed.\".\n * \n * @return translated \"This action will remove all the permissions for this user and make it inactive. The user itself will not be removed.\"\n */\n @DefaultMessage(\"This action will remove all the permissions for this user and make it inactive. The user itself will not be removed.\")\n @Key(\"systemUser.deleteUserMessage\")\n String systemUser_deleteUserMessage();\n\n /**\n * Translated \"Employee\".\n * \n * @return translated \"Employee\"\n */\n @DefaultMessage(\"Employee\")\n @Key(\"systemUser.employee\")\n String systemUser_employee();\n\n /**\n * Translated \"External ID\".\n * \n * @return translated \"External ID\"\n */\n @DefaultMessage(\"External ID\")\n @Key(\"systemUser.externalId\")\n String systemUser_externalId();\n\n /**\n * Translated \"First Name\".\n * \n * @return translated \"First Name\"\n */\n @DefaultMessage(\"First Name\")\n @Key(\"systemUser.firstName\")\n String systemUser_firstName();\n\n /**\n * Translated \"Initials\".\n * \n * @return translated \"Initials\"\n */\n @DefaultMessage(\"Initials\")\n @Key(\"systemUser.initials\")\n String systemUser_initials();\n\n /**\n * Translated \"Last Name\".\n * \n * @return translated \"Last Name\"\n */\n @DefaultMessage(\"Last Name\")\n @Key(\"systemUser.lastName\")\n String systemUser_lastName();\n\n /**\n * Translated \"System Module already added to the user\".\n * \n * @return translated \"System Module already added to the user\"\n */\n @DefaultMessage(\"System Module already added to the user\")\n @Key(\"systemUser.moduleAddedToUser\")\n String systemUser_moduleAddedToUser();\n\n /**\n * Translated \"Section already added to the user\".\n * \n * @return translated \"Section already added to the user\"\n */\n @DefaultMessage(\"Section already added to the user\")\n @Key(\"systemUser.sectionAddedToUser\")\n String systemUser_sectionAddedToUser();\n\n /**\n * Translated \"Since this user has no permissions and is inactive, deletion is invalid\".\n * \n * @return translated \"Since this user has no permissions and is inactive, deletion is invalid\"\n */\n @DefaultMessage(\"Since this user has no permissions and is inactive, deletion is invalid\")\n @Key(\"systemUser.userDeleteInvalid\")\n String systemUser_userDeleteInvalid();\n\n /**\n * Translated \"Since this user has no permissions, duplication is invalid\".\n * \n * @return translated \"Since this user has no permissions, duplication is invalid\"\n */\n @DefaultMessage(\"Since this user has no permissions, duplication is invalid\")\n @Key(\"systemUser.userDuplicateInvalid\")\n String systemUser_userDuplicateInvalid();\n\n /**\n * Translated \"System Module already added to the template\".\n * \n * @return translated \"System Module already added to the template\"\n */\n @DefaultMessage(\"System Module already added to the template\")\n @Key(\"template.moduleAddedToTemplate\")\n String template_moduleAddedToTemplate();\n\n /**\n * Translated \"Template Name\".\n * \n * @return translated \"Template Name\"\n */\n @DefaultMessage(\"Template Name\")\n @Key(\"template.name\")\n String template_name();\n\n /**\n * Translated \"Section already added to the template\".\n * \n * @return translated \"Section already added to the template\"\n */\n @DefaultMessage(\"Section already added to the template\")\n @Key(\"template.sectionAddedToTemplate\")\n String template_sectionAddedToTemplate();\n}", "protected void buildMessages(final String language, final Map<String, MessageResourceLocale> messageResource,\n\t\t\tfinal Map<String, String> result, String messageType, boolean inheritanceRequired) {\n\n\t\tif (messageResource.containsKey(messageType)) {\n\n\t\t\t// get the MessageResourceLocal for the given prefix\n\t\t\tfinal MessageResourceLocale messageResourceLocale = messageResource.get(messageType);\n\t\t\t// get the properties for the given language in the prefix\n\t\t\tProperties properties = messageResourceLocale.getPropertiesMap().get(language.toLowerCase());\n\t\t\tif (properties != null) {\n\t\t\t\t// iterate and keep the properties (key, value) in the result map\n\t\t\t\tfor (Map.Entry<Object, Object> objectEntry : properties.entrySet()) {\n\t\t\t\t\tresult.put(String.valueOf(objectEntry.getKey()), String.valueOf(objectEntry.getValue()));\n\t\t\t\t}\n\t\t\t}\n\t\t\t// get the properties which belongs to DEFAULT language\n\t\t\tif(inheritanceRequired) {\n\t\t\t\tproperties = messageResourceLocale.getPropertiesMap().get(I18nService.DEFAULT);\n\t\t\t\tif (properties != null) {\n\t\t\t\t\tfor (Map.Entry<Object, Object> objectEntry : properties.entrySet()) {\n\t\t\t\t\t\tfinal String key = String.valueOf(objectEntry.getKey());\n\t\t\t\t\t\t// if the key of DEFAULT properties not already found in result map\n\t\t\t\t\t\tif (!result.containsKey(key)) {\n\t\t\t\t\t\t\tresult.put(key, String.valueOf(objectEntry.getValue()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@RequestMapping(value = \"/messageresource/all\", method = RequestMethod.GET)\n\tpublic String showAllMessageResource(Model model, Locale locale) {\n\n\t\tlogger.debug(\"showAllMessageResource()\");\n\t\t\t\n\t\treturn \"messages/messageresource_table\";\n\n\t}", "public Map<Locale, T> getAvailableLocalesAndTranslatables() {\n Map<Locale, T> returnMap = new HashMap<Locale, T>();\n List<T> items = (List<T>) MongoEntity.getDs().find(this.getClass(), \"reference\", this.reference).asList();\n\n if (items != null && !items.isEmpty()) {\n for (T item : items) {\n returnMap.put(item.language, item);\n }\n }\n return returnMap;\n }", "private Resources getLocalizedResources(Context context) {\n Configuration conf = context.getResources().getConfiguration();\n conf = new Configuration(conf);\n conf.setLocale(new Locale(LocaleHelper.getLocaleCode(context)));\n Context localizedContext = context.createConfigurationContext(conf);\n return localizedContext.getResources();\n }", "public static void reloadMessages() {\n\t\tNLS.initializeMessages(BUNDLE_NAME, Messages.class);\n\t}", "String getMessage(String bundleKey, Locale locale, Object... args);", "private String getDisplayNameI18N() throws JspException {\n Object args[] = new Object[5];\n args[0] = arg0;\n args[1] = arg1;\n args[2] = arg2;\n args[3] = arg3;\n args[4] = arg4;\n\n\n if (getKey() == null) {\n\n Object o = null;\n\n if (getScope().equals(\"session\")) {\n\n o = pageContext.getAttribute(getName(), pageContext.SESSION_SCOPE);\n\n } else if (getScope().equals(\"request\")) {\n\n o = pageContext.getAttribute(getName(), pageContext.REQUEST_SCOPE);\n\n } else if (getScope().equals(\"page\")) {\n\n o = pageContext.getAttribute(getName(), pageContext.PAGE_SCOPE);\n\n }\n\n if (o != null) {\n\n try {\n\n String _property = getProperty();\n String innerPropertyName, innerGetterName;\n Method _method;\n\n while (_property.indexOf(\".\") > 0) {\n\n innerPropertyName = _property.substring(0, _property.indexOf(\".\"));\n innerGetterName = \"get\" + innerPropertyName.substring(0,1).toUpperCase() + innerPropertyName.substring(1);\n\n _method = o.getClass().getMethod(innerGetterName, null);\n\n o = _method.invoke(o, null);\n\n _property = _property.substring(_property.indexOf(\".\") +1);\n }\n\n String getterName = \"get\" + _property.substring(0,1).toUpperCase() + _property.substring(1);\n\n Method method = o.getClass().getMethod(getterName, null);\n\n if (method.getReturnType() == String.class) {\n String messageKey = (String)method.invoke(o, null);\n\n setKey(messageKey);\n }\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (SecurityException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n }\n }\n\n // Retrieve the message string we are looking for\n String message = RequestUtils.message(pageContext, this.bundle,\n this.localeKey, this.key, args);\n if (message == null) {\n message = key;\n }\n\n return message;\n }", "private static void reloadMessages() {\n\t\tinitializeMessages(BUNDLE_NAME, Messages.class);\n\t}", "public interface ResourceManager {\r\n\r\n\t/**\r\n\t * Adds a resource bundle to be managed by the resource manager.\r\n\t * \r\n\t * @param bundleBaseName - the base name of the bundle to add.\r\n\t * @param locales - an array with the locales to consider for the bundle to add \r\n\t */\r\n\tvoid addBundle(String bundleBaseName, Locale... locales);\r\n\t\r\n\t/**\r\n\t * Gets the localized text for the specified bundle key, and for the resource manager default locale\r\n\t * \r\n\t * @param bundleKey\t- the key of the requested text in the resource bundle\r\n\t * @return the requested localized text\r\n\t */\r\n\tString getString(String bundleKey);\r\n\r\n\t/**\r\n\t * Gets the localized text for the specified bundle key and for the specified locale.\r\n\t * \r\n\t * @param bundleKey\t- the key of the requested text in the resource bundle\r\n\t * @param locale\t- the locale of the resource bundle\r\n\t * @return the requested localized text\r\n\t */\r\n\tString getString(String bundleKey, Locale locale);\r\n\r\n\t/**\r\n\t * Gets the localized text for the specified bundle key,\r\n\t * in the resource bundle with the given base name, and for the resource manager default locale\r\n\t * \r\n\t * @param bundleKey\t\t - the key of the requested text in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized text should be found\r\n\t * @return the requested localized text\r\n\t */\r\n\tString getString(String bundleKey, String bundleBaseName);\r\n\r\n\t/**\r\n\t * Gets the localized text for the specified bundle key,\r\n\t * from the resource bundle with the given base name, and for the specified locale.\r\n\t * \r\n\t * @param bundleKey\t\t - the key of the requested text in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized text should be found\r\n\t * @param locale \t\t - the locale of the resource bundle\r\n\t * @return the requested localized text\r\n\t */\r\n\tString getString(String bundleKey, String bundleBaseName, Locale locale);\r\n\r\n\t/**\r\n\t * Gets the localized text message for the specified bundle key, and for the resource manager default locale.<br/>\r\n\t * If the requested message contains place holders, they will be substituted by the given arguments\r\n\t * \r\n\t * @param bundleKey - the key of the requested message in the resource bundle\r\n\t * @param args \t\t- an object array with substitution parameters for the message\r\n\t * @return the requested localized text message\r\n\t */\r\n\tString getMessage(String bundleKey, Object... args);\r\n\r\n\t/**\r\n\t * Gets the localized text message for the specified bundle key, and for the specified locale.<br/>\r\n\t * If the requested message contains place holders, they will be substituted by the given arguments\r\n\t * \r\n\t * @param bundleKey - the key of the requested message in the resource bundle\r\n\t * @param args \t\t- an object array with substitution parameters for the message\r\n\t * @return the requested localized text message\r\n\t */\r\n\tString getMessage(String bundleKey, Locale locale, Object... args);\r\n\r\n\t/**\r\n\t * Gets the localized text message for the specified bundle key, and for the resource manager default locale.<br/>\r\n\t * If the requested message contains place holders, they will be substituted by the given arguments\r\n\t * \r\n\t * @param bundleKey \t - the key of the requested message in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the value should be found\r\n\t * @param locale\t\t - the locale of the resource bundle\r\n\t * @param args \t\t\t - an object array with substitution parameters for the message\r\n\t * @return the requested localized text message\r\n\t */\r\n\tString getMessage(String bundleKey, String bundleBaseName, Object... args);\r\n\r\n\t/**\r\n\t * Gets the localized text message for the specified bundle key,\r\n\t * from the resource bundle with the given base name, and for the specified locale.<br/>\r\n\t * If the requested message contains place holders, they will be substituted by the given arguments\r\n\t * \r\n\t * @param bundleKey \t - the key of the requested message in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized text message should be found\r\n\t * @param locale\t\t - the locale of the resource bundle\r\n\t * @param args \t\t\t - the array with substitution parameters for the message\r\n\t * @return the requested localized text message\r\n\t */\r\n\tString getMessage(String bundleKey, String bundleName, Locale locale, Object... args);\r\n\t\r\n\t/**\r\n\t * Gets the localized object for the specified bundle key, and for the resource manager default locale<br/>\r\n\t * This method should be used only if resources are stored in a subclass of {@link ResourceBundle}\r\n\t * \r\n\t * @param bundleKey - the key of the requested localized object in the resource bundle\r\n\t * @return the requested localized object\r\n\t */\r\n\tObject getObject(String bundleKey);\r\n\t\r\n\t/**\r\n\t * Gets the localized object for the specified bundle key, and for specified locale<br/>\r\n\t * This method should be used only if resources are stored in a subclass of {@link ResourceBundle}\r\n\t * \r\n\t * @param bundleKey - the key of the requested localized object in the resource bundle\r\n\t * @param locale\t- the locale of the resource bundle\r\n\t * @return the requested localized object\r\n\t */\r\n\tObject getObject(String bundleKey, Locale locale);\r\n\t\r\n\t/**\r\n\t * Gets the localized object for the specified bundle key,\r\n\t * from the resource bundle with the given name, and for the resource manager default locale<br/>\r\n\t * This method should be used only if resources are stored in a subclass of {@link ResourceBundle}\r\n\t * \r\n\t * @param bundleKey \t - the key of the requested localized object in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized object should be found\r\n\t * @return the requested localized object\r\n\t */\r\n\tObject getObject(String bundleKey, String bundleBaseName);\r\n\t\r\n\t/**\r\n\t * Gets the localized object for the specified bundle key,\r\n\t * from the resource bundle with the given name, and for specified locale<br/>\r\n\t * This method should be used only if resources are stored in a subclass of {@link ResourceBundle}\r\n\t * \r\n\t * @param bundleKey \t - the key of the requested localized object in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized object should be found\r\n\t * @param locale\t \t - the locale of the resource bundle\r\n\t * @return the requested localized object\r\n\t */\r\n\tObject getObject(String bundleKey, String bundleBaseName, Locale locale);\r\n\t\r\n\t/**\r\n\t * Indicates if the resource manager has to return <code>null</code> if a resource is missing\r\n\t * @return <code>true</code> if the resource manager has to return <code>null</code> for missing\r\n\t * resources, <code>false</code> otherwise\r\n\t */\r\n\tboolean isNullable();\r\n\t\r\n\t/**\r\n\t * Indicates if the resource manager has to return <code>null</code> if a resource is missing\r\n\t * @param nullable - <code>true</code> if the resource manager has to return <code>null</code>\r\n\t * \t\t\t\t\t for missing resource, <code>false</code> otherwise\r\n\t */\r\n\tvoid setNullable(boolean nullable);\r\n\r\n\t/**\r\n\t * Gets a set with the locales managed by the resource manager\r\n\t * @return a set of the locales managed by the resource manager\r\n\t */\r\n\tSet<Locale> getManagedLocales();\r\n\r\n\t/**\r\n\t * Gets the locale currently used as default by the resource manager\r\n\t * @return the locale currently used as default by the resource manager\r\n\t */\r\n\tLocale getDefaultLocale();\r\n}", "String getLocaleKey(String subject);", "protected ICUResourceBundle findResource(String key, String resPath, int _resource, HashMap<String, String> table, UResourceBundle requested)\n/* */ {\n/* 1150 */ ClassLoader loaderToUse = this.loader;\n/* 1151 */ String locale = null;String keyPath = null;\n/* */ \n/* 1153 */ String rpath = getAliasValue(_resource);\n/* 1154 */ if (table == null) {\n/* 1155 */ table = new HashMap();\n/* */ }\n/* 1157 */ if (table.get(rpath) != null) {\n/* 1158 */ throw new IllegalArgumentException(\"Circular references in the resource bundles\");\n/* */ }\n/* */ \n/* 1161 */ table.put(rpath, \"\");\n/* 1162 */ String bundleName; if (rpath.indexOf('/') == 0) {\n/* 1163 */ int i = rpath.indexOf('/', 1);\n/* 1164 */ int j = rpath.indexOf('/', i + 1);\n/* 1165 */ String bundleName = rpath.substring(1, i);\n/* 1166 */ if (j < 0) {\n/* 1167 */ locale = rpath.substring(i + 1);\n/* */ \n/* */ \n/* 1170 */ keyPath = resPath;\n/* */ } else {\n/* 1172 */ locale = rpath.substring(i + 1, j);\n/* 1173 */ keyPath = rpath.substring(j + 1, rpath.length());\n/* */ }\n/* */ \n/* 1176 */ if (bundleName.equals(\"ICUDATA\")) {\n/* 1177 */ bundleName = \"com/ibm/icu/impl/data/icudt48b\";\n/* 1178 */ loaderToUse = ICU_DATA_CLASS_LOADER;\n/* 1179 */ } else if (bundleName.indexOf(\"ICUDATA\") > -1) {\n/* 1180 */ int idx = bundleName.indexOf('-');\n/* 1181 */ if (idx > -1) {\n/* 1182 */ bundleName = \"com/ibm/icu/impl/data/icudt48b/\" + bundleName.substring(idx + 1, bundleName.length());\n/* 1183 */ loaderToUse = ICU_DATA_CLASS_LOADER;\n/* */ }\n/* */ }\n/* */ }\n/* */ else {\n/* 1188 */ int i = rpath.indexOf('/');\n/* 1189 */ if (i != -1) {\n/* 1190 */ locale = rpath.substring(0, i);\n/* 1191 */ keyPath = rpath.substring(i + 1);\n/* */ } else {\n/* 1193 */ locale = rpath;\n/* */ \n/* */ \n/* 1196 */ keyPath = resPath;\n/* */ }\n/* 1198 */ bundleName = this.baseName;\n/* */ }\n/* 1200 */ ICUResourceBundle bundle = null;\n/* 1201 */ ICUResourceBundle sub = null;\n/* 1202 */ if (bundleName.equals(\"LOCALE\")) {\n/* 1203 */ bundleName = this.baseName;\n/* 1204 */ keyPath = rpath.substring(\"LOCALE\".length() + 2, rpath.length());\n/* 1205 */ locale = ((ICUResourceBundle)requested).getLocaleID();\n/* */ \n/* */ \n/* 1208 */ bundle = (ICUResourceBundle)getBundleInstance(bundleName, locale, loaderToUse, false);\n/* 1209 */ if (bundle != null) {\n/* 1210 */ sub = findResourceWithFallback(keyPath, bundle, null);\n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* */ \n/* */ \n/* 1223 */ if (locale == null)\n/* */ {\n/* 1225 */ bundle = (ICUResourceBundle)getBundleInstance(bundleName, \"\", loaderToUse, false);\n/* */ }\n/* */ else {\n/* 1228 */ bundle = (ICUResourceBundle)getBundleInstance(bundleName, locale, loaderToUse, false);\n/* */ }\n/* */ \n/* */ \n/* 1232 */ StringTokenizer st = new StringTokenizer(keyPath, \"/\");\n/* 1233 */ ICUResourceBundle current = bundle;\n/* 1234 */ while (st.hasMoreTokens()) {\n/* 1235 */ String subKey = st.nextToken();\n/* 1236 */ sub = (ICUResourceBundle)current.get(subKey, table, requested);\n/* 1237 */ if (sub == null) {\n/* */ break;\n/* */ }\n/* 1240 */ current = sub;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1248 */ if (sub == null) {\n/* 1249 */ throw new MissingResourceException(this.localeID, this.baseName, key);\n/* */ }\n/* 1251 */ return sub;\n/* */ }", "protected String getResourceString (String key)\n {\n try {\n if (_bundle != null) {\n return _bundle.getString(key);\n }\n \n } catch (MissingResourceException mre) {\n Log.warning(\"Missing translation message \" +\n \"[bundle=\" + _path + \", key=\" + key + \"].\");\n }\n return null;\n }", "public String getKey() {\r\n return \"messages\";\r\n }", "public Map<Language,String> getAllMessageFired()\r\n\t{\r\n\t\treturn getAllMessageFired( getSession().getSessionContext() );\r\n\t}", "public SrvI18n(final String messagesBundleName) {\n messages = ResourceBundle.getBundle(messagesBundleName);\n }", "String getMessage(String bundleKey, String bundleName, Locale locale, Object... args);", "private static String getMessage(String key, Object... o) {\n String msg = getLogger().getResourceBundle().getString(key);\n return MessageFormat.format(msg, o);\n }", "public Map<Language,String> getAllMessageCouldHaveFired()\r\n\t{\r\n\t\treturn getAllMessageCouldHaveFired( getSession().getSessionContext() );\r\n\t}", "private String getLocalizedString(String key) {\n\t\treturn new StringResourceModel(key, null).getObject();\n\t}", "public String getString( String key )\n {\n String translation = key;\n\n if ( specificResourceBundle != null )\n {\n try\n {\n translation = specificResourceBundle.getString( key );\n }\n catch ( MissingResourceException ignored )\n {\n }\n }\n\n if ( translation.equals( key ) && globalResourceBundle != null )\n {\n try\n {\n translation = globalResourceBundle.getString( key );\n }\n catch ( MissingResourceException ignored )\n {\n }\n }\n\n return translation;\n }", "@Bean\n public MessageSource messageSource() {\n ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();\n messageSource.setBasename(\"i18n/messages\");\n messageSource.setUseCodeAsDefaultMessage(true);\n return messageSource;\n }", "public static Enumeration<String> getKeys(String baseName, Locale locale) {\n\n Enumeration<String> keys = null;\n\n try {\n ResourceBundle resource = getResourceBundle(baseName, locale);\n keys = resource.getKeys();\n } catch (Exception ex) {\n return keys;\n }\n return keys;\n }", "public String getLanguageKey();", "protected String getLookupMapName(HttpServletRequest request,\r\n\t\t\tString keyName, ActionMapping mapping) throws ServletException {\r\n\r\n\t\tif (log.isDebugEnabled()) {\r\n\t\t\tlog.debug(\"BaseAction: getLookupMapName( keyName = \" + keyName\r\n\t\t\t\t\t+ \" )\");\r\n\t\t}\r\n\r\n\t\tString methodName = null;\r\n\r\n\t\ttry {\r\n\t\t\tthis.setLocale(request, request.getLocale()); // MR - added to\r\n\t\t\t// default to JSTL\r\n\t\t\tmethodName = super.getLookupMapName(request, keyName, mapping);\r\n\t\t} catch (ServletException ex) {\r\n\t\t\tif (log.isDebugEnabled()) {\r\n\t\t\t\tlog\r\n\t\t\t\t\t\t.debug(\"BaseAction: keyName not found in resource bundle with locale \"\r\n\t\t\t\t\t\t\t\t+ request.getLocale());\r\n\t\t\t}\r\n\r\n\t\t\t// the keyname is not available in the resource bundle associated\r\n\t\t\t// with the user's locale\r\n\t\t\t// --> get find the key name in the default locale's resource bundle\r\n\t\t\tif (defaultKeyNameKeyMap == null) {\r\n\t\t\t\tdefaultKeyNameKeyMap = this.initDefaultLookupMap(request);\r\n\t\t\t}\r\n\r\n\t\t\t// Find the key for the resource\r\n\t\t\tString key = (String) defaultKeyNameKeyMap.get(keyName);\r\n\t\t\tif (key == null) {\r\n\t\t\t\tif (log.isDebugEnabled()) {\r\n\t\t\t\t\tlog.debug(\"keyName '\" + keyName\r\n\t\t\t\t\t\t\t+ \"' not found in resource bundle with locale \"\r\n\t\t\t\t\t\t\t+ request.getLocale());\r\n\t\t\t\t}\r\n\t\t\t\treturn keyName;\r\n\t\t\t\t//String message = messages.getMessage(\"dispatch.resource\",\r\n\t\t\t\t// mapping.getPath(), keyName);\r\n\t\t\t\t//throw new ServletException(message);\r\n\t\t\t}\r\n\r\n\t\t\t// Find the method name\r\n\t\t\tmethodName = (String) keyMethodMap.get(key);\r\n\t\t\tif (methodName == null) {\r\n\t\t\t\tString message = messages.getMessage(\"dispatch.lookup\", mapping\r\n\t\t\t\t\t\t.getPath(), key);\r\n\t\t\t\tthrow new ServletException(message);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn methodName;\r\n\t}", "public List getLocaleLabels() {\n\n return (localeLabels);\n\n }", "public synchronized void refreshCache() {\n\t\tlog.info(\"Refreshing message cache\");\n\t\tStopWatch stopWatch = new StopWatch();\n\t\tstopWatch.start();\n\t\tMap<String, Properties> resources = new LinkedHashMap<>();\n\t\tresources.putAll(getMessagePropertyResourcesFromClasspath());\n\t\ttry {\n\t\t\tresources.putAll(getMessagePropertyResourcesFromFilesystem()); // Filesystem takes precedence\n\t\t}\n\t\tcatch (APIException e) {\n\t\t\tlog.warn(\"Could not load message property resources from file system because of: \", e);\n\t\t}\n\t\t\n\t\tfor (String resourceName : resources.keySet()) {\n\t\t\tProperties properties = resources.get(resourceName);\n\t\t\tString nameWithoutExtension = FilenameUtils.removeExtension(resourceName);\n\t\t\tLocale locale = getLocaleFromFileBaseName(nameWithoutExtension);\n\t\t\tlog.trace(\"Adding \" + properties.size() + \" messages from \" + resourceName + \" in locale: \" + locale);\n\t\t\tfor (Object property : properties.keySet()) {\n\t\t\t\tString key = property.toString();\n\t\t\t\tString value = properties.getProperty(key);\n\t\t\t\taddPresentation(new PresentationMessage(key, locale, value, \"\"));\n\t\t\t}\n\t\t}\n\t\tstopWatch.stop();\n\t\tlog.info(\"Refreshing message cache completed. \" + presentationCache.getPresentations().size() + \" messages in\"\n\t\t + +presentationCache.getLocales().size() + \" locales in \" + stopWatch);\n\t}", "public Set<String> getUnicodeLocaleKeys() {\n/* 1042 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private String getMessage(FacesContext facesContext, String msgKey, Object... args) {\n Locale locale = facesContext.getViewRoot().getLocale();\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n ResourceBundle bundle = ResourceBundle.getBundle(\"Messages\", locale, classLoader);\n String msgValue = bundle.getString(msgKey);\n return MessageFormat.format(msgValue, args);\n }", "abstract java.lang.String getLocalizedMessage();", "public static String getMessageResourceString(String key, String lang) {\n\t\tif(lang == null) {\n\t\t\tlang = \"en\";\n\t\t}\n\t\t\n\t\tResourceBundle bundle = ResourceBundle.getBundle(Constants.RESOURCE_BUNDLE + \"_\" + lang);\t\t\n\t\t\n\t\tString text = null;\n\t\ttry {\n\t\t\ttext = bundle.getString(key);\n\t\t} catch (MissingResourceException e) {\n\t\t\ttext = \"?? key \" + key + \" not found ??\";\n\t\t}\n\t\t\n\t\treturn text;\n\t}", "public Collection getRefAlertMessageListI18NByResId(String servProdCode,Long resId) throws AAException, RemoteException;", "private StringBuilder processLocaleMessages(Locale locale) {\n StringBuilder sbTemp = new StringBuilder();\n String[] keys = {\"loading\", \"error_loading\", \"error_field\",\n \"search_len\", \"error_dictionary\", \"error_connection\", \"error_result\"};\n\n if (locale == null) {\n locale = new Locale(\"en\", \"EN\");\n }\n\n logger.finer(\"Processing locale messages for locale: \" + locale);\n\n sbTemp.append(\"var __refDataCCT__infoText = {\");\n for (String key : keys) {\n sbTemp.append(key + \":\\\"\" + messageBoundle.getString(locale, key)\n + \"\\\",\");\n }\n sbTemp.append(\"};\");\n\n return sbTemp;\n }", "String getLookupKey();", "public String getLocalizedName() {\n return resourceMap.getString(getLocalizationKey());\n }", "public java.lang.String[] getMessageContexts(){\n return localMessageContexts;\n }", "private Collection<String> loadMessagesFromFile(String folderName, String fileName){\r\n\t\tCollection<String> res = new HashSet<String>();\r\n\t\tFileManager fileMngr = new FileManager(viewsFoldersPath+\"/\"+folderName+\"/\"+fileName);\r\n\t\tString[] content;\r\n\t\tString aux, messageCode;\r\n\t\t\r\n\t\t// Loop over all file lines and add i18n&l10n codes\r\n\t\tcontent = fileMngr.readFile().split(\"\\n\");\r\n\t\tfor(int i=0; i<content.length; i++){\r\n\t\t\taux = content[i];\r\n\t\t\tif(!aux.isEmpty() && aux.charAt(0)!='#'){\r\n\t\t\t\tmessageCode = aux.split(\"=\")[0];\r\n\t\t\t\tmessageCode = messageCode.trim();\r\n\t\t\t\tif(res.contains(messageCode)) System.out.println(\"WARNING! Duplicated i18n&l10n code '\"+messageCode+\"' into \"+folderName+\"/\"+fileName);\r\n\t\t\t\tres.add(messageCode);\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn res;\r\n\t}", "private void buildCodeMessageDict() {\r\n if( _codeMessageDictionary == null ) {\r\n _codeMessageDictionary = new Hashtable();\r\n }\r\n _codeMessageDictionary.put( new Integer( SC_SUCCESS ), new String( SM_SUCCESS ) );\r\n _codeMessageDictionary.put( new Integer( SC_BAD_REQUEST ), new String( SM_BAD_REQUEST ) );\r\n _codeMessageDictionary.put( new Integer( SC_FORBIDDEN ), new String( SM_FORBIDDEN ) );\r\n _codeMessageDictionary.put( new Integer( SC_NOT_FOUND ), new String( SM_NOT_FOUND ) );\r\n _codeMessageDictionary.put( new Integer( SC_SERVER_ERROR ), new String( SM_SERVER_ERROR ) );\r\n _codeMessageDictionary.put( new Integer( SC_NOT_IMPLEMENTED ), new String( SM_NOT_IMPLEMENTED ) );\r\n _codeMessageDictionary.put( new Integer( SC_SERVICE_UNAVAILABLE ), new String( SM_SERVICE_UNAVAILABLE ) );\r\n }", "public String getMessage(Locale locale, String key, Object... params) {\n String value;\n try {\n value = ResourceBundle.getBundle(OPP_BUNDLE_NAME, locale).getString(key);\n } catch (final Throwable e) {\n LOGGER.warn(\"missing bundle key: key=\" + key + \", locale=\" + locale, e);\n value = null;\n }\n\n if (null == value || \"\".equals(value)) {\n value = \"???\" + key + \"???\";\n return value;\n }\n String message = MessageFormat.format(value, params);\n return message;\n }", "public static JwComparator<AcUspsInternationalClaim> getMessageTagComparator()\n {\n return AcUspsInternationalClaimTools.instance.getMessageTagComparator();\n }", "public List<MessageResource> listMessageResourceByMessage(String message);", "@Override\n\tpublic String getMessage() {\n\t\tResourceBundle myResources = ResourceBundle.getBundle(DEFAULT_RESOURCE_PACKAGE);\n\t\tString message = myResources.getString(MESSAGE);\n\t\t\n\t\treturn message;\n\t}", "protected String getLocaleSpecificKey(String localeKey) {\n return CONTENT_KEY.concat(\"-\").concat(localeKey);\n }", "public Map<Integer, SystemMessage> getSystemMessages(){\n\t\treturn hmSysMsg;\n\t}", "protected String getResourceString(String key)\r\n\t\t\tthrows MissingResourceException {\r\n\t\treturn StripesFilter.getConfiguration().getLocalizationBundleFactory()\r\n\t\t\t\t.getErrorMessageBundle(locale).getString(key);\r\n\t\t\r\n\t}", "public abstract String resolveText(Locale locale, String key, Serializable[] arguments);", "String getLocalization();", "@SuppressWarnings(\"unchecked\")\n private Map<String, String> getMessages(final String taggedValue)\n {\n\n Map<String, String> messages;\n\n final Collection taggedValues = this.findTaggedValues(taggedValue);\n\n if (taggedValues.isEmpty())\n {\n\n messages = Collections.EMPTY_MAP;\n\n } else\n {\n\n messages = new LinkedHashMap<String, String>(); // we want to keep the order\n\n for (final Iterator iterator = taggedValues.iterator(); iterator.hasNext();)\n {\n\n final String value = (String) iterator.next();\n\n messages.put(StringUtilsHelper.toResourceMessageKey(value), value);\n\n }\n\n }\n\n return messages;\n\n }", "public Set<String> getLocaleKeywordKeys() {\n return _extensions.getLocaleKeywordKeys();\n }", "public Map<Integer, List<Message>> getMessagesMap() {\n return messagesMap;\n }", "public void read(List<String> directories) throws KettleException {\n\t\tfor (String messagePackage : messagesPackages) {\n\t\t\tMessagesStore messagesStore = new MessagesStore(locale, messagePackage, packageOccurrences);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tmessagesStore.read(directories);\n\t\t\t\tlocaleMap.put(messagePackage, messagesStore);\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\tif (locale.equals(mainLocale)) {\n\t\t\t\t\tthrow new KettleException(e);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlog.logDetailed(\"No translations found for locale '\"+locale+\"' in package '\"+messagePackage+\"'\");\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "public static HashMap<String, String> getLangs() {\r\n\t\t// search for it\r\n\t\tHashMap<String, String> names = new HashMap<String, String>();\r\n\t\tnames.put(\"de\", \"Deutsch (integriert) - German (included)\");\r\n\r\n\t\t// load all files from this dir\r\n\t\tfor (File f : new File(YAamsCore.programPath, \"lang\").listFiles()) {\r\n\t\t\tif (f.isDirectory() && new File(f, \"info.xml\").canRead()) {\r\n\t\t\t\tHashMap<String, String> data = (HashMap<String, String>) FileHelper.loadXML(new File(f, \"info.xml\"));\r\n\t\t\t\tnames.put(f.getName(), data.get(\"title\"));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn names;\r\n\t}", "public void initDynamicI18NBindings() {\n }", "public static Map<Long,Message> getMessages(){\r\n\t\treturn messages;\r\n\t\t\r\n\t}", "@RequestMapping(value = \"/messageresource/localize\", method = RequestMethod.GET)\n\tpublic String localizeMessageResource(Model model, Locale locale) {\n\n\t\tlogger.debug(\"localizeMessageResource()\");\n\n\t\tMessageResourceTranslationBackingBean messageResourceTranslationBackingBean = new MessageResourceTranslationBackingBeanImpl();\n\t\tmessageResourceTranslationBackingBean.setCurrentMode(MessageResource.CurrentMode.LOCALIZE);\n\t\tmodel.addAttribute(\"messageResourceTranslationFormModel\", messageResourceTranslationBackingBean);\n\t\tLong defaultLocale = Long.valueOf(Constants.REFERENCE_LOCALE__EN);\n\t\tsetTranslationDropDownContents(model, locale);\n\t\tsetDropDownContents(model, null, locale);\t\t\n\t\tmodel.addAttribute(\"defaultLocale\", defaultLocale);\n\t\t\n\t\treturn \"messages/messageresource_localize\";\n\n\t}", "InternationalString createInternationalString(Map<Locale,String> strings);", "public List<Locale> getLocaleList(final String key) {\n return getLocaleList(key, new ArrayList<>());\n }", "public static String getMessage(String messageKey, Object... args) {\r\n\t\t\r\n\t\tif (messageSource == null)\r\n\t\t\treturn \"ApplicationContext unavailable, probably unit test going on\";\r\n\t\t\r\n\t\t// http://stackoverflow.com/questions/10792551/how-to-obtain-a-current-user-locale-from-spring-without-passing-it-as-a-paramete\r\n\t\treturn messageSource.getMessage(messageKey, args,\r\n\t\t\t\tLocaleContextHolder.getLocale());\r\n\t}", "public Map<String, MessageContainer> getContextMessageContainers() {\n\n Map<String, MessageContainer> contextMessageContainer = new HashMap<>();\n fileContextMap.entrySet().stream().filter(entry -> CollectionUtils\n .isNotEmpty(entry.getValue().getMessageContainer().getErrorMessageList())).forEach(\n entry -> contextMessageContainer.put(\n entry.getKey(), entry.getValue()\n .getMessageContainer()));\n messageContainerMap.entrySet().stream()\n .filter(entry -> CollectionUtils.isNotEmpty(entry.getValue().getErrorMessageList()))\n .forEach(entry -> contextMessageContainer.put(entry.getKey(), entry.getValue()));\n return contextMessageContainer;\n }", "public String getMessage(String key) {\n return messages.getProperty(key);\n }", "public static String getLabelBundle(String key){\r\n \tFacesContext context = FacesContext.getCurrentInstance();\r\n \tResourceBundle bundle = context.getApplication().getResourceBundle(context, Constantes.RESOURCE_BUNDLE_VAR);\r\n \treturn bundle.getString(key);\r\n }", "protected String getKeyAndLookupInBundle(FacesContext context,\n \t\t\t\t\t UIComponent component, \n \t\t\t\t\t String keyAttr) throws MissingResourceException{\n \tString key = null, bundleName = null;\n \tResourceBundle bundle = null;\n \n \tParameterCheck.nonNull(context);\n \tParameterCheck.nonNull(component);\n \tParameterCheck.nonNull(keyAttr);\n \n key = (String) component.getAttribute(keyAttr);\n bundleName = (String)component.getAttribute(RIConstants.BUNDLE_ATTR);\n \n // if the bundleName is null for this component, it might have\n // been set on the root component.\n if ( bundleName == null ) {\n UIComponent root = context.getTree().getRoot();\n Assert.assert_it(root != null);\n bundleName = (String)root.getAttribute(RIConstants.BUNDLE_ATTR);\n }\n \t// verify our component has the proper attributes for key and bundle.\n \tif (null == key || null == bundleName) {\n \t throw new MissingResourceException(Util.getExceptionMessage(\n Util.MISSING_RESOURCE_ERROR_MESSAGE_ID),bundleName, key);\n \t}\n \t\n \t// verify the required Class is loadable\n \t// PENDING(edburns): Find a way to do this once per ServletContext.\n \tif (null == Thread.currentThread().getContextClassLoader().\n \t getResource(\"javax.servlet.jsp.jstl.fmt.LocalizationContext\")){\n \t Object [] params = { \"javax.servlet.jsp.jstl.fmt.LocalizationContext\" };\n \t throw new MissingResourceException(Util.getExceptionMessage(Util.MISSING_CLASS_ERROR_MESSAGE_ID, params), bundleName, key);\n \t}\n \t\n \t// verify there is a ResourceBundle for this modelReference\n \tjavax.servlet.jsp.jstl.fmt.LocalizationContext locCtx = null;\n \tif (null == (locCtx = (javax.servlet.jsp.jstl.fmt.LocalizationContext) \n \t\t context.getModelValue(bundleName)) ||\n \t null == (bundle = locCtx.getResourceBundle())) {\n \t throw new MissingResourceException(Util.getExceptionMessage(Util.MISSING_RESOURCE_ERROR_MESSAGE_ID), bundleName, key);\n \t}\n \t\n \treturn bundle.getString(key);\n }", "public List<ApMessage> searchbyname(Map map) {\n\t\treturn apMessageDao.searchbyname(map);\r\n\t}", "private static String getMessage(String key)\n {\n return mh.getMessage(key);\n }", "public String getI18Key() {\r\n\t\treturn i18Key;\r\n\t}", "public static String getString(String key) {\r\n\t\ttry {\r\n\t\t\treturn RESOURCE_BUNDLE.getString(key);\r\n\t\t} catch (MissingResourceException e) {\r\n\t\t\treturn \"Message retrieval error, please notify an administrator.\";\r\n\t\t}\r\n\t}", "public void testXW404() {\n\n ResourceBundle rbFrance = localizedTextProvider.findResourceBundle(\"com/opensymphony/xwork2/util/XW404\", Locale.FRANCE);\n ResourceBundle rbItaly = localizedTextProvider.findResourceBundle(\"com/opensymphony/xwork2/util/XW404\", Locale.ITALY);\n ResourceBundle rbGermany = localizedTextProvider.findResourceBundle(\"com/opensymphony/xwork2/util/XW404\", Locale.GERMANY);\n\n assertNotNull(rbFrance);\n assertEquals(\"Bonjour\", rbFrance.getString(\"hello\"));\n\n assertNull(rbItaly);\n\n assertNotNull(rbGermany);\n assertEquals(\"Hallo\", rbGermany.getString(\"hello\"));\n }", "Set<Locale> getManagedLocales();", "public static String lookup(String baseName, String key, Object args,\r\n Locale locale)\r\n {\r\n return lookup(baseName, key, args, locale, null);\r\n }", "public interface BelphegorDisplayStrings extends Messages {\n @Key(\"addCategoryPrompt\")\n String addCategoryPrompt();\n\n @DefaultMessage(\"Successfully added {0} to the following Categories: {1,list}.\")\n @AlternateMessage({\"=1\", \"Successfully added {0} to the following Category: {1,list}.\"})\n @Key(\"appCategorizeSuccess\")\n String appCategorizeSuccess(String name, @PluralCount List<String> groupNames);\n\n @Key(\"appDescription\")\n String appDescription();\n\n String appDocumentationLabel();\n\n @Key(\"avgUserRatingColumnLabel\")\n String avgUserRatingColumnLabel();\n\n @Key(\"categorize\")\n String categorize();\n\n @Key(\"clearSelection\")\n String clearSelection();\n\n @Key(\"confirmDeleteAppCategory\")\n String confirmDeleteAppCategory(String name);\n\n @Key(\"confirmDeleteAppTitle\")\n String confirmDeleteAppTitle();\n\n @Key(\"deleteApp\")\n String deleteApp();\n\n @Key(\"deleteCategory\")\n String deleteCategory();\n\n String docHelpHtml();\n\n @Key(\"editApp\")\n String editApp();\n\n @Key(\"moveCategory\")\n String moveCategory();\n\n @Key(\"referenceGenomes\")\n String referenceGenomes();\n\n @Key(\"renamePrompt\")\n String renamePrompt();\n\n @Key(\"restoreApp\")\n String restoreApp();\n\n @Key(\"restoreAppSuccessMsg\")\n String restoreAppSuccessMsg(String name, String s);\n\n @Key(\"restoreAppSuccessMsgTitle\")\n String restoreAppSuccessMsgTitle();\n\n @Key(\"selectCategories\")\n String selectCategories(String name);\n\n @Key(\"systemMessages\")\n String systemMessages();\n\n @Key(\"tempDisable\")\n String tempDisable();\n\n String templateLinkPopupHeading();\n\n String templateLinkTitle();\n\n @Key(\"toolRequests\")\n String toolRequests();\n\n @Key(\"toolAdmin\")\n String toolAdmin();\n\n String updateDocumentationSuccess();\n}", "protected String toDisplayString(final String name, final Locale locale) {\n try {\n return ResourceBundle.getBundle(name, locale).getString(key);\n } catch (ClassCastException | MissingResourceException ignored) {\n return key; // return the non-localized key\n }\n }", "@GetMapping(\"/admin/allMessages\")\n public Map<String, Object> allMessages() {\n Map<String, Object> responseMap = new HashMap<String, Object>();\n responseMap.put(\"messages\", messagesService.allMessages());\n\n return responseMap;\n }", "String getString(String bundleKey, Locale locale);", "private String getMessage(String msgKey, Object... values) {\n String msg;\n try {\n msg = systemMessages.getString(msgKey);\n }\n catch (MissingResourceException ex) {\n return \"Error in data service: \" + msgKey;\n }\n\n return MessageFormat.format(msg, values);\n }", "public static String getValue(String key){\n\t\tResourceBundle rb = ResourceBundle.getBundle(\"message\");\n\t\tString value = rb.getString(key);\n\t\treturn value;\n\t}", "public static String getMessage(String msgKey, Object[] msgParams, String defaultMsg, Locale locale) {\n final boolean debugEnabled = log.isDebugEnabled();\n if (_msgSrcs != null && _msgSrcs.length > 0) {\n if (locale == null) {\n locale = Locale.getDefault();\n }\n for (MessageSource ms : _msgSrcs) {\n try {\n return ms.getMessage(msgKey, msgParams, locale);\n } catch (NoSuchMessageException nsme) {\n// continue;\n }\n }\n if (debugEnabled) {\n log.debug(\"****Message \" + msgKey + \" is not found in available message sources\");\n }\n } else if (debugEnabled) {\n log.debug(\"****No message source available\");\n }\n if (defaultMsg == null) {\n return null;\n }\n return MessageFormat.format(defaultMsg, msgParams);\n }", "javax.management.ObjectName getMessageCache();", "public List<MessageResource> listMessageResource();", "protected String localize(Map<String, String> labels, String s) {\n return labels.containsKey(s) ? labels.get(s) : (\"Untranslated:\" + s);\n }" ]
[ "0.63134414", "0.6229551", "0.6169135", "0.61509407", "0.61130375", "0.6037601", "0.6025221", "0.59529406", "0.586891", "0.5823668", "0.5797529", "0.5786797", "0.5777056", "0.57605004", "0.5741173", "0.5717275", "0.5702963", "0.57021916", "0.56644917", "0.56406623", "0.5607066", "0.5589888", "0.55633175", "0.55044407", "0.5502952", "0.54934794", "0.54751533", "0.5474643", "0.5472279", "0.5472261", "0.547078", "0.54604673", "0.5446456", "0.5428499", "0.5407098", "0.5393796", "0.53860813", "0.5345501", "0.53329474", "0.53039616", "0.53037137", "0.5296249", "0.52226853", "0.521277", "0.52118534", "0.5197585", "0.51966906", "0.51576394", "0.5155962", "0.51522326", "0.51506287", "0.51381826", "0.5128337", "0.5115322", "0.51143247", "0.51133347", "0.5094702", "0.5093332", "0.5091624", "0.50867766", "0.5084724", "0.5079009", "0.5073548", "0.5073166", "0.50600904", "0.5058065", "0.5054994", "0.5050799", "0.50451744", "0.5044581", "0.5041508", "0.5038812", "0.5036154", "0.5035208", "0.5034343", "0.50323653", "0.5020451", "0.5019618", "0.5008172", "0.5001913", "0.5001629", "0.4994995", "0.49761954", "0.4974011", "0.4963256", "0.49632344", "0.4956944", "0.4949315", "0.4935821", "0.49309808", "0.49189094", "0.49186018", "0.49137112", "0.4902091", "0.4901742", "0.4896602", "0.48964354", "0.48921672", "0.48921007", "0.4882778" ]
0.7215652
0
Method.............................................authenticate Author......................................................JLH This method authenticates a user via username and password Return Value (Credentials) credentials: Returns a credentials bean of the user that logged in.
public static synchronized Credentials authenticate(String userName, String password){ Connection connection; Credentials credentials=null; PreparedStatement statement=null; String preparedSQL = "SELECT * FROM Credential WHERE Email = ? and Pass = ?"; try{ connection=DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setString(1, userName); statement.setString(2, password); ResultSet rs = statement.executeQuery(); if(rs.next()){ credentials = new Credentials(); credentials.setCredID(rs.getInt(1)); credentials.setUserID(rs.getInt(2)); credentials.setEmail(rs.getString(3)); credentials.setPass(rs.getString(4)); credentials.setRole(rs.getString(5)); credentials.setValid(rs.getInt(6)); credentials.setRegKey(rs.getString(7)); } rs.close(); statement.close(); connection.close(); }catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); credentials = null; } return credentials; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "LoggedUser authenticate(@Valid AccountCredentials credentials) throws IOException;", "public void authenticate(LoginCredentials credentials) throws LoginException;", "@Override\n public AuthenticatedUser authenticateUser(Credentials credentials)\n throws GuacamoleException {\n SSOAuthenticationProviderService authProviderService =\n injector.getInstance(SSOAuthenticationProviderService.class);\n\n return authProviderService.authenticateUser(credentials);\n\n }", "@Override\n\tpublic Authentication authenticate(Authentication auth) throws AuthenticationException {\n\t\t username = auth.getName();\n\t\tString pass = auth.getCredentials().toString();\n\t\t\n\t\tif(AppController.users.containsKey(username))\n\t\t{\n\t\tString password = AppController.users.get(username); \n\t\t\t\n\t\tif(password.equals(pass))\n\t\t\treturn new UsernamePasswordAuthenticationToken(username,pass,Collections.EMPTY_LIST);\n\t\telse\n\t\t\tthrow new BadCredentialsException(\"authentication failed\");\n\t\t\n\t\t}\n\t\telse\n\t\t\tthrow new BadCredentialsException(\"authentication failed\");\n\t}", "User authenticate(String username, String password);", "public User doAuthentication(String account, String password);", "@Override\n public boolean authenticated(final String username, final String password) {\n\n Claim claim;\n try {\n claim = credService.authenticate(new PasswordCredentialsWrapper(username, password));\n } catch (AuthenticationException e) {\n LOG.debug(\"Authentication failed for user '{}' : {}\", username, e);\n return false;\n }\n\n LOG.debug(\"Authentication result for user '{}' : {}\", username, claim.domain());\n return true;\n }", "public AuthToken login(UserCreds credentials) throws ResourceNotFoundException, UnauthorizedException {\n User user = getByName(credentials);\n // Check if user is authorized\n if (!user.getUserCreds().equals(credentials)) throw new UnauthorizedException();\n // Generate auth token\n AuthToken token = new AuthToken(user);\n // Return the token\n return token;\n }", "public void authenticate() {\n LOGGER.info(\"Authenticating user: {}\", this.name);\n WebSession result = null;\n try {\n result =\n getContext()\n .getAuthenticationMethod()\n .authenticate(\n getContext().getSessionManagementMethod(),\n this.authenticationCredentials,\n this);\n } catch (UnsupportedAuthenticationCredentialsException e) {\n LOGGER.error(\"User does not have the expected type of credentials:\", e);\n } catch (Exception e) {\n LOGGER.error(\"An error occurred while authenticating:\", e);\n return;\n }\n // no issues appear if a simultaneous call to #queueAuthentication() is made\n synchronized (this) {\n this.getAuthenticationState().setLastSuccessfulAuthTime(System.currentTimeMillis());\n this.authenticatedSession = result;\n }\n }", "@Override\n\tpublic Authentication authenticate(Authentication authentication) throws AuthenticationException {\n\t\tString userId = authentication.getPrincipal().toString();\n\t\tString password = authentication.getCredentials().toString();\n\t\tUserInfo userAuth = Config.getInstance().getUserAuth();\n\t\tuserAuth.setUserEmail(userId);\n\t\tuserAuth.setUserPassword(password);\n\t\tLoginService loginService = Config.getInstance().getLoginService();\n\t\tUserInfo userInfo;\n\t\ttry{\n\t\t\tuserInfo = loginService.authenticateUser(userId,password);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new AuthenticationServiceException(\"1000\");\n\t\t}\n\t\tif (userInfo != null)\n\t\t{\n\t\t\treturn grantNormalRole(userInfo, authentication);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// No user with this banner id found.\n\t\t\tthrow new BadCredentialsException(\"1001\");\n\t\t}\n\t}", "@Override\n\tpublic User getUserWithCredentials(String username, String password) {\n\t\tUser loginUser=mobileDao.getLoginUser(username);\n\t\t//System.out.println(\"password is -\"+loginBean.getPassword());\n\t\tif(loginUser!=null)\n\t\t{\t\n\t\t\tif(password.equals(loginUser.getPassword()))\n\t\t\t\treturn loginUser;\n\t\t}\n\t\treturn null;\n\t}", "boolean authenticate(String userName, String password);", "private Authentication tryToAuthenticateWithUsernameAndPassword(String username, String password) {\n\t\tUsernamePasswordAuthenticationToken requestAuthentication = new UsernamePasswordAuthenticationToken(username, password);\n\t\treturn tryToAuthenticate(requestAuthentication);\n \n\t}", "@PostMapping(Constants.URI_API_AUTH)\n\tpublic ResponseEntity<?> authenticateUser(@RequestParam(required=true) String username,\n\t\t\t\t\t\t\t\t\t\t\t @RequestParam(required=true) String password){\n\t\t\n\t\tLOG.debug(\"API Authenticate User: User '\" + username + \"'\");\n\t\t\n\t\tAuthenticationToken authToken = new AuthenticationToken(userService.authenticateUser(username, password));\n\t\t\n\t\treturn ResponseEntity.ok(authToken);\n\t}", "@Override\n\tpublic String authenticate(String username, String password) throws RemoteException\n\t{\n\t\tIterator<User> userIterator = this.users.iterator();\n\t\tUser user;\n\t\t//For every user in users\n\t\twhile (userIterator.hasNext())\n\t\t{\n\t\t\tuser = userIterator.next();\n\t\t\t//If this user's username matches the given username\n\t\t\tif (user.getUsername().equals(username))\n\t\t\t{\n\t\t\t\t//If this user's password matches the given password\n\t\t\t\tif (user.getPassword().equals(password))\n\t\t\t\t{\n\t\t\t\t\t//Generate a unique userToken\n\t\t\t\t\tString userToken = \"\";\n\t\t\t\t\tboolean duplicate = true;\n\t\t\t\t\twhile (duplicate)\n\t\t\t\t\t{\n\t\t\t\t\t\tuserToken = genUserToken();\n\t\t\t\t\t\tif (matchUser(userToken) == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduplicate = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t//Give the userToken to the user and return it\n\t\t\t\t\t}\n\t\t\t\t\tfor(int i = 0; i < users.size(); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tuser = users.get(i);\n\t\t\t\t\t\tif(user.getUsername().equals(username))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tuser.setUserToken(userToken);\n\t\t\t\t\t\t\tServerStartup.refreshSaver();\n\t\t\t\t\t\t\treturn userToken;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tServerStartup.refreshSaver();\n\t\t\t\t\treturn userToken;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//If no username/password match was found, return null.\n\t\treturn null;\n\t}", "@PreAuthorize(\"permitAll()\")\n @RequestMapping(\n value = \"/users/auth\",\n method = RequestMethod.POST\n )\n public ResponseEntity<AuthResponse> authenticate(@RequestParam(value = \"username\") String username, @RequestParam(value = \"password\") String password) {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(username, password)\n );\n\n SecurityContextHolder.getContext().setAuthentication(authentication);\n final UserDetails userDetails = userDetailsService.loadUserByUsername(username);\n final String token = tokenUtils.generateToken(userDetails);\n\n return ResponseEntity.ok(new AuthResponse(token));\n }", "List<String> authenticateUser(String userName, String password);", "@RequestMapping(value = \"/authenticate\", method = { RequestMethod.POST })\n public AuthResult authorize(@RequestParam String username, @RequestParam String password) {\n\n\n UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(username, password);\n try {\n Authentication authentication = authenticationManager.authenticate(token);\n SecurityContextHolder.getContext().setAuthentication(authentication);\n User user = userService.getUserByUserName(username);\n return new AuthResult(tokenUtils.createToken(user), \"\", Status.OK);\n } catch (AuthenticationException ex){\n return new AuthResult(\"\", ex.getMessage(), Status.ERROR);\n }\n\n\n\n //return new UserInfo(user.getUsername(), tokenUtils.createToken(user));\n }", "public AuthenticationCredentials getAuthenticationCredentials() {\n return authenticationCredentials;\n }", "@Override\n\tpublic boolean isUserAuthenticate(String username, String password) {\n\t\t// validate username and pwd with predefined credentials\n\t\tif (username.equals(Utility.USERNAME) && password.equals(Utility.PASSWORD)) {\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic Authentication Login(String username, String password) {\n\t\t try {\n\t\t\t\n \tAuthentication request = new UsernamePasswordAuthenticationToken(username, password);\n \tAuthentication result =authenticationManager.authenticate(request);\n \tSecurityContextHolder.getContext().setAuthentication(result);\n \treturn result;\n\t\t }\n\t\t catch(AccessDeniedException e) {\n\t \t System.out.println(\"Authentication failed: \" + e.getMessage()) ;\n\t }\n\t\t catch(BadCredentialsException e) {\n\t\t\t System.out.println(\"Authentication failed: \" + e.getMessage()) ;\n\t } catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t \t System.out.println(\"Authentication failed: \" + e.getMessage()) ;\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\n\t\t return null;\n\t}", "EmployeeMaster authenticateUser(int employeeId, String password);", "public String loginUser(Credentials credentials) throws Exception {\n\n\t\tString url = server_url + \"/user/login\";\n\t\tURL obj = new URL(url);\n\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\n\t\t//add request header\n\t\tcon.setRequestMethod(\"POST\");\n\t\tcon.setRequestProperty(\"User-Agent\", \"Mozilla/5.0\");\n\t\tcon.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.5\");\n\n\t\t//String urlParameters = \"username=\" + credentials.username + \"&password=\" + credentials.password;\n\t\tJsonObject urlParameters = new JsonObject();\n\t\turlParameters.addProperty(\"username\", credentials.username);\n\t\turlParameters.addProperty(\"password\", credentials.password);\n\t\t\n\t\t// Send post request\n\t\tcon.setDoOutput(true);\n\t\tDataOutputStream wr = new DataOutputStream(con.getOutputStream());\n\t\twr.writeBytes(urlParameters.toString());\n\t\twr.flush();\n\t\twr.close();\n\n\t\tint responseCode = con.getResponseCode();\n\t\t\n\t\tif (responseCode != 200) {\n\t\t\treturn \"Failure\";\n\t\t}\n\t\t////System.out.println(\"\\nSending 'POST' request to URL : \" + url);\n\t\t////System.out.println(\"Post parameters : \" + urlParameters);\n\t\t////System.out.println(\"Response Code : \" + responseCode);\n\t\t\n\t\tif (responseCode == 400) {\n\t\t\tthrow new Exception();\n\t\t}\n\t\t\n\t\t//When we log in the server gives us a cookie that keeps the user identity\n\t\tusercookie = con.getHeaderField(\"set-cookie\");\n\t\tusercookie = usercookie.substring(0, usercookie.length() - 8);\n\n//\t\t@SuppressWarnings(\"deprecation\")\n//\t\tString decodedUserCookie = URLDecoder.decode(usercookie.substring(11));\n//\t\t\n//\t\tJsonParser jsonParser = new JsonParser();\n//\t\tJsonObject element = jsonParser.parse(decodedUserCookie).getAsJsonObject();\n\n\t\tBufferedReader in = new BufferedReader(\n\t\t new InputStreamReader(con.getInputStream()));\n\t\tString inputLine;\n\t\tStringBuffer response = new StringBuffer();\n\n\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\tresponse.append(inputLine);\n\t\t}\n\t\tin.close();\n\t\t\n\t\treturn response.toString();\n\t}", "public List<Authentication> getLoginCredentials(String username,String password) {\n // select * from administrators where adminID='Admin1' and password='123456';\n String loginQuery = \"SELECT * FROM administrators WHERE adminID = ? and password = ?\";\n return loginTemplate.query(loginQuery, (rs, rowNum) -> {\n Authentication authentication = new Authentication();\n authentication.setPassword(rs.getString(\"password\"));\n authentication.setUsername(rs.getString(\"adminID\"));\n\n System.out.println(authentication);\n return authentication;\n\n }, username,password\n );\n }", "int authenticateUser(IDAOSession session, String userName, String password);", "public boolean authenticateUser(String userName,String password) throws ToDoListDAOException{\r\n\t\t\r\n\t\t User user = getUserByUserName(userName); \r\n\t\t System.out.println(userName + \" \" + password);\r\n\t if(user!=null && user.getUserName().equals(userName) && user.getPassword().equals(password)){\r\n\t return true;\r\n\t }else{\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t}", "AuthenticationResponseDTO authenticateUser(String email, String password);", "public Boolean authenticateUser(String username, String password) throws SQLException{\n\t\tStatement stmt = conn.createStatement();\n\t\tString querystring = String.format(\n\t\t\t\t\"SELECT * FROM user where username='%s' AND password='%s';\", \n\t\t\t\tusername,\n\t\t\t\tpassword);\n\t\tResultSet rs = stmt.executeQuery(querystring);\n\t\tBoolean result = rs.first();\n\t\trs.close();\n\t\tstmt.close();\n\t\treturn result;\n\t}", "private void authenticate(String username, String password) throws Exception {\n\t\tboolean autenticated = false;\n\t\tEntityManagerFactory factory = Persistence.createEntityManagerFactory(\"ForumApp\");\n\t\tEntityManager em = factory.createEntityManager();\n\n\t\tTypedQuery<User> q = em.createQuery(\"SELECT u FROM User u WHERE u.username = '\" + username + \"'\", User.class);\n\t\tUser user = q.getSingleResult();\n\n\t\tif (user != null) {\n\n\t\t\tif (user.getPassword().equals(password)) {\n\t\t\t\tautenticated = true;\n\t\t\t}\n\t\t}\n\n\t\t// Close the entity manager\n\t\tem.close();\n\t\tfactory.close();\n\n\t\t// Throw an Exception if the credentials are invalid\n\t\tif (!autenticated) {\n\t\t\tthrow new Exception();\n\t\t}\n\t}", "private void authenticate(String user, String pass) {\n }", "public User logIn(String username, String password) {\n\t\tUser user = null;\n\t\ttry {\n\t\t\tTypedQuery<User> query = em.createNamedQuery(\"User.findByCredentials\", User.class);\n\t\t\tquery.setParameter(\"inUsername\", username);\n\t\t\tquery.setParameter(\"inPassword\", password);\n\t\t\tuser = query.getSingleResult();\n\t\t\tif (user != null) {\n\t\t\t\tuser.setToken(generateToken());\n\t\t\t\tem.merge(user);\n\t\t\t}\n\t\t\treturn user;\n\t\t} catch (Exception e) {\n\t\t\tlogger.log(Level.WARNING, \"User not found\", e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public Authentication authenticate(Authentication authentication) throws AuthenticationException {\n\n String id = authentication.getName();\n String password = authentication.getCredentials().toString();\n\n Optional<Employee> found = employeeService.get(id);\n if (found.isPresent()) {\n Employee employee = found.get();\n\n // Get employee's roles\n List authorities = getAuthorities(employee);\n\n // Check password\n String encodedPassword = employee.getPassword();\n if (encoder.matches(password, encodedPassword)) {\n // Return the valid authentication that will be stored in SecurityContext\n return new UsernamePasswordAuthenticationToken(\n id, encodedPassword, authorities);\n }\n }\n\n throw new BadCredentialsException(\"Invalid credentials\");\n }", "@Override\r\n public Authentication authenticate(final Authentication authentication) {\r\n final String credentials = (String) authentication.getCredentials();\r\n if (credentials == null || credentials.isEmpty()) {\r\n final GrantedAuthority grantedAuthority = new GrantedAuthorityImpl(\"\");\r\n final GrantedAuthority[] grantedAuthorities = { grantedAuthority };\r\n return new AnonymousAuthenticationToken(\"key\", \"Anonymous\", grantedAuthorities);\r\n }\r\n final UserDetails userDetails = escidocUserDetailsService.loadUserByUsername(credentials);\r\n return new UsernamePasswordAuthenticationToken(userDetails, credentials);\r\n }", "@Override\n public String authenticate(String username, String password) {\n String jwt = null;\n\n // Find the user by its username.\n final User user = new JPAQueryFactory(em)\n .selectFrom(qUser)\n .where(qUser.username.eq(username))\n .fetchOne();\n\n // If a user was found, check the hashed version of the password and produce a JWT if a match\n // is found.\n if (user != null) {\n try {\n String hashedPassword = cryptoService.md5(user.getSalt() + password).toLowerCase();\n if (hashedPassword.equals(user.getPassword().toLowerCase())) {\n JWTGenerateRequest request = new JWTGenerateRequest();\n request.setId(Constants.JWT_ISSUER);\n request.setTtl(Constants.JWT_TTL);\n final Optional<SettingDTO> setting = settingsService\n .getSetting(Constants.JWT_SECRET_SETTING_KEY);\n if (setting.isPresent()) {\n request.setSecret(setting.get().getSettingVal());\n }\n request.setSubject(username);\n request.setIssuer(Constants.JWT_ISSUER);\n jwt = JWTUtil.generateToken(request);\n } else {\n throw new AuthenticationException();\n }\n } catch (NoSuchAlgorithmException e) {\n LOGGER.log(Level.SEVERE, \"Could not check password.\", e);\n throw new AuthenticationException();\n }\n } else { // Username not found. \n\t\t\tthrow new AuthenticationException();\n\t\t}\n\n return jwt;\n }", "public BasicAuthenticationCredentials(String userName, String password) {\n this.userName = userName;\n this.password = password;\n }", "private UserSession handleBasicAuthentication(String credentials, HttpServletRequest request) {\n\t\tString userPass = Base64Decoder.decode(credentials);\n\n\t\t// The decoded string is in the form\n\t\t// \"userID:password\".\n\t\tint p = userPass.indexOf(\":\");\n\t\tif (p != -1) {\n\t\t\tString userID = userPass.substring(0, p);\n\t\t\tString password = userPass.substring(p + 1);\n\t\t\t\n\t\t\t// Validate user ID and password\n\t\t\t// and set valid true if valid.\n\t\t\t// In this example, we simply check\n\t\t\t// that neither field is blank\n\t\t\tIdentity identity = WebDAVAuthManager.authenticate(userID, password);\n\t\t\tif (identity != null) {\n\t\t\t\tUserSession usess = UserSession.getUserSession(request);\n\t\t\t\tsynchronized(usess) {\n\t\t\t\t\t//double check to prevent severals concurrent login\n\t\t\t\t\tif(usess.isAuthenticated()) {\n\t\t\t\t\t\treturn usess;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tusess.signOffAndClear();\n\t\t\t\t\tusess.setIdentity(identity);\n\t\t\t\t\tUserDeletionManager.getInstance().setIdentityAsActiv(identity);\n\t\t\t\t\t// set the roles (admin, author, guest)\n\t\t\t\t\tRoles roles = BaseSecurityManager.getInstance().getRoles(identity);\n\t\t\t\t\tusess.setRoles(roles);\n\t\t\t\t\t// set authprovider\n\t\t\t\t\t//usess.getIdentityEnvironment().setAuthProvider(OLATAuthenticationController.PROVIDER_OLAT);\n\t\t\t\t\n\t\t\t\t\t// set session info\n\t\t\t\t\tSessionInfo sinfo = new SessionInfo(identity.getName(), request.getSession());\n\t\t\t\t\tUser usr = identity.getUser();\n\t\t\t\t\tsinfo.setFirstname(usr.getProperty(UserConstants.FIRSTNAME, null));\n\t\t\t\t\tsinfo.setLastname(usr.getProperty(UserConstants.LASTNAME, null));\n\t\t\t\t\tsinfo.setFromIP(request.getRemoteAddr());\n\t\t\t\t\tsinfo.setFromFQN(request.getRemoteAddr());\n\t\t\t\t\ttry {\n\t\t\t\t\t\tInetAddress[] iaddr = InetAddress.getAllByName(request.getRemoteAddr());\n\t\t\t\t\t\tif (iaddr.length > 0) sinfo.setFromFQN(iaddr[0].getHostName());\n\t\t\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t\t\t // ok, already set IP as FQDN\n\t\t\t\t\t}\n\t\t\t\t\tsinfo.setAuthProvider(BaseSecurityModule.getDefaultAuthProviderIdentifier());\n\t\t\t\t\tsinfo.setUserAgent(request.getHeader(\"User-Agent\"));\n\t\t\t\t\tsinfo.setSecure(request.isSecure());\n\t\t\t\t\tsinfo.setWebDAV(true);\n\t\t\t\t\tsinfo.setWebModeFromUreq(null);\n\t\t\t\t\t// set session info for this session\n\t\t\t\t\tusess.setSessionInfo(sinfo);\n\t\t\t\t\t//\n\t\t\t\t\tusess.signOn();\n\t\t\t\t\treturn usess;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Boolean authenticate(String username, String password) {\n try {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(\n username,\n password\n )\n );\n\n SecurityContextHolder.getContext().setAuthentication(authentication);\n return true;\n } catch (BadCredentialsException e) {\n return false;\n }\n }", "public User checkAuthentication(String username, String password) {\n\t\tUser user = null;\n\t\ttry {\n\t\t\tsendMessage(\"authenticate\");\n\t\t\t\n\t\t\tUser userAuthentication = new User(username, password);\n\t\t\tsocketObjectOut.writeObject(userAuthentication);\n\t\t\tuser = (User)socketObjectIn.readObject();\n\t\t}catch (NoSuchElementException e) {\n\t\t\tSystem.err.println(e.getStackTrace());\n\t\t}catch (ClassNotFoundException e) {\n\t\t\tSystem.err.println(e.getStackTrace());\n\t\t}catch (IOException e) {\n\t\t\tSystem.err.println(e.getStackTrace());\n\t\t}\n\t\treturn user;\n\t}", "AuthenticationToken authenticate(String username, CharSequence password) throws Exception;", "private Object authenticate(Invocation invocation, HttpServletRequest request,\r\n HttpServletResponse response) throws IOException {\r\n\r\n Object[] args = invocation.getArgs();\r\n if (args.length != 2) {\r\n throw new RuntimeException(\"The authenticate call must have two arguments\");\r\n }\r\n\r\n String user = (String) args[0];\r\n String password = (String) args[1];\r\n\r\n //We can make the remote call\r\n Object result = invoke(invocation);\r\n\r\n //If the authentification failed we finish the execution\r\n if (result instanceof LoginContext) {\r\n LoginContext loginContext = (LoginContext) result;\r\n if (loginContext == null) {\r\n throw new RuntimeException(\"Login failed!!\");\r\n }\r\n \r\n HttpSession session = request.getSession(false);\r\n String sessionId = session.getId();\r\n response.addHeader(\"jsessionid\", sessionId);\r\n\r\n \r\n session.setAttribute(User.USER_KEY, loginContext.getUser());\r\n\r\n session.setAttribute(RhSessionContext.CLIENT_ID, loginContext.getClient_id());\r\n session.setAttribute(RhSessionContext.ORG_ID, loginContext.getOrg_id());\r\n session.setAttribute(RhSessionContext.DUTY_ID, loginContext.getDutyId());\r\n\r\n Map attrs = loginContext.getAttributes();\r\n Set<Map.Entry> entries = attrs.entrySet();\r\n for (Map.Entry entry : entries) {\r\n session.setAttribute((String) entry.getKey(), entry.getValue());\r\n }\r\n\r\n // 创建login session\r\n LoginSession loginSession = new LoginSession();\r\n loginSession.setLoginName(loginContext.getUser().getUsername());\r\n loginSession.setIp(request.getRemoteHost());\r\n loginSession.setLoginDate(new Date(session.getCreationTime()));\r\n loginSession.setSessionId(session.getId());\r\n loginSession.setLiving(true);\r\n\r\n //Session hibernateSession = RhinoCtx.instance().getHibernate().getSession();\r\n try {\r\n \r\n ServiceBase serviceBase = (ServiceBase) ServiceFactory.getService(ServiceBase.NAME);\r\n //ServiceBase serviceBase = (ServiceBase) RhinoCtx.getBean(\"serviceBase\");\r\n //hibernateSession.beginTransaction();\r\n serviceBase.save(loginSession);\r\n //hibernateSession.getTransaction().commit();\r\n session.setAttribute(\"loginSession\", loginSession);\r\n\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n //hibernateSession.getTransaction().rollback();\r\n } finally {\r\n //hibernateSession.close();\r\n }\r\n }\r\n return result;\r\n }", "public User login(Credentials creds) throws InvalidCredentialsException, MultipleLoginException, UserInactiveException {\r\n//\t\tLogManager.getLogger().info( \"Current sessions: \" + irpSessionRepository.count() );\r\n//\t\tLogManager.getLogger().info( \"Current Locks: \" + irpLockRepository.count() );\r\n\r\n \tString md5password = passwordManager.hashMC( creds.getPassword() );\r\n\t\tString schema = dhh.getSchema();\r\n\r\n//\t\ttry {\r\n//\t\t\tInteger uc = getDataSource().queryForObject(\"select usercode from \" + schema + \".USERACCOUNT where username = ? and password = ?\", Integer.class, creds.getUsername(), md5password);\r\n//\t\t\tAppSession is = irpSessionRepository.find( uc );\r\n//\r\n//\t\t\tif ( is == null ) {\r\n//\t\t\t\tApplicationParameter ap = apr.findParam(ApplicationParameterType.GENERAL, 1, 6); // EVALUATOR param\r\n//\t\t\t\tUser u = userRepository.find( uc );\r\n//\r\n//\t\t\t\tif ( ap.getParameterValueInt() == 0 ) {\r\n//\t\t\t\t\tif ( u.getUserAccount().hasRole( 7 ) ) {\r\n//\t\t\t\t\t\t// Evaluators should not login!\r\n//\t\t\t\t\t\tLogManager.getLogger().warn(\"Evaluator Cannot login. Evaluator flow NOT enabled\");\r\n//\t\t\t\t\t\tthrow new UserInactiveException( creds );\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\tif ( u.getPosition() > 0 &&\r\n//\t\t\t\t\t\t\t( u.getUserAccount().hasRole( 3 ) || u.getUserAccount().hasRole( 4 ) || u.getUserAccount().hasRole( 5 ) )) {\r\n//\t\t\t\t\t\tLogManager.getLogger().warn(\"Branch User Cannot login. Evaluator flow NOT enabled\");\r\n//\t\t\t\t\t\tthrow new UserInactiveException( creds );\r\n//\t\t\t\t\t}\r\n//\t\t\t\t} else {\r\n//\t\t\t\t\tif ( ap.getFailCode() != 1 ) {\r\n//\t\t\t\t\t\tif ( u.getPosition() > 0 &&\r\n//\t\t\t\t\t\t\t\t( u.getUserAccount().hasRole( 3 ) || u.getUserAccount().hasRole( 4 ) || u.getUserAccount().hasRole( 5 ) )) {\r\n//\t\t\t\t\t\t\tLogManager.getLogger().warn(\"Branch User Cannot login. Branches in Evaluator flow NOT enabled\");\r\n//\t\t\t\t\t\t\tthrow new UserInactiveException( creds );\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\tirpSessionRepository.create(creds.getFromIp(), uc);\r\n//\t\t\t\tu.getUserAccount().setLastlogin( new Date() );\r\n//\t\t\t\tuserAccountRepository.persist( u.getUserAccount() );\r\n//\t\t\t\tdhh.logLogin(creds.getUsername(), \"AUTHENTICATION_SUCCEEDED\", null, null, null, null);\r\n//\t\t\t\treturn u;\r\n//\t\t\t} else {\r\n//\t\t\t\tthrow new MultipleLoginException();\r\n//\t\t\t}\r\n//\t\t} catch (Exception e) {\r\n//\t\t\tif ( e instanceof UserInactiveException) {\r\n//\t\t\t\tdhh.logLogin(creds.getUsername(), \"USER_INACTIVE\", null, null, null, null);\r\n//\t\t\t\tthrow e;\r\n//\t\t\t}\r\n//\t\t\tif ( e instanceof MultipleLoginException) {\r\n//\t\t\t\tdhh.logLogin(creds.getUsername(), \"ALREADY_LOGGED_IN\", null, null, null, null);\r\n//\t\t\t\tthrow e;\r\n//\t\t\t}\r\n//\t\t\tdhh.logLogin(creds.getUsername(), \"AUTHENTICATION_FAILED\", null, null, null, null);\r\n//\t\t\tthrow new InvalidCredentialsException(creds);\r\n//\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\t@Transactional(readOnly=true)\n\tpublic UserType authenticate(String username, String password) {\n\t\treturn null;\n\t}", "public Authentication authenticate(Authentication authentication) throws AuthenticationException {\n\n /* prepare user object */\n User user = new User();\n user.setEmail(authentication.getName());\n user.setPassword(authentication.getCredentials().toString());\n\n /* check if user object is valid*/\n if (this.isValidUser(user)) {\n List<GrantedAuthority> grantedAuths = new ArrayList<GrantedAuthority>();\n grantedAuths.add(new SimpleGrantedAuthority(\"ROLE_USER\"));\n Authentication auth = new UsernamePasswordAuthenticationToken(user.getEmail(), user.getPassword(), grantedAuths);\n return auth;\n } else {\n return null;\n }\n }", "public boolean authenticateUser(String username, String password) {\n\t\tboolean isAuthenticated = false;\n\t\tboolean db_error = true;\n\t\tLogger.logMessage(\"UserManager.authenticateUser(..) : authenticate user \"\n\t\t\t\t+ username);\n\t\tif (DatabaseUtil.checkDatabaseConnection() == Constants.DATABASE_CONNECTION_SUCCESS) {\n\t\t\tisAuthenticated = Service.getService().userAuthentication(username,\n\t\t\t\t\tpassword);\n\t\t\tif (userList.size() == 0) {\n\t\t\t\tpopulateUserListFromDatabase();\n\t\t\t}\n\t\t\tdb_error = false;\n\t\t} else {\n\t\t\tPopupWindow.popup.createInformationalPopup(\"Login Error\",\n\t\t\t\t\t\"Not connected to database, database server is down.\");\n\t\t\tLogger.logMessage(\"UserManager.authenticateUser(..) : database connection not alive authenticating from in memory cache \"\n\t\t\t\t\t+ username);\n/*\t\t\tUser user = userMap.get(username);\n\t\t\tif (user != null) {\n\t\t\t\tisAuthenticated = true;\n\t\t\t\tdb_error = false;\n\t\t\t}*/\n\t\t}\n\t\tif (!isAuthenticated && !db_error) {\n\t\t\tPopupWindow.popup.createInformationalPopup(\"Login Error\",\n\t\t\t\t\t\"Username/Password don not match\");\n\t\t}\n\t\treturn isAuthenticated;\n\t}", "private void authenticateAction() {\n if (requestModel.getUsername().equals(\"superuser\")\n && requestModel.getPassword().equals(\"\")) {\n Collection<Webres> webres = getAllWebres();\n proceedWhenAuthenticated(new User(null, null, null, \"superuser\", \"\", null) {\n @Override\n public Collection<Webres> getAllowedResources() {\n return webres;\n }\n @Override\n public ActionController getDefaultController() {\n return ActionController.EMPLOYEES_SERVLET;\n }\n });\n return;\n }\n \n // try to authenticate against other credentials from the database\n Optional<User> u = getUserByCredentials(requestModel.getUsername(), requestModel.getPassword()); \n if (u.isPresent()) {\n proceedWhenAuthenticated(u.get());\n return;\n }\n \n // report authentication failed\n LOG.log(Level.INFO, \"{0} Authentication failed. Login: {1}, Password: {2}\", new Object[]{httpSession.getId(), requestModel.getUsername(), requestModel.getPassword()});\n SignInViewModel viewModel = new SignInViewModel(true);\n renderSignInView(viewModel);\n }", "boolean isAuthenticate(String username, String password) throws UserDaoException;", "public Person authenticateAndGetUser(String numCc, String password) throws RemoteException;", "public AppUser login(String username, String password) {\n\n if (username == null || username.trim().equals(\"\") || password == null || password.trim().equals(\"\")) {\n throw new InvalidRequestException(\"Invalid user credentials provided!\");\n }\n\n AppUser authUser = userRepo.findUserByCredentials(username, password);\n\n if (authUser == null) {\n throw new AuthenticationException(\"Invalid credentials provided!\");\n }\n\n\n return authUser;\n\n }", "public static boolean authenticateUser(String username, String password){\n\t\tboolean login = false;\t\n\t\tMongoCollection<Document> collection = getDatabase().getCollection(\"LoginInformation\");\n\t\tDocument cursorName = collection.find(eq(\"username\", username)).first();\n\t\t\n\t\t// If the username is not found, create a new account in the database\n\t\tif(cursorName == null){\n\t\t\tDocument user = new Document(\"username\", username);\n\t\t\tuser.append(\"password\", password);\n\t\t\tuser.append(\"points\", 0.0);\n\t\t\tcollection.insertOne(user);\n\t\t\tlogin = true;\n\t\t}\n\t\t\n\t\t// if the username is found, check the password\n\t\tif(cursorName != null && cursorName.getString(\"password\").equals(password)){\n\t\t\tlogin = true;\n\t\t}\n\t\t\t\n\t\treturn login;\n\t}", "public AuthenticationResult authenticateByName(String username, String password) {\n\t\taccessToken = null;\n\t\tAuthenticationRequest authRequest = this.setCredentials();\n\t\tAuthenticationResult authResult = restTemplate.postForObject(embyUrl +\"/\"+ EmbyUrlConstants.AUTH_BY_NAME, authRequest, AuthenticationResult.class);\n\t\t\n\t\t// set access token from result for subsequent calls\n\t\taccessToken = authResult.getAccessToken();\n\t\treturn authResult; \n\t}", "@ApiOperation(value = \"Authenticate as a user\",\n response = AuthenticatedUser.class, responseContainer = \"The authenticated user details\",\n notes = \"User must be registered\")\n\n @ApiResponses(value = {\n @ApiResponse(code=200, message = \"The corresponding authenticated user details\",\n response = AuthenticatedUser.class, responseHeaders = {\n }),\n @ApiResponse(code = 400, message = \"Bad request\"),\n @ApiResponse(code = 401, message = \"Unauthorized since you are not authorized user\"),\n @ApiResponse(code = 403, message = \"Forbidden since you are not authorized to perform such action\"),\n @ApiResponse(code = 500, message = \"Internal Server Error\")\n })\n @Validated\n /**\n * This is the login API function '/auth/login'\n * @param authenticationRequest The {@link AuthenticationRequest} contains the new user data\n * @return The {@link ResponseEntity}\n */\n @PostMapping(\"/login\")\n public ResponseEntity login(@ApiParam(value = \"Login credentials\", required = true) @RequestBody AuthenticationRequest credentials)\n {\n AuthenticatedUser authenticatedUser = this.authenticatedUserService.login(credentials);\n\n if (authenticatedUser != null)\n {\n return ResponseEntity.ok(authenticatedUser);\n }\n\n return new ResponseEntity<>(\"Invalid credentials\",HttpStatus.UNAUTHORIZED);\n }", "@Override\n public Authentication attemptAuthentication(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)\n throws AuthenticationException, IOException, ServletException {\n AccountCredentials credentials = new ObjectMapper().readValue(httpServletRequest.getInputStream(), AccountCredentials.class);\n UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(credentials.getUsername(), credentials.getPassword());\n return getAuthenticationManager().authenticate(token);\n }", "public Authentication authenticate(Authentication authentication) throws AuthenticationException {\n User principal = (User) authentication.getPrincipal();\n\n GaeUser gaeUser = userRegistry.findUser(principal.getUserId());\n\n if (gaeUser == null) {\n // User not in registry. Needs to register\n Set<AppRole> userRoles = new HashSet<AppRole>();\n //TODO: rewrite to remove the dependency on UserService\n if(UserServiceFactory.getUserService().isUserAdmin()) {\n userRoles.add(AppRole.ADMIN);\n }\n userRoles.add(AppRole.USER);\n String userId = principal.getUserId();\n String userEmail = principal.getEmail();\n String userNickname = principal.getNickname();\n String userName = principal.getNickname();\n boolean userEnabled = true;\n gaeUser = new GaeUser(userId, userEmail, userNickname, userName, userRoles, userEnabled);\n userRegistry.registerUser(gaeUser);\n }\n\n if (!gaeUser.isEnabled()) {\n throw new DisabledException(\"Account is disabled\");\n }\n\n return new GaeUserAuthentication(gaeUser, authentication.getDetails());\n }", "public static boolean authenticate(String username, String password) {\n\t\tif (username.equals(\"admin\") && password.equals(\"secret\"))\r\n\t\t\treturn true;\r\n\t\telse if (username.equals(\"user1\") && password.equals(\"1111\"))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "SignedObject authenticate(String username, String hashedPassword) throws RemoteException, Exception;", "LoginContext login(String username, String password) throws LoginException;", "@WebMethod public boolean logIn(String userName, String password);", "public CustomerEntity login(String username, String password) {\n return customerPersistencePort.getUser(username);\n }", "@RequestMapping(value = \"/user/authenticate\", method = RequestMethod.POST, produces = \"application/json\")\n\t@ResponseBody\n\tpublic TokenTransfer authenticate(\n\t\t\t@RequestParam(\"username\") String username,\n\t\t\t@RequestParam(\"password\") String password,\n\t\t\t@RequestParam(\"rememberMe\") boolean rememberMe,\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\n\n\t\tSystem.out.println(username);\n\t\tSystem.out.println(password);\n\t\tUsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(\n\t\t\t\tusername, password);\n\t\tAuthentication authentication = this.authManager\n\t\t\t\t.authenticate(authenticationToken);\n\t\tSecurityContextHolder.getContext().setAuthentication(authentication);\n\n\t\t/*\n\t\t * Reload user as password of authentication principal will be null\n\t\t * after authorization and password is needed for token generation\n\t\t */\n\t\tUserDetails userDetails = this.userService.loadUserByUsername(username);\n\t\tCookie cookie = new Cookie(\"token\", TokenUtils.createToken(userDetails));\n\t\tif (rememberMe) {\n\t\t\tcookie.setMaxAge(TOKEN_DURATION);\n\t\t}\n\t\tcookie.setPath(request.getContextPath());\n\t\tresponse.addCookie(cookie);\n\t\treturn new TokenTransfer(TokenUtils.createToken(userDetails));\n\t}", "public void authenticateUser(String username, String password) {\n\n // Need to validate credentials\n // For now just authenticate the user\n\n AuthenticateUserPayload payload = new\n AuthenticateUserPayload(username, password);\n\n Timber.v(\"authenticateUser called username: \" + username);\n Observable<AuthenticateUserResponse> respObserv = ApiUtility.getApiService().authenticateUser(payload);\n respObserv.subscribeOn(Schedulers.computation())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Observer<AuthenticateUserResponse>() {\n @Override\n public void onSubscribe(@NonNull Disposable d) { }\n\n @Override\n public void onNext(@NonNull AuthenticateUserResponse authenticateUserResponse) {\n Timber.v(\"on Next() called \" + authenticateUserResponse.getMessage());\n authUserResponseObservable.onNext(authenticateUserResponse);\n }\n\n @Override\n public void onError(@NonNull Throwable e) {\n Timber.v(\"on Error() called message: \" + e.getMessage());\n Timber.v(\"on Error() called cause: \" + e.getCause());\n authUserError(e);\n }\n\n @Override\n public void onComplete() { }\n });\n }", "User login(String email, String password) throws AuthenticationException;", "public Identity authenticate(String login, String pwd){\r\n\t\t\t\r\n\t\t\r\n\t\tSpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);\r\n\t\tSession session = sf.openSession();\r\n\t\tList<Identity> ids = new ArrayList<Identity>();\r\n\t\tTransaction t = session.beginTransaction();\r\n\t\tQuery query = session.createQuery(\"FROM Identity AS identity WHERE identity.displayName = :login\");\r\n\t\t//transaction - forces changes in cache to be updated to dbs\r\n\t\tquery.setParameter(\"login\", login);\r\n\t\tids = query.list();\r\n\t\tt.commit();\r\n\t\tsession.close();\r\n\t\t\r\n\t\tif(ids.isEmpty())\r\n\t\t\treturn null;\r\n\t\t\r\n\t\t//there should be only one identity to a single displayname!\r\n\t\tfor(Identity id : ids)\r\n\t\t{\r\n\t\t\tPasswordEndecryptor.getInst();\r\n\t\t\t// hashed password decryption and authentication\r\n\t\t\tif(PasswordEndecryptor.checkPwd(pwd, id.getPassword()))\r\n\t\t\t{\r\n\t\t\t\tLOGGER.debug(\"Authentication should be succesfull!\");\r\n\t\t\t\treturn id;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\tLOGGER.debug(\"Authentication should NOT be succesfull!\");\r\n\t\treturn null;\r\n\t}", "protected PasswordAuthentication getPasswordAuthentication() {\n\t return new PasswordAuthentication(username, password.toCharArray());\r\n\t}", "@RequestMapping(path = EndPoints.User.AUTHENTICATE, method = RequestMethod.POST)\r\n\tpublic User authenticate(@RequestBody UserAuthenticationToken creds);", "@Override\r\n\tpublic User Authenticate(String username) {\n\t\t\tSession currentSession = this.sessionFactory.getCurrentSession();\r\n\t\t\tSystem.out.println(username);\r\n\t\t\tList<User> userList = currentSession.createCriteria(User.class)\r\n\t\t\t\t\t.add(Restrictions.eq(\"email\", username))\r\n\t\t\t\t\t.list();\r\n\t\treturn userList.get(0);\r\n\t}", "public AuthenticationResult authenticateByName(String username) {\n\t\tthis.username = username;\n\t\tpassword = passwordDefault;\n\t\treturn authenticateByName(username, password);\n\t}", "public abstract boolean authenticate(String userid, String password) throws\n YAuthenticationException;", "protected synchronized String authenticated() throws JSONException {\n JSONObject principal = new JSONObject()\n .put(FIELD_USERNAME, USER)\n .put(FIELD_PASSWORD, PASSWORD);\n if (token == null){ //Avoid authentication in each call\n token =\n given()\n .basePath(\"/\")\n .contentType(ContentType.JSON)\n .body(principal.toString())\n .when()\n .post(LOGIN)\n .then()\n .statusCode(200)\n .extract()\n .header(HEADER_AUTHORIZATION);\n\n }\n return token;\n }", "@Override\n\tpublic boolean login(String username, String password) {\n\t\treturn userProviderService.login(username, password);\n\t}", "@Override\n public Principal authenticate(String credentials, String remoteAddr, String httpMethod, StringBuilder errMsg) {\n return null;\n }", "public Result authenticate() {\r\n // 1. Define class to send JSON response back\r\n class Login {\r\n public Long id;\r\n public String gamerTag;\r\n public String token;\r\n\r\n public Login() {\r\n }\r\n }\r\n\r\n // 2. Read email and password from request()\r\n JsonNode request = request().body().asJson();\r\n String gamerTag = request.get(\"gamerTag\").asText();\r\n String password = request.get(\"password\").asText();\r\n\r\n // 3. Find user with given gamerTag\r\n Login ret = new Login();\r\n User user = User.gamerTagLogin(gamerTag);\r\n if (user == null) {\r\n return unauthorized(Json.toJson(ret));\r\n }\r\n // 4. Compare password.\r\n String sha256 = User.getSha256(request.get(\"password\").asText());\r\n if (sha256.equals(user.getPassword())) {\r\n // Success\r\n String authToken = generateAuthToken();\r\n user.setToken(authToken);\r\n Ebean.update(user);\r\n ret.token = authToken;\r\n ret.gamerTag = user.getGamerTag();\r\n ret.id = user.getId();\r\n return ok(Json.toJson(ret));\r\n\r\n }\r\n // 5. Unauthorized access\r\n return unauthorized();\r\n }", "public void propagateCredentials( User user, String password );", "public PasswordAuthentication getPasswordAuthentication() {\n return (new PasswordAuthentication(username, pwd.toCharArray()));\n }", "@RequestMapping(method = RequestMethod.GET, value = \"/user/userAuthentication/{username}{password}\")\n @ApiOperation(value = \"Authenticating the user to make sure they actually exist or that the username and password is correct\")\n public User userAuthentication(@RequestParam String username, @RequestParam String password){\n return userService.authenticateUser(username, password);\n }", "private static boolean authenticate(String username, String password) {\r\n\t\tFile file = new File(\"auth.txt\");\r\n\t\tScanner scanner;\r\n\t\tString user = null;\r\n\t\tString pwd = null;\r\n\t\ttry {\r\n\t\t\tscanner = new Scanner(file);\r\n\t\t\tString nextLine = scanner.nextLine();\r\n\t\t\tString[] parts = nextLine.split(\"=\");\r\n\t\t\tuser = parts[0];\r\n\t\t\tpwd = parts[1];\r\n\t\t\tscanner.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn (username.equals(user) && password.equals(pwd));\r\n\t\t\r\n\t}", "@RequestMapping(value = \"/authenticate\", method = RequestMethod.POST)\r\n public ResponseEntity<User> login(@RequestBody User user) {\r\n\t\tlogger.info(\"Authenticate user:\"+ user);\r\n\t\t\r\n\t\t// logger.debug(\"users=\"+userService.findAllUsers() );\r\n\t\t\r\n\t\tUser dbUser = userService.findByUserName( user.getUsername() );\r\n\r\n\t\tif (dbUser != null) {\r\n\t\t\tlogger.debug(\"Start authenticate User with username [{}].\", user.getUsername() );\r\n\t\t\t//logger.debug(\"dbUser.getPassword() = \" + dbUser.getPassword() );\r\n\t\t\t//logger.debug(\"user.getPassword() = \" + user.getPassword() );\r\n\t\t\tif ( dbUser.getPassword() != null ) {\r\n\t\t\t\t//String encryptedPasword = bCryptPasswordEncoder.encode( user.getPassword() );\r\n\t\t\t\t//logger.debug(\"encryptedPasword = \" + encryptedPasword );\r\n\t\t\t\tif ( bCryptPasswordEncoder.matches( user.getPassword(), dbUser.getPassword())) {\t\t\t\t\r\n\t\t\t\t//if ( dbUser.getPassword().equals( encryptedPasword ) ) { // this won't work, not same\r\n\t\t\t\t\tlogger.info(\"User with username {} authenticated.\", user.getUsername() );\r\n\t\t\t\t\treturn new ResponseEntity<User>(dbUser, HttpStatus.OK);\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tlogger.warn(\"Unable to authenticate. Username [{}] or password incorrect.\", user.getUsername() );\r\n\t\t// json client side not handled status 401 with message pass\r\n\t\treturn new ResponseEntity(new CustomErrorType(\"Unable to authenticate. Username or password incorrect.\"),\r\n\t\t\t\tHttpStatus.UNAUTHORIZED);\r\n\t\t\r\n\t\t//return new ResponseEntity(new CustomErrorType(\"Unable to authenticate. Username or password incorrect.\"),\r\n\t\t//\t\tHttpStatus.OK);\r\n\t\t\r\n\t\t\r\n\t}", "public static String authenticate(final String username,\n final String password) throws IOException {\n\n String AUTH_URL = String.format(RestURI.LOGIN.getValue(), Server.getIp(), username, password);\n\n Request request = new Request.Builder()\n .url(AUTH_URL)\n .post(emptyBody)\n .build();\n\n try (Response response = getHttpClient().newCall(request).execute()) {\n return getResponseMessage(response);\n }\n }", "@Override\r\n\tpublic Credentials fetchUserByUsernameAndPassword(String username,String pass) {\n\t\treturn dao.findByUserNameAndPassword(username,pass);\r\n\t}", "private void authenticate(final String username, final String password) {\n\t\tAuthenticator.setDefault(new Authenticator() {\n\n\t\t\t@Override\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\n\t\t\t\treturn new PasswordAuthentication(username, password.toCharArray());\n\t\t\t}\n\t\t});\n\t}", "public abstract boolean checkCredentials (String username, String password);", "@POST\n\t@Path(\"/login\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic LoginTicket login(LoginCredentials loginCredentials){\n\t\tout.println(\"Username: \" + loginCredentials.username + \", Password: \" + loginCredentials.password);\n\t\t\n\t\tDBLoginCredentials dbLoginCredentials = loginDbInteractor.get(loginCredentials.username);\n\t\t\n\t\ttry{\n\t\t\tout.println(\"DB Username: \" + dbLoginCredentials.getUsername() + \", DB Password: \" + dbLoginCredentials.getPassword() + \", DB Salt: \" + dbLoginCredentials.getSalt());\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tboolean match = false;\n\t\t\n\t\tif(dbLoginCredentials != null){\n\t\t\tmatch = passwordHelper.checkIfMatch(loginCredentials.password, dbLoginCredentials.getSalt(), \n\t\t\t\t\tdbLoginCredentials.getPassword());\n\t\t}\n\t\t\n\t\tif(match){\n\t\t\treturn new LoginTicket(\"valid_ticket_data\", 60);\n\t\t} else {\n\t\t\treturn new LoginTicket(\"INVALID\", 0);\n\t\t}\t\n\t}", "@Override\r\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(this.sUsername, this.sPassword);\r\n }", "public boolean isUserAuthenticated(final String username, final String password,\n final UserAuthenticationInformation authenticationInformation);", "public boolean authenticateUser(String username, String password) {\n if (isNullOrEmpty(username) || isNullOrEmpty(password)) {\n return false;\n }\n final Optional<User> maybeUser = userRepository.getUserByUserName(username);\n\n return maybeUser.isPresent() && validatePassword(password, maybeUser.get());\n }", "Boolean checkCredentials(String username, String password) throws\n SQLException, UserNotFoundException;", "@Override\n\tpublic User getUserByCredentials(String userName, String password) {\n\t\tList<User> userList = new ArrayList<User>();\n\t\tString query = \"SELECT u FROM User u\";\n\t\tuserList = em.createQuery(query, User.class).getResultList();\n\t\tUser returnUser = null;\n\t\tfor (User user : userList) {\n\t\t\tif (user.getUserName().equals(userName) && user.getPassword().equals(password)) {\n\t\t\t\tSystem.out.println(user);\n\t\t\t\treturnUser = user;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Not found\");\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn returnUser;\n\t}", "public void authenticateUser() {\n\n String username = viewUsername.getText().toString();\n String password = viewPassword.getText().toString();\n\n Timber.v(\"authenticateUser called username: \" + username);\n activity.getOnboardingViewModel().authenticateUser(username, password);\n }", "public String login(String username, String password) {\n UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(\n username, password);\n\n Authentication authentication = authenticationManager.authenticate(token);\n SecurityContextHolder.getContext().setAuthentication(authentication);\n\n UserDetails details = userDetailsService.loadUserByUsername(username);\n\n return tokenUtils.generateToken(details);\n }", "public Users authenticateUser(Users user) {\r\n\r\n String userName = user.getEmail();\r\n String passw = user.getPassword();\r\n\r\n Query query = em.createNamedQuery(\"checkUser\");\r\n query.setParameter(\"uname\", userName);\r\n query.setParameter(\"upass\", passw);\r\n\r\n if (!query.getResultList().isEmpty()) {\r\n Users userAuthenticated = (Users) query.getSingleResult();\r\n return userAuthenticated;\r\n }\r\n return null;\r\n }", "public HashMap authenticate(final Credentials userCredentials, final String[] attributeRequest)\n throws AuthenticationFailedException, BackendException {\n \n // Sanity check.\n if (configuration == null)\n throw new DirectoryManagerConfigurationException(\"Configuration not set\");\n \n // TODO: Implement a backend pool.\n \n // Do the call through a temporary backend instance.\n DirectoryManagerBackend backend = backendFactory.createBackend();\n List references = index.lookup(userCredentials.getUsername());\n if (references != null) {\n \n // Found a reference. Now open it.\n // TODO: Use secondary references as fallback if the first fails.\n backend.open((String) references.get(0));\n \n } else {\n \n // Could not locate the user in the index.\n throw new AuthenticationFailedException(\"User \" + userCredentials.getUsername() + \" is unknown\");\n \n }\n \n // Authenticate the user.\n HashMap attributes = backend.authenticate(userCredentials, attributeRequest);\n \n // Close the backend and return any attributes.\n backend.close();\n return attributes;\n \n }", "protected PasswordAuthentication\n getPasswordAuthentication() {\n\n return new PasswordAuthentication(username,\n password);\n }", "protected PasswordAuthentication\n getPasswordAuthentication() {\n\n return new PasswordAuthentication(username,\n password);\n }", "public String authenticateUser(String username, String password) {\n\n\t\tboolean validUser = ((MovieDAOImplAuth) movieDAO).validate(username, password);\n\t\tif (validUser) {\n\t\t\tlog.info(\"user : \" + username + \" has been validated!\");\n\t\t\tString token = generateToken();\n\n\t\t\tif (((MovieDAOImplAuth) movieDAO).insertToken(token,username)) {\n\t\t\t\tAuthenticationUtils.setToken(token);\n\t\t\t\tAuthenticationUtils.setCurrentlyLoggedInUser(username);\n\t\t\t} else {\n\t\t\t\tlog.error(\"token insert failed !!\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn token;\n\t\t}\n\t\treturn null;\n\t}", "public LoginCredentials getLoginCredentials() {\n\t\treturn this.loginCredentials;\n\t}", "@Override\n\tpublic JwtResponse authenticateUser(LoginForm loginRequest) {\n\n\t\tAuthentication authentication = authenticationManager.authenticate(\n\t\t\t\tnew UsernamePasswordAuthenticationToken(loginRequest.getUsername(), loginRequest.getPassword()));\n\n\t\tSecurityContextHolder.getContext().setAuthentication(authentication);\n\n\t\tString jwt = \"Bearer \" + jwtProvider.generateJwtToken(authentication);\n\t\tUserDetails userDetails = (UserDetails) authentication.getPrincipal();\n\t\tOptional<User> user = userRepository.findByUsername(userDetails.getUsername());\n\t\tRoleName authorities = ((Role) user.get().getRoles().toArray()[0]).getName();\n\t\treturn new JwtResponse(jwt, user.get().getId(), userDetails.getUsername(), authorities,\n\t\t\t\tuser.get().getManagementId());\n\t}", "public abstract boolean authenticate(ServiceSecurity serviceSecurity, SecurityContext securityContext);", "public User loginUser(User userToAuthenticate) throws UnknownUserException, IncorrectPasswordException{\n String username = userToAuthenticate.getUsername();\n String password = userToAuthenticate.getPassword();\n\n //checking if username exists\n if(userRepository.existsByUsername(username)){\n //checking if correct password of username trying to log in\n if(userRepository.findByUsername(username).getPassword().equals(password)){\n //generating encoded token for user trying to login\n userToAuthenticate.setToken(generateToken(userToAuthenticate));\n return userToAuthenticate;\n }else { //throw error as password incorrect\n throw new IncorrectPasswordException(\"Password incorrect, please double check\");\n }\n }else{ //throw error if username doesn't exist\n throw new UnknownUserException(\"Unknown username, please correct or register\");\n }\n }", "User login(String username, String password);", "public Authentication(String user, char[] password) {\n this.user = user;\n this.password = password;\n }", "@Override public User login(String username, String password)\r\n throws RemoteException, SQLException {\r\n this.username = username;\r\n this.password = password;\r\n user = gameListClientModel.login(username, password);\r\n return gameListClientModel.login(username, password);\r\n }" ]
[ "0.76022047", "0.75995505", "0.74301344", "0.73648155", "0.72551066", "0.7174226", "0.6995531", "0.69856185", "0.69547325", "0.69466674", "0.6889359", "0.6861885", "0.6853309", "0.6846822", "0.6832303", "0.6760495", "0.6754515", "0.6749531", "0.6712301", "0.669794", "0.6690322", "0.668501", "0.6679429", "0.6670621", "0.6658677", "0.6617037", "0.6612917", "0.65994483", "0.6584823", "0.6576194", "0.6547259", "0.6538164", "0.65265477", "0.6518868", "0.64993614", "0.64917177", "0.6489438", "0.64658314", "0.6462162", "0.6450891", "0.64498276", "0.6440098", "0.6418658", "0.64074576", "0.64037347", "0.6351162", "0.63455874", "0.6337845", "0.6329517", "0.6323961", "0.63124275", "0.63088316", "0.63057625", "0.62849444", "0.62809503", "0.6244067", "0.62391984", "0.62092215", "0.620827", "0.62062776", "0.6195916", "0.6193407", "0.6191599", "0.61773145", "0.61699164", "0.61577255", "0.6151181", "0.61492646", "0.61349964", "0.61328584", "0.61316824", "0.61178213", "0.61103904", "0.6106851", "0.6105922", "0.6105761", "0.6098316", "0.6088716", "0.60670537", "0.60653013", "0.60642165", "0.6062537", "0.6050155", "0.6042755", "0.6036259", "0.6026115", "0.6013872", "0.60132015", "0.6002194", "0.59972847", "0.59884834", "0.59884834", "0.5980094", "0.5977308", "0.5967157", "0.59632784", "0.5960159", "0.5954714", "0.5945258", "0.59430593" ]
0.7210485
5
Method.................................................getPword Author......................................................JLH This method getPass gets the users password for validation Return Value (String) correctPass: Returns a String of the user's password
public static synchronized String getPword(String userName){ Connection connection; String correctPass = ""; PreparedStatement statement=null; String preparedSQL = "SELECT pass FROM Credential WHERE Email = ?"; try{ connection=DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setString(1, userName); ResultSet rs = statement.executeQuery(); if(rs.next()){ correctPass = rs.getString(1); } rs.close(); statement.close(); connection.close(); }catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } return correctPass; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPass();", "java.lang.String getPass();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "public static String getPassword()\n\t{\n\t\tScanner kb = new Scanner(System.in);\n\n\t\tp(\"Guideline for password:\");\n\t\tp(\"The password should be at least six characters long.\");\n\t\tp(\"The password should contain at least one uppercase and at least one lowercase letter.\");\n\t\tp(\"The password should have at least one digit.\");\n\t\tp(\"Enter a password:\");\n\t\treturn kb.nextLine();\n\t}", "String getPass();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "private String getPasswordFromUser() {\n JPasswordField passField = new JPasswordField(10);\n int action = JOptionPane.showConfirmDialog(null, passField, \"Please enter your password:\", JOptionPane.OK_CANCEL_OPTION);\n\n if (action < 0) {\n System.exit(0);\n }\n\n __logger.info(\"Got password from user\");\n\n return new String(passField.getPassword());\n }", "public String getUserPass() {\n\t\treturn passText.getText().toString();\n\t}", "java.lang.String getPasswd();", "@Column(name=\"pass\")\n\tpublic String getPass() {\n\t\treturn pass;\n\t}", "public java.lang.String getPassword();", "public String getPassWord() {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\treturn sharedPreferences.getString(\"PASSWORD\", null);\n\t}", "public String getPass() {\n return pass;\n }", "public String getPass() {\n return pass;\n }", "String getUserPassword();", "@Override\n\tpublic String getPass() {\n\t\treturn password;\n\t}", "public String getaPass() {\n return aPass;\n }", "public String getPassWord() {\n return passWord;\n }", "Password getPsw();", "public String getPassword() {\n\treturn strPasswd;\n }", "public UTF8String getUserPass() {\n return this.userPass;\n }", "private char[] getPass()\n {\n return password.getPassword();\n }", "public String getPassWord(){\n return passWord;\n }", "public String getPass() {\n\t\treturn pass;\r\n\t}", "@ApiModelProperty(value = \"Password of the user\")\n public String getPass() {\n return pass;\n }", "public String getPassword();", "public String getPassword();", "public String Password()// method for getting the password given by user\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tSystem.out.println(\"enter password: \");\n\t\tString password = sc.next();\n\n\t\treturn password;\n\t}", "public String getPassWord() {\n\t\treturn passWord;\n\t}", "public String getPasspwd() {\n return passpwd;\n }", "private String getPassword() {\n String Password = \"\";\n while (true) {\n System.out.println(\"Please, Enter Password : \");\n Password = scanner.nextLine();\n System.out.println(\"Please, Enter confirm Password : \");\n if (!Password.equals(scanner.nextLine())) {\n System.out.println(\"Error: Password doesn't match.\");\n } else {\n break;\n }\n }\n return Password;\n }", "public String getPassword()\r\n/* 21: */ {\r\n/* 22:38 */ return this.password;\r\n/* 23: */ }", "public static String getBiblioPass() {\n\t\treturn \"pass\";\n\t}", "void retrievePassWord(User user);", "public void setPass(String pass)\r\n\t{\r\n\t\tpassword = pass;\r\n\t}", "private boolean valPassword(String pass){\n if (usuario.getPassword().equals(pass)){\n return true;\n }\n return false;\n }", "public String getaPassword() {\n return aPassword;\n }", "String password();", "public String getPassword()\n \t{\n \t\treturn password;\n \t}", "public String getPassword(){\n return password;\n\t}", "public String getPassword(){\n \treturn password;\n }", "public String getPassword() {\n return txtPassword().getText();\n }", "String getTemporaryPassword();", "public String get_password()\r\n\t{\r\n\t\treturn this.password;\r\n\t}", "public String getPassword() {return password;}", "private boolean checkPass(String enterPass) {\n JdbcConnection connection = JdbcConnection.getInstance();\n DaoFactory daoFactory = new RealDaoFactory(connection);\n List<User> users = daoFactory.createUserDao().findAll();\n for (User user : users) {\n if (user.getPasswordHash() == enterPass.hashCode()) {\n return true;\n }\n }\n return false;\n }", "boolean getPasswordValid();", "public String getPassword()\r\n {\r\n return password;\r\n }", "public String getU_PASS()\n {\n return this.U_PASS;\n }", "public String getPassName() {\n return this.passName;\n }", "public void setPassWord(String passWord) {\n\t\tthis.passWord = passWord;\n\t}", "public java.lang.String getPasswd() {\n java.lang.Object ref = passwd_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n passwd_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\tpublic String getPassword() {\n\t\treturn user.getPassword();\n\t}", "public boolean checkPass(String password){\r\n if (password.equals(this.password)){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public java.lang.String getPasswd() {\n java.lang.Object ref = passwd_;\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 passwd_ = s;\n }\n return s;\n }\n }", "public String getPassword()\r\n {\r\n return password;\r\n }", "public String getPassword() {\r\n \t\treturn properties.getProperty(KEY_PASSWORD);\r\n \t}", "public java.lang.String getPassword () {\r\n\t\treturn password;\r\n\t}", "@Test\n public void testGetPassword() {\n System.out.println(\"getPassword Test (Passing value)\");\n String expResult = \"$2a$10$EblZqNptyYvcLm/VwDCVAuBjzZOI7khzdyGPBr08PpIi0na624b8.\";\n String result = user.getPassword();\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertEquals(expResult, result);\n }", "@Override\n\tpublic String getPassword() {\n\t\treturn user.getUserPwd();\n\t}", "public String getPassword() {\n \t\treturn password;\n \t}", "public String getPassword(){\r\n\t\treturn password;\r\n\t}", "public void setPassword(String pass);", "public String getPassword(){\n\t\treturn this.password;\n\t}", "public String getPassword()\r\n {\r\n return password;\r\n }", "public String setPassword(){\n String passWord = \"\";\n while(passWord.isBlank()) {\n System.out.print(\"Please Enter PassWord: \");\n passWord = supplyString.get();\n }\n return passWord.trim();\n }", "public String getPassword() {\r\n\t\t// Get the password\r\n\t\tchar []code = password.getPassword();\r\n\t\t\r\n\t\t// Make the password string\r\n\t\tString password = \"\";\r\n\t\t\r\n\t\t// convert the char[] to string\r\n\t\tfor (char c: code){\r\n\t\t\tpassword += c;\r\n\t\t}\r\n\t\t\r\n\t\t// Return the password string\r\n\t\treturn password;\r\n\t}", "public String getPassword() {\n return password;\r\n }", "public java.lang.String getPassword() {\r\n return password;\r\n }", "public java.lang.String getPassword() {\r\n return password;\r\n }", "public void setPasspwd(String passpwd) {\n this.passpwd = passpwd;\n }", "private boolean isValidPassword(String pass) {\n if (pass != null && pass.length() >= 6) {\n return true;\n }\n return false;\n }", "String getNewPassword();", "public String getUserPassword() {\r\n return userPassword;\r\n }", "public String getPassword() { \n return this.password; \n }", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return password;\n }", "public void setPass(String pass) {\n\t\tthis.pass = pass;\n\t}", "public boolean comparePassword(String pass) {\n //TODO: Compare hashed and salted password instead of plaintext\n return this.password.equals(pass);\n }", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return password;\n }", "public static Boolean checkPassowd(String password){\n\t\t//String password = txtPassword.getText();\n\t\t//System.out.println(password);\n\t\treturn password.equals(\"password\");\n\t}", "public int getPassword(){\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\n\t\treturn String.valueOf(password.getPassword());\n\t}", "public String getPassword()\n {\n return _password;\n }" ]
[ "0.7630231", "0.7630231", "0.7517408", "0.7517408", "0.7517408", "0.7517408", "0.7517408", "0.7517408", "0.7517408", "0.7427286", "0.74195814", "0.7297124", "0.7297124", "0.7297124", "0.7297124", "0.7297124", "0.7297124", "0.7297124", "0.7297124", "0.7297124", "0.72938794", "0.7220463", "0.7214644", "0.71904856", "0.7190331", "0.71765065", "0.71725845", "0.71725845", "0.71718657", "0.71063197", "0.70790243", "0.70577794", "0.70432264", "0.70271605", "0.70199984", "0.70095325", "0.6995462", "0.6975172", "0.6967773", "0.6935453", "0.6935453", "0.69202006", "0.6897965", "0.68657464", "0.67734784", "0.67688584", "0.6754742", "0.67456996", "0.6698744", "0.66912246", "0.66688377", "0.6662982", "0.66499734", "0.66340286", "0.6632103", "0.6626819", "0.6621997", "0.6614851", "0.6608785", "0.66035926", "0.66009307", "0.6598419", "0.6596218", "0.6582872", "0.6582074", "0.6577306", "0.6576688", "0.65744746", "0.6567689", "0.6564223", "0.6559598", "0.65580696", "0.65575784", "0.65425193", "0.6540988", "0.65257466", "0.65208244", "0.65184456", "0.6517669", "0.65169495", "0.65077794", "0.6494284", "0.64933556", "0.64933556", "0.6492048", "0.6471816", "0.6466032", "0.6465102", "0.64502746", "0.6446681", "0.6446681", "0.64451224", "0.6435488", "0.6433194", "0.6433194", "0.643309", "0.6432046", "0.64304405", "0.64269847", "0.6422506" ]
0.6764084
46
Method........................................checkVerification Author......................................................JLH This method retrieves the "validated" field based on the user's email address Return Value (int) validated: Returns an int value that signifies if the user's email address has been verified
public static synchronized int checkVerification(String userName){ Connection connection; int valid = 1; PreparedStatement statement=null; String preparedSQL = "SELECT Validated FROM Credential WHERE Email = ?"; try{ connection=DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setString(1, userName); ResultSet rs = statement.executeQuery(); if(rs.next()){ valid = rs.getInt(1); } rs.close(); statement.close(); connection.close(); }catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); valid = 1; } return valid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getValidUserEmail(Validation v) {\r\n\r\n\t\t\r\n\t\tint a=0;\r\n\t\tString query=\"select * from user_registration where user_name='\"+v.getUsername() +\"' and email='\"+v.getEmail()+\"'\";\r\n\t\t\r\n\t\tRowMapper<Validation> rowMapper=new RowMapper<Validation>() {\r\n\r\n\t\t\tpublic Validation mapRow(ResultSet rs, int row) throws SQLException {\r\n\t\t\t\t Validation v=new Validation();\r\n\t\t\t\t v.setUsername(rs.getString(\"user_name\"));\r\n\t\t\t\t v.setPassword(rs.getString(\"email\"));\r\n\t\t\treturn v;\r\n\t\t\t}\r\n\t\t};\r\n\t\tList<Validation> list=jdbctemplate.query(query, rowMapper);\r\n\t\t a=list.size()>0?1:0; \r\n\t\treturn a;\r\n\t}", "@Test\n public void testGetIsAccountVerified() {\n System.out.println(\"getIsAccountVerified Test (Passing value)\");\n Boolean expResult = Boolean.TRUE;\n Boolean result = user.getIsAccountVerified();\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertEquals(expResult, result);\n }", "@Test\n\t\tvoid givenEmail_CheckForValidationForEmail_RetrunTrue() {\n\t\t\tboolean result = ValidateUserDetails.validateEmails(\"abc.xyz@bl.com\");\n\t\t\tAssertions.assertTrue(result);\n\t\t}", "protected void validateEmail(){\n\n //Creating Boolean Value And checking More Accurate Email Validator Added\n\n Boolean email = Pattern.matches(\"^[A-Za-z]+([.+-]?[a-z A-z0-9]+)?@[a-zA-z0-9]{1,6}\\\\.[a-zA-Z]{2,6},?([.][a-zA-z+,]{2,6})?$\",getEmail());\n System.out.println(emailResult(email));\n }", "public Byte getEmailVerifyFlag() {\n return emailVerifyFlag;\n }", "public static boolean isAccountVerified(String email){\n Connection connect = null;\n ResultSet set = null;\n String isAccountVerifiedSQL = \"SELECT verified FROM users WHERE email = ?\";\n\n // Check If Account is Verified Try Block:\n try {\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare Statement:\n PreparedStatement statement = connect.prepareStatement(isAccountVerifiedSQL);\n // Set Parameters:\n statement.setString(1, email);\n // Execute Statement:\n set = statement.executeQuery();\n // Check For Result Set:\n while (set.next()){\n // Check Value:\n if(set.getInt(\"verified\") == 1) {\n return true;\n }\n // End Of Check Value.\n }\n // End Of Check For Result Set.\n\n }catch(SQLException e){\n e.printStackTrace();\n }\n // End Of Check If Account is Verified Try Block:\n\n return false;\n }", "void validate(String email);", "@Test\n\t\tvoid givenEmail_CheckForValidationForMobile_RetrunTrue() {\n\t\t\tboolean result = ValidateUserDetails.validateMobile(\"98 9808229348\");\n\t\t\tAssertions.assertTrue(result);\n\t\t}", "public boolean isEmailVerified() {\n return emailVerified;\n }", "@Override\r\n\tpublic int emailcheck(String email) {\n\t\treturn dao.idcheck(email);\r\n\t}", "@Override\r\n\tpublic boolean isValid(String email, ConstraintValidatorContext context) {\n\t\t\r\n\t\tif(service==null){\r\n\t\t\t return true;\r\n\t\t}\r\n\t\treturn service.getUser(email)==null;\r\n\t\t\t\t\r\n\t}", "public int getValidSpEmailUname(Validation v) {\r\n\t\tint a=0;\r\nString query=\"select * from sp_final where user_name='\"+v.getUsername() +\"' and email='\"+v.getEmail()+\"'\";\r\n\t\t\r\n\t\tRowMapper<Validation> rowMapper=new RowMapper<Validation>() {\r\n\r\n\t\t\tpublic Validation mapRow(ResultSet rs, int row) throws SQLException {\r\n\t\t\t\t Validation v=new Validation();\r\n\t\t\t\t v.setUsername(rs.getString(\"user_name\"));\r\n\t\t\t\t v.setEmail(rs.getString(\"email\"));\r\n\t\t\treturn v;\r\n\t\t\t}\r\n\t\t};\r\n\t\tList<Validation> list=jdbctemplate.query(query, rowMapper);\r\n\t\t a=list.size()>0?1:0; \r\n\t\treturn a;\r\n\t}", "public int getIsVerified() {\r\n return isVerified;\r\n }", "boolean additionalPayerInfoVerification(final String email) {\n return Log.altVerify(email, lblEMail().getText(), true, \"E-mail address\");\n }", "String getVerified();", "@Test\n\t\tvoid givenEmail_CheckForValidationForEmail_RetrunFalse() {\n\t\t\tboolean result =ValidateUserDetails.validateEmails(\"abc.xyz@bl\");\n\t\t\tAssertions.assertFalse(result);\n\t\t}", "public User validate(String emailID , String password);", "public boolean isIsEmailValidated() {\n return isEmailValidated;\n }", "boolean hasUserEmail();", "@Override\n\tpublic int getUserId(String email) throws DatabaseException, DataNotFoundException {\n\t\tConnection con = DbUtil.getConnection();\n\t\tStudentRegistrationValidationDaoi studentRegistrationValidationDaoi=new StudentRegistrationValidationDaoimpl();\n\t\tint value=studentRegistrationValidationDaoi.getUserId(email, con);\n\t\tDbUtil.closeConnection(con);\n\t\treturn value;\n\t}", "boolean isEmailRequired();", "boolean checkVerification();", "public boolean verify();", "@Test\n public void testGetEmail() {\n System.out.println(\"getEmail Test (Passing value)\");\n String expResult = \"jdoe@vlol.com\";\n String result = user.getEmail();\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertEquals(expResult, result);\n }", "public boolean isAccountValidated(GuruModel model) {\n\t\tquery = \"select id from guru where email=? and pwd=? and validate_email=?\";\n\t\tList<GuruModel> list = this.jdbcTemplate.query(query,new Object[]{model.getEmail(),this.edutility.getSHA256(model.getPwd()),true},\n\t\t\t\tBeanPropertyRowMapper.newInstance(GuruModel.class));\n\t\t\n\t\tif(list.size() == 0)\n\t\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t\t\n\t}", "@RequestMapping(value = \"/signup/validateEmail\", method = RequestMethod.POST)\n @ResponseBody\n public SPResponse validateEmail(@RequestParam String email) {\n SPResponse spResponse = new SPResponse();\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"The email to validate :\" + email);\n }\n // validate the email\n User user = userRepository.findByEmail(email); // signupForm.getEmail()\n if (user != null) {\n spResponse.addError(\"Duplicate_Email\",\n MessagesHelper.getMessage(\"exception.duplicateEmail.signup\"));\n } else {\n spResponse.isSuccess();\n }\n return spResponse;\n }", "public boolean getVerifyField() {\n\treturn verify;\n }", "User getUserUnderValidation();", "public String getVerifyCode() {\r\n return verifyCode;\r\n }", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "public void getVerified() {\n Toast.makeText(this, \"Enter your registered mobile number\", Toast.LENGTH_LONG).show();\n\n authCallback = new AuthCallback() {\n\n @Override\n public void success(DigitsSession session, final String phoneNumber) {\n\n //In case phone number gets verified.. call successMethod() function..\n h.post(new Runnable() {\n @Override\n public void run() {\n\n successMethod(phoneNumber);\n containerForgotPassword.setVisibility(View.VISIBLE);\n\n }\n });\n }\n\n @Override\n public void failure(DigitsException exception) {\n //In case phone number isn't verified, finish() this activity displaying appropriate toast..\n Toast.makeText(ForgotPassword.this, \"Couldn't verify phone number\", Toast.LENGTH_SHORT).show();\n finish();\n }\n };\n\n Digits.clearActiveSession();\n getAuthCallback();\n AuthConfig.Builder authConfigBuilder = new AuthConfig.Builder()\n .withAuthCallBack(authCallback)\n .withPhoneNumber(\"+91\");\n Digits.authenticate(authConfigBuilder.build());\n }", "@Test\n public void emailVerifiedTest() {\n // TODO: test emailVerified\n }", "public void verifyEmail(java.lang.String unregisteredUserEmail, java.lang.String userID, java.lang.String password, java.lang.String email, int timeout, com.strikeiron.www.holders.SIWsOutputOfVerifyEmailRecordHolder verifyEmailResult, com.strikeiron.www.holders.SISubscriptionInfoHolder SISubscriptionInfo) throws java.rmi.RemoteException;", "public abstract boolean verify();", "private void validateEmail() {\n myEmailValidator.processResult(\n myEmailValidator.apply(myBinding.editResetEmail.getText().toString().trim()),\n this::verifyAuthWithServer,\n result -> myBinding.editResetEmail.setError(\"Please enter a valid Email address.\"));\n }", "public boolean validateEmail() {\n\t\tString emailString = emailValidity.getText();\n\t\tString errorMsg = \"Email in use.\";\n\t\tboolean result = emailString.contains(errorMsg);\n\t\tif (result) {\n\t\t\tstoreVerificationResults(true, \"Email in use\");\n\t\t\tresult = true;\n\t\t} else {\n\t\t\tstoreVerificationResults(false, \"User able to reuse email id\");\n\t\t}\n\t\treturn result;\n\t}", "boolean validateEmail(String email) {\n\t\treturn true;\n\n\t}", "private void checkIfEmailVerified() {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n if (user.isEmailVerified())\n {\n // user is verified, so you can finish this activity or send user to activity which you want.\n Toast.makeText(Login.this, \"Successfully logged in\", Toast.LENGTH_SHORT).show();\n updateDB();\n startActivity(new Intent(Login.this, Home.class));\n finish();\n }\n else\n {\n // email is not verified, so just prompt the message to the user and restart this activity.\n // NOTE: don't forget to log out the user.\n Toast.makeText(Login.this, \"Email Not Verified yet, check your email for verification or sign up\", Toast.LENGTH_SHORT).show();\n progressBar.setVisibility(View.GONE);\n FirebaseAuth.getInstance().signOut();\n }\n }", "@Override\r\n\tpublic Vendor validateUser(String email, String pass) {\n\t\treturn dao.validateUser(email, pass);\r\n\t}", "public ID getValidation() { \r\n\t\tID retVal = this.getTypedField(47, 0);\r\n\t\treturn retVal;\r\n }", "boolean emailExistant(String email, int id) throws BusinessException;", "public boolean isEmailCorrect() {\n return (CustomerModel.emailTest(emailTextField.getText()));\n }", "public ID getPsl47_Validation() { \r\n\t\tID retVal = this.getTypedField(47, 0);\r\n\t\treturn retVal;\r\n }", "public boolean isUserExisted(String _fbEmail);", "public String PhoneVerify() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(phoneverified);\r\n\t\t\t\tStr_phoneverified = element.getText();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Phone Number NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn Str_phoneverified;\r\n\t\t\t\r\n\t\t}", "public boolean isRegisteredEmail(String email);", "public String getIsPersonalDetailsVerified() {\n\t\treturn isPersonalDetailsVerified;\n\t}", "@Test\n public void test_IsEmailValid(){\n UserRegistration obj = new UserRegistration();\n boolean result = obj.checkEmailValidation(\"robert@hotmail.com\");\n assertThat(result, is(true));\n }", "public int getValidAdminEmailUname(Validation v) {\r\n\t\t\r\nString query=\"select * from admin where username='\"+v.getUsername() +\"' and email='\"+v.getEmail()+\"'\";\r\n int a=0;\t\t\r\n\t\tRowMapper<Validation> rowMapper=new RowMapper<Validation>() {\r\n\r\n\t\t\tpublic Validation mapRow(ResultSet rs, int row) throws SQLException {\r\n\t\t\t\t Validation v=new Validation();\r\n\t\t\t\t v.setUsername(rs.getString(\"username\"));\r\n\t\t\t\t v.setPassword(rs.getString(\"email\"));\r\n\t\t\treturn v;\r\n\t\t\t}\r\n\t\t};\r\n\t\tList<Validation> list=jdbctemplate.query(query, rowMapper);\r\n\t\t a=list.size()>0?1:0; \r\n\t\treturn a;\r\n\t}", "@Test\n public void testGetUserId() {\n System.out.println(\"getUserId Test (Passing value)\");\n Long expResult = 1l;\n Long result = user.getUserId();\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertEquals(expResult, result);\n }", "public int userValidation(Validation v) {\r\n\t\tint a=0;\r\n\t\tString query=\"select * from user_registration where user_name='\"+v.getUsername() +\"' and password='\"+v.getPassword()+\"'\";\r\n\t\t\r\n\t\tRowMapper<Validation> rowMapper=new RowMapper<Validation>() {\r\n\r\n\t\t\tpublic Validation mapRow(ResultSet rs, int row) throws SQLException {\r\n\t\t\t\t Validation v=new Validation();\r\n\t\t\t\t v.setUsername(rs.getString(\"user_name\"));\r\n\t\t\t\t v.setPassword(rs.getString(\"password\"));\r\n\t\t\treturn v;\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\t\r\n\t\tList<Validation> list=jdbctemplate.query(query, rowMapper);\r\n\t\t\r\n\t\t a=list.size()>0?1:0;\r\n\t\treturn a;\r\n\t}", "@Override\r\n\tpublic int inviteEmailCheck(String useremail, int projectno) {\n\t\treturn pDao.inviteEmailCheck(useremail, projectno);\r\n\t}", "public String verify()\n\t{\n\t\t\treturn null;\n\t}", "@Override\n\tpublic boolean verifyEmailAddress(EmailAddress address)\n\t{\n\t\treturn false;\n\t}", "public static void verify() {\n\n\t\t\t\n\t\t\t\n\t\t\n\t}", "public EPPNameVerificationStatus getStatus() {\n\t\treturn this.status;\n\t}", "public boolean isUserIdTaken(String userEmailId);", "@Test(groups ={Slingshot,Regression})\n\tpublic void ValidateAdduserEmailidField() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Email address 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.validateEmailidField(userProfile);\t\t\t\t \t \t\t\t\t\t\t\n\t}", "@Override\n\tpublic boolean validateRequest(String userEmail, String senderEmail) {\n\t\tconn = ConnectionFactory.getConnection();\n\n\t\ttry {\n\t\t\tString sql = \"select count(*) as rowcount from friendship where user_id_1=? and user_id_2=? and status='N'\";\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t\tpstmt.setString(1, senderEmail);\n\t\t\tpstmt.setString(2, userEmail);\n\n\t\t\tset = pstmt.executeQuery();\n\n\t\t\tset.next();\n\t\t\t\n\t\t\tint rowcount = set.getInt(\"rowcount\");\n\t\t\t\n\t\t\tif(rowcount > 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t} catch(SQLException sqlex) {\n\t\t\tsqlex.printStackTrace();\n\t\t} catch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionFactory.closeResources(set, pstmt, conn);\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isVerified() {\r\n return verified;\r\n }", "public void checkEmail(String email,TableQueryCallback<BaseUser> callback) {\n mBaseUserTable.where().field(\"email\").eq(email).execute(callback);\n }", "public CheckEmailResponse checkemail(ResetPasswordRequest resetpwdreq) {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// get reg emailid from db\n\t\tlogger.info(\"In checkemail Method==========\");\n\t\t// Response object\n\t\tCheckEmailResponse obj = new CheckEmailResponse();\n\t\tString sql = \"select count(1) from user where emailid = ? \";\n\t\tint result = jdbcTemplate.queryForObject(sql, new Object[] { resetpwdreq.getEmailid() }, Integer.class);\n\t\tlogger.info(\"Result Query :\" + result);\n\t\tif (result > 0) {\n\t\t\tobj.setStatus(true);\n\t\t\tobj.setMessage(\"EMAIL EXIST\");\n\t\t\treturn obj;\n\t\t} else {\n\t\t\tobj.setStatus(false);\n\t\t\tobj.setMessage(\"EMAIL DOES NOT EXIST\");\n\t\t\treturn obj;\n\t\t}\n\n\t}", "public boolean isValidated(){\n return getValidatedFlag();\n }", "private boolean isEmailValid(String email) {\n return true;\r\n }", "public void setEmailVerified(boolean emailVerified) {\n this.emailVerified = emailVerified;\n }", "@Override\n\tpublic boolean emailisValid(String email) \n\t{\n\t\treturn false;\n\t}", "public Boolean getValidate(){\n return validated;\n }", "public Integer getVerifyType() {\r\n return verifyType;\r\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser firebaseUser = firebaseOps.getCurrentFirebaseUser();\n if (firebaseUser.isEmailVerified()) {\n createUserObjectInDatabase(firebaseUser.getUid());\n\n } else {\n Toast.makeText(MainActivity.this, \"Please verify your email first\", Toast.LENGTH_SHORT).show();\n }\n }\n }", "@Test\n public void testSetIsAccountVerified() {\n System.out.println(\"setIsAccountVerified Test (Passing value)\");\n Boolean isAccountVerified = Boolean.TRUE;\n user.setIsAccountVerified(isAccountVerified);\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertTrue(violations.isEmpty());\n }", "public boolean isVerified() {\n return verified;\n }", "public int getValid() {\n return valid;\n }", "public String findByEmprEmailValidation(Employer t, String email) {\n\t\treturn employerAccountDao.findByEmprEmailValidation(t, email);\r\n\t}", "@Test\n\t\tvoid givenPassword_CheckForValidationForPasswordRule4_RetrunTrue() {\n\t\t\tboolean result =ValidateUserDetails.validatePassword(\"Srewoirfjkbh#3\");\n\t\t\tAssertions.assertTrue(result);\n\t\t}", "@Test\r\n\tpublic void TC_08_verify_Existing_Email_Address() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\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 valid email address already taken\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\", confirmPassword);\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 already registered\r\n\t\t//email address is displayed\r\n\t\terrMsg = Page_Registration.getMandatoryFieldErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"Username already taken.\");\r\n\r\n\t}", "boolean validateMailAddress(final String mailAddress);", "public boolean validateRegister(String email) {\n\t\tLog.i(TAG, \"validate current user whether exisits in db\");\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString val = \"select * from \" + TABLE_USER\n\t\t\t\t+ \" where email='\" + email + \"'\";\n\t\tCursor cursor = db.rawQuery(val, null);\n\t\tcursor.moveToFirst();\n\t\tif (cursor.isAfterLast()) return true;\n\t\treturn false;\n\t}", "@Test\n\tpublic void testValidate()\n\t{\n\t\tSystem.out.println(\"validate\");\n\t\tUserTypeCode userTypeCode = new UserTypeCode();\n\t\tuserTypeCode.setCode(\"Test\");\n\t\tuserTypeCode.setDescription(\"Test\");\n\n\t\tValidationModel validateModel = new ValidationModel(userTypeCode);\n\t\tvalidateModel.setConsumeFieldsOnly(true);\n\n\t\tValidationResult result = ValidationUtil.validate(validateModel);\n\t\tSystem.out.println(\"Any Valid consume: \" + result.toString());\n\t\tif (result.valid() == false) {\n\t\t\tAssert.fail(\"Failed validation when it was expected to pass.\");\n\t\t}\n\t\tSystem.out.println(\"---------------------------\");\n\n\t\tvalidateModel = new ValidationModel(userTypeCode);\n\t\tresult = ValidationUtil.validate(validateModel);\n\t\tSystem.out.println(\"Faild: \" + result.toString());\n\t}", "public void validate(){\n if (validated){\n validated = false;\n } else {\n validated = true;\n }\n }", "public Byte getEmailRemindFlag() {\n return emailRemindFlag;\n }", "@Test(priority=1)\n\tpublic void testEmailValidity() {\n\t\tsignup.clearAllFields();\n\t\tsignup.enterId(\"123@abc\");\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\tAssert.assertTrue(TestHelper.isStringPresent(errors, \"Please enter a valid email address in the format someone@example.com.\"));\n\t}", "@RequestMapping(value=\"/available/email\", method=RequestMethod.POST)\n\tpublic @ResponseBody Object checkEmailAvailable(@RequestParam String email) {\n\t\ttry {\n\t\t\treturn userService.checkEmailAvailable(email);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Thats an error. \" + e.toString());\n\t\t\treturn Collections.singletonMap(\"status\", \"error\");\n\t\t}\n\t}", "@PostMapping(value = \"/getValidExtUser\")\n\tpublic RestResponse<StgExtUserInfo> getValidExtUser(@RequestParam String email) {\t\n\t\tlogInfo(LOG, true, \"Ext user email : {} \", email);\t\t\n\t\tRestResponse<StgExtUserInfo> restResponse = new RestResponse<>(SUCCESS);\n\t\ttry {\n\t\t\tStgExtUserInfo extUser = userRegistrationService.getValidExtUser(email);\n\t\t\trestResponse.setResult(extUser);\n\t\t}catch(Exception e) {\n\t\t\tLOG.error(\"Exception : \", e);\n\t\t}\n\t\treturn restResponse;\t\t\n\t}", "@Test\r\n\tpublic void TC_05_verify_email_Mandatory_Field() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\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 except email address\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", \"\");\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", confirmPassword);\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding email address\r\n\t\t// is displayed\r\n\t\terrMsg = Page_Registration.getMandatoryFieldErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"Please enter a value for Email\");\r\n\r\n\t}", "public boolean findEmail(String email);", "ValidationResponse validate();", "public boolean checkUser(String email) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_USER_ID\n };\n \n // selection criteria\n String selection = COLUMN_USER_EMAIL + \" = ?\";\n \n // selection argument\n String[] selectionArgs = {email};\n \n // query user table with condition\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = 'jack@androidtutorialshub.com';\n */\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.query(\n TABLE_USER, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n cursor.close();\n db.close();\n\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }", "public int serviceProviderValidation(Validation v) {\r\n\t int count=0;\r\n\t\tString query=\"select * from sp_final where user_name='\"+v.getUsername() +\"' and password='\"+v.getPassword()+\"'\";\r\n\t\t\r\n\t\tRowMapper<Validation> rowMapper=new RowMapper<Validation>() {\r\n\r\n\t\t\tpublic Validation mapRow(ResultSet rs, int row) throws SQLException {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tValidation v=new Validation();\r\n\t\t\t\tv.setUsername(rs.getString(\"user_name\"));\r\n\t\t\t\tv.setPassword(rs.getString(\"password\"));\r\n\t\t\t\treturn v;\r\n\t\t\t}\r\n\t\t};\r\n\t\tList<Validation> list=jdbctemplate.query(query, rowMapper);\r\n\t\tcount=list.size()>0?1:0;\r\n\t\treturn count;\r\n\t}", "@Test\n public void testIsValidEmailAddress() {\n System.out.println(\"isValidEmailAddress\");\n String email = \"hg5\";\n boolean expResult = false;\n boolean result = ValidVariables.isValidEmailAddress(email);\n assertEquals(expResult, result);\n }", "private void checkValidation() {\n // Get email id and password\n MainActivity.EmailAddress = emailid.getText().toString();\n finalPassword = password.getText().toString();\n\n // Check patter for email id\n Pattern p = Pattern.compile(Utils.regEx);\n\n Matcher m = p.matcher(MainActivity.EmailAddress);\n\n // Check for both field is empty or not\n if (MainActivity.EmailAddress.equals(\"\") || MainActivity.EmailAddress.length() == 0\n || finalPassword.equals(\"\") || finalPassword.length() == 0) {\n loginLayout.startAnimation(shakeAnimation);\n new CustomToast().Show_Toast(getActivity(), view,\n \"Enter both credentials.\");\n\n }\n // Check if email id is valid or not\n else if (!m.find())\n new CustomToast().Show_Toast(getActivity(), view,\n \"Your Email Id is Invalid.\");\n // Else do login and do your stuff\n else\n tryLoginUser();\n\n }", "java.lang.String getUserEmail();", "public User validExistingEmail(TextInputLayout tiEmail, EditText etEmail) {\n boolean result = isValidEmail(tiEmail, etEmail);\n User user = null;\n\n if (result) {\n String email = etEmail.getText().toString().trim();\n UserRepository userRepository = new UserRepository(c.getApplicationContext());\n user = userRepository.getUserByEmail(email);\n if (user == null)\n tiEmail.setError(c.getString(R.string.emailNotExist));\n else\n tiEmail.setError(null);\n }\n\n return user;\n }", "@Test\n\tpublic void testValidate() {\n\t\tSystem.out.println(\"starting testValidate()\");\n\t\tPersonalData personalData = new PersonalData(\"Kelvin\", \"Huynh\", \"4081234567\", \"Kelvin_Huynh@email.com\");\n\t\tassertTrue (\"address validates\", personalData.validatePersonalData());\n\t System.out.println(\"testValidate PASSED\");\n\t}", "@Test\n\t\tpublic static void givenFirstName_WhenProper_ShouldReturnTrue() {\n\t\t\tboolean result= ValidateUserDetails.validateFirstName(\"Priyanka\");\n\t\t\tAssertions.assertTrue(result);\n\n\t\t}", "public EmailCheckResult check(String emailValue) {\n int atSignPosition = emailValue.indexOf('@');\n if (atSignPosition == -1) return EmailCheckResult.NOT_EMAIL;\n\n\n String domainValue = emailValue.substring(++atSignPosition);\n ArrayList<String> mxList;\n\n // check if the value has domain\n try {\n mxList = getMX(domainValue);\n } catch (NamingException ex) {\n return EmailCheckResult.NO_DOMAIN;\n }\n if (mxList.size() == 0) return EmailCheckResult.NO_DOMAIN;\n else return checkMxHosts(emailValue, mxList);\n }", "private void validateEmail() {\n mEmailValidator.processResult(\n mEmailValidator.apply(binding.registerEmail.getText().toString().trim()),\n this::validatePasswordsMatch,\n result -> binding.registerEmail.setError(\"Please enter a valid Email address.\"));\n }" ]
[ "0.6659554", "0.65725935", "0.64596695", "0.6365673", "0.63022447", "0.6292814", "0.6243933", "0.6232964", "0.6220594", "0.61862904", "0.6170332", "0.6115353", "0.601095", "0.59922606", "0.59703416", "0.5923075", "0.5911951", "0.58914757", "0.5849595", "0.58325094", "0.58294845", "0.58256173", "0.579604", "0.5788605", "0.5783895", "0.5735852", "0.57322055", "0.57175326", "0.5683683", "0.5670355", "0.5670355", "0.5670355", "0.5670355", "0.5670355", "0.565198", "0.5614275", "0.557758", "0.5576667", "0.55742455", "0.55705786", "0.5569047", "0.5542163", "0.5541575", "0.5537423", "0.5519527", "0.5512991", "0.5507017", "0.54987234", "0.54896706", "0.5484955", "0.548482", "0.5482986", "0.5476611", "0.5475912", "0.54734063", "0.5464197", "0.546061", "0.5460261", "0.54433113", "0.5440569", "0.5427293", "0.5426877", "0.54202056", "0.54131114", "0.5385269", "0.5380494", "0.53773683", "0.53745866", "0.5369781", "0.536696", "0.5360353", "0.5353737", "0.5338183", "0.533515", "0.5334623", "0.53313065", "0.5311818", "0.5307925", "0.53078014", "0.52933306", "0.5290148", "0.5279865", "0.5278837", "0.5272976", "0.52698934", "0.5264575", "0.52637345", "0.52634096", "0.5254143", "0.52489626", "0.5236927", "0.5236846", "0.52356684", "0.5234151", "0.5224065", "0.5221625", "0.5216295", "0.52155286", "0.5191701", "0.5176461" ]
0.6042584
12
Method.........................................getCred_IDByBean Author......................................................JLH This method retrieves the Credential ID based on the Credential Bean Return Value (int) cred_ID: Returns a credential ID, this is an int that is automatically incremented in the database when the credential is created
public static synchronized int getCred_IDByBean(Credentials cred){ int cred_ID=0; Connection connection; PreparedStatement statement = null; String preparedSQL = "Select Credentials_ID From credential Where Email = ? " + "And Pass= ? And Role= ? And Validated= ? And RegKey= ?"; try{ connection = DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setString(1, cred.getEmail()); statement.setString(2, cred.getPass()); statement.setString(3, cred.getRole()); statement.setInt(4, cred.getValid()); statement.setString(5, cred.getRegKey()); ResultSet rs = statement.executeQuery(); while(rs.next()){ cred_ID = rs.getInt(1); } rs.close(); statement.close(); connection.close(); } catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } return cred_ID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getCredentialId() {\r\n return credentialId;\r\n }", "public String getCredentialId() {\n return this.CredentialId;\n }", "@Override\n\tpublic String getId() {\n\t\tString pName = ctx.getCallerPrincipal().getName();\n\t\tPerson p = userEJB.findPerson(pName);\n\t\tString id = p.getId()+\"\";\n\t\treturn id;\n\t\t\n\t}", "public String getCredentialsId() {\n return settings.CredentialsId;\n }", "@Override\n\tpublic java.lang.String getBeanIdentifier() {\n\t\treturn _kpiEntryLocalService.getBeanIdentifier();\n\t}", "public static synchronized int deleteCred(int credID){\n\t\t\tint status=0;\t\n\t\t\tConnection connection; \n\t\t\t \n\t\t\t \n\t\t\t\tString preparedSQL = \"DELETE FROM credential WHERE Credentials_ID = ?\";\n\t\t\t\tPreparedStatement statement=null;\t\n\t\t\t\ttry{\n\t\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\n\t\t\t\t\tstatement.setInt(1, credID);\n\t\t\t\t\tstatus = statement.executeUpdate();\n\t\t\t\t\tstatement.close();\n\t\t\t\t\tconnection.close();\n\t\t\t\t}catch (SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t\t}\n\n\t\t\treturn status;\n\t}", "public static synchronized Credentials getCedentialByUser_ID(int userID){\n\t\t\tConnection connection;\n\t\t\tCredentials cred = null;\n\t\t \tPreparedStatement statement = null;\n\t\t\tString preparedSQL = \"Select * From credential Where User_ID = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection = DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setInt(1,userID);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tcred = new Credentials();\n\t\t\t\t\tcred.setCredID(rs.getInt(1));\n\t\t\t\t\tcred.setUserID(rs.getInt(2));\n\t\t\t\t\tcred.setEmail(rs.getString(3));\n\t\t\t\t\tcred.setPass(rs.getString(4));\n\t\t\t\t\tcred.setRole(rs.getString(5));\n\t\t\t\t\tcred.setValid(rs.getInt(6));\n\t\t\t\t\tcred.setRegKey(rs.getString(7));\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}\n\t\t catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn cred;\n\t}", "public static synchronized int addCred(Credentials cred){\n\t\t\tint status=0;\t\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"INSERT INTO credential (Email, Pass, User_ID, Role, \" +\n\t\t\t\t\t\"Validated, RegKey) VALUES(?,?,?,?,?,?) \";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\n\t\t\t\tstatement.setString(1, cred.getEmail());\n\t\t\t\tstatement.setString(2, cred.getPass());\n\t\t\t\tstatement.setInt(3, cred.getUserID());\n\t\t\t\tstatement.setString(4, cred.getRole());\n\t\t\t\tstatement.setInt(5, cred.getValid());\n\t\t\t\tstatement.setString(6, cred.getRegKey());\n\t\t\t\tstatus = statement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\n\t\t\treturn status;\n\t}", "public java.lang.String getBeanIdentifier();", "@Override\n\tpublic java.lang.String getBeanIdentifier() {\n\t\treturn _userSyncLocalService.getBeanIdentifier();\n\t}", "private long getOwnID(){\n return authenticationController.getMember() == null ? -1 :authenticationController.getMember().getID();\n }", "@Override\n\tpublic java.lang.String getBeanIdentifier() {\n\t\treturn _circulationRuleLocalService.getBeanIdentifier();\n\t}", "protected String getID(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"ID\", sharedPref.getString(\"id\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_ID, null);\n }", "Integer getRealmId();", "public int getAccessid() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((Integer) __getCache(\"accessid\")).intValue());\n }", "int getLoginId();", "int getLoginId();", "int getLoginId();", "int getLoginId();", "int getLoginId();", "@Override\n\tpublic java.lang.String getBeanIdentifier() {\n\t\treturn _esfResultLocalService.getBeanIdentifier();\n\t}", "String getAccountID();", "String getAccountID();", "@Override\n\tpublic java.lang.String getBeanIdentifier() {\n\t\treturn _surveyLocalService.getBeanIdentifier();\n\t}", "public int getProgID() throws Exception\n\t{\n\t\tint id=0;\n\t\ttry(Connection connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/usersdb?useTimezone=true&serverTimezone=UTC\", \"root\", \"123\");\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(\"SELECT idprogram FROM usersdb.telephone_numbers WHERE clients_username = ?;\"))\n\t\t{\n\t\t\tpreparedStatement.setString(1,username);\n\t\t\tResultSet result = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile(result.next()) \n\t\t\t{\n\t\t\t\tid = result.getInt(\"idprogram\");\n\t\t\t\tprogid = result.getInt(\"idprogram\");\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn id;\n\t}", "public int getC_BankAccountDoc_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_BankAccountDoc_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "private static int getComponentIdFromCompName(String compName){\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria componentCriteria = session.createCriteria(ComponentEntity.class);\n\t\tcomponentCriteria.add(Restrictions.eq(\"componentName\",compName));\n\t\tcomponentCriteria.add(Restrictions.eq(\"delInd\", 0));\n\t\tcomponentCriteria.setMaxResults(1);\n\t\tComponentEntity com =(ComponentEntity) componentCriteria.uniqueResult();\n\t\tint compId = 0;\n\t\tif(com != null){\n\t\t\tcompId = com.getComponentId();\n\t\t}\n\t\ttxn.commit();\n\t\treturn compId;\n\t}", "public Long getGuruId(GuruModel model) {\n\t\tquery = \"select id from guru where email=? and pwd=?\";\n\t\tList<GuruModel> list = this.jdbcTemplate.query(query,new Object[]{model.getEmail(),this.edutility.getSHA256(model.getPwd())},\n\t\t\t\tBeanPropertyRowMapper.newInstance(GuruModel.class));\n\t\t\n\t\treturn list.get(0).getId();\n\t}", "public static java.lang.String getBeanIdentifier() {\n\t\treturn getService().getBeanIdentifier();\n\t}", "public static java.lang.String getBeanIdentifier() {\n\t\treturn getService().getBeanIdentifier();\n\t}", "public static java.lang.String getBeanIdentifier() {\n\t\treturn getService().getBeanIdentifier();\n\t}", "public static java.lang.String getBeanIdentifier() {\n\t\treturn getService().getBeanIdentifier();\n\t}", "public static java.lang.String getBeanIdentifier() {\n\t\treturn getService().getBeanIdentifier();\n\t}", "public int getAccountID(Account account)\n\t {\n\t\t int id = -1;\n\t\t String columns[] = new String[] {DatabaseContract.AccountContract._ID};\n\t\t \n\t\t String where = DatabaseContract.AccountContract.COLUMN_NAME_USERNAME + \" = ? \";\n\t\t \n\t\t Cursor cursor = db.query(DatabaseContract.AccountContract.TABLE_NAME,\n\t\t\t\t columns,\n\t\t\t\t where,\n\t\t\t\t new String[] {account.getUsername()},\n\t\t\t\t null, null, null);\n\t\t\n\t\t if(cursor.getCount() > 0)\n\t\t {\n\t\t\t cursor.moveToFirst();\n\t\t\t \n\t\t\t int idCol = cursor.getColumnIndex(DatabaseContract.AccountContract._ID);\n\t\t\t id = cursor.getInt(idCol);\n\t\t }\n\t\t \n\t\t cursor.close();\n\t\t return id;\n\t }", "int getID()\n throws RemoteException;", "private int getCurrentAccountId() {\n accountLock.lock();\n int nmr = 1;\n try (\n Statement s = rawDataSource.getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n ResultSet res = s.executeQuery(\n \"SELECT ACCOUNT_ID FROM APP.ACCOUNTS ORDER BY ACCOUNT_ID ASC\")) {\n\n if (res.last()) {\n nmr = Integer.parseInt(res.getString(\"ACCOUNT_ID\")) + 1;\n }\n } catch (SQLException ex) {\n return nmr;\n }\n\n accountLock.unlock();\n return nmr;\n }", "public java.lang.String getBeanIdentifier() {\n return _examConfigLocalService.getBeanIdentifier();\n }", "long getLoginId();", "long getLoginId();", "long getLoginId();", "public Long getUserID() {\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n return getByUsername(authentication.getName()).getId();\n }", "Integer getID();", "Integer getID();", "@Override\n\tpublic java.lang.String getBeanIdentifier() {\n\t\treturn _vanBanPhapQuyLocalService.getBeanIdentifier();\n\t}", "public Long getCheckingAccountCustomerId(long checkingAccountId) throws Exception {\r\n CheckingAccountDAO checkingAccountDAO = new CheckingAccountDAO();\r\n CheckingAccountTO checkingAccountTO =\r\n checkingAccountDAO.selectById(checkingAccountId);\r\n checkingAccountDAO.close();\r\n\r\n CustomerDAO customerDAO = new CustomerDAO();\r\n CustomerTO customerTO = customerDAO.selectById(checkingAccountTO.getCustomerId());\r\n customerDAO.close();\r\n\r\n return customerTO.getId();\r\n }", "@Override\n public java.lang.String getBeanIdentifier() {\n return _muQuxianQujianLocalService.getBeanIdentifier();\n }", "public abstract Integer getCompteId();", "public Long getId()\r\n\t{\r\n\t\treturn idContrat;\r\n\t}", "public java.lang.String getProductoCreditoID() {\n return productoCreditoID;\n }", "public static java.lang.String getBeanIdentifier() {\n return getService().getBeanIdentifier();\n }", "public static java.lang.String getBeanIdentifier() {\n return getService().getBeanIdentifier();\n }", "public static java.lang.String getBeanIdentifier() {\n return getService().getBeanIdentifier();\n }", "public static java.lang.String getBeanIdentifier() {\n return getService().getBeanIdentifier();\n }", "public static java.lang.String getBeanIdentifier() {\n return getService().getBeanIdentifier();\n }", "java.lang.String getLoginId();", "public java.lang.Integer getCare_id();", "public static int getId(String login) throws SQLException {\n\t\tConnection connexion = DataBase.getMySQLConnection();\n\t\tPreparedStatement ps = connexion.prepareStatement(getIdUser);\n\t\tps.setString(1, login);\n\t\tResultSet rs = ps.executeQuery();\n\t\trs.first();\n\t\tint res = rs.getInt(\"ID_USER\");\n\t\trs.close();\n\t\tps.close();\n\t\tconnexion.close();\n\t\treturn res;\n\t}", "public int getContrcdId() {\n return contrcdId;\n }", "public static long getIdConnected(Context ctx) {\n\t\tSharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(ctx);\n\t\treturn preferences.getLong(PreferenceConstants.ACCOUNT_ID, 0L);\n\t}", "public String getConsumerID(WSMessageConsumerDTO consumerDTO){\n String id = consumerDTO.getReceiverId();\n return id;\n }", "public java.lang.String getBeanIdentifier() {\n\t\treturn _primarySchoolStudentLocalService.getBeanIdentifier();\n\t}", "String getLoginId();", "public StrColumn getSheetId() {\n return delegate.getColumn(\"sheet_id\", DelegatingStrColumn::new);\n }", "public CredentialsModel find(int id) {\n Statement stmt = null;\n Connection connection = null;\n try {\n try {\n connection = ds.getConnection();\n try {\n stmt = connection.createStatement();\n ResultSet result = stmt\n .executeQuery(\"SELECT * FROM Credentials \"\n + \"where EmpNum = '\" + id + \"'\");\n if (result.next()) {\n CredentialsModel cred = new CredentialsModel();\n cred.setPassword(result.getString(\"EmpPassword\"));\n cred.setUserName(result.getString(\"EmpUsername\"));\n return cred;\n } else {\n return null;\n }\n } finally {\n if (stmt != null) {\n stmt.close();\n }\n\n }\n } finally {\n if (connection != null) {\n connection.close();\n }\n }\n } catch (SQLException ex) {\n System.out.println(\"Error in find \" + id);\n ex.printStackTrace();\n return null;\n }\n }", "public int getC_BankAccount_ID();", "java.lang.String getClientRecordId();", "public int getUser1W_ID();", "long getDeskId();", "long getDeskId();", "public String getClientId() {\r\n ExtentReporter.logger.log(LogStatus.INFO,\r\n \"Click on the Policyholder Name: Note (and save for later input) the Client ID: Click [Close]\");\r\n clickButton(driver, policyHolderNameLink, \"Policy Holder Name\");\r\n switchToFrameUsingElement(driver, entityMiniPopupFrameId);\r\n getPageTitle(driver, \"Entity Mini Popup\");\r\n String getClientIdValue = clientId.getAttribute(\"innerHTML\");\r\n // TODO - need to store above value in Excel sheet.\r\n clickButton(driver, entityMiniPopupCloseBtn, \"Entity Mini Popup Close\");\r\n switchToParentWindowfromframe(driver);\r\n return getClientIdValue;\r\n }", "public java.lang.String getBeanIdentifier() {\n\t\treturn _preschoolParentLocalService.getBeanIdentifier();\n\t}", "public int getAccountID() {\n return accountID;\n }", "public Integer pesquisarIdCreditoRealizadoContratoDemanda(Conta conta, CreditoTipo ctContratoDemanda)\n\t\t\tthrows ErroRepositorioException;", "public int getHC_Org2_ID();", "protected Integer getCurrentUtilityId() {\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\n AuthenticatedUser user = null;\n\n if (auth.getPrincipal() instanceof AuthenticatedUser) {\n user = (AuthenticatedUser) auth.getPrincipal();\n }\n\n if (user != null) {\n return user.getUtilityId();\n }\n\n return null;\n }", "@Override\r\n\tpublic Integer getId() {\n\t\treturn codigoCliente;\r\n\t}", "public int getC_BPartner_ID();", "Long getRemoteID() throws RemoteException;", "private void settingNewIdForBean(DataBeanBuilder bean, JavaClassWriter cf, String beanImpl) throws IOException {\n for (DataBeanPropertyBuilder property : bean.properties.values()) {\n String capitalizeName = getCapitalizeName(property.name);\n if (property.isId())\n cf.println(\"if(((\" + beanImpl + \") bean).get\" + capitalizeName + \"() != \" +\n \"((\" + beanImpl + \") beanGetting).get\" + capitalizeName + \"())\\n\" +\n \"((\" + beanImpl + \") bean).set\" + capitalizeName + \"(((\" + beanImpl + \") beanGetting).get\" + capitalizeName + \"());\");\n }\n }", "com.cantor.drop.aggregator.model.CFTrade.SecurityIdType getSecIdType();", "public int getId() {\n//\t\tif (!this.isCard())\n//\t\t\treturn 0;\n\t\treturn id;\n\t}", "public int getProfile_id() {\n return profileID;\n }", "protected String getCourseID(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"ID\", sharedPref.getString(\"id\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_COURSE, null);\n }", "@Override\n\tpublic int getID()\n\t{\n\t\treturn Main.creaPersonaggio;\n\t}", "public int conocerID(String usuario) {\n Conexion c = new Conexion();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String sql = \"SELECT id FROM usuario WHERE usuario.usuario = ?\";\n try {\n ps = c.getConexion().prepareStatement(sql);\n ps.setString(1, usuario);\n rs = ps.executeQuery();\n while (rs.next()) {\n return rs.getInt(1);\n }\n\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n } finally {\n try {\n ps.close();\n rs.close();\n c.cerrarConexion();\n } catch (Exception ex) {\n }\n }\n return -1;\n }", "@Override\n\tpublic String addApplicantDetails(ApplicationBean applicationBean)\n\t\t\tthrows UniversityException {\n\t\tString applicationID=null;\n\t\tapplicationID=dao.addApplicantDetails(applicationBean);\n\t\treturn applicationID;\n\t}", "public int getUser1X_ID();", "public int idEmpleado(int cui) throws SQLException{\n obtenerConexion();\n int id = 0;\n PreparedStatement declaracionId = cn.prepareStatement(ID_EMPLEADO);\n declaracionId.setInt(1, cui);\n ResultSet result = declaracionId.executeQuery();\n while(result.next()){\n id = result.getInt(\"id\");\n }\n login.Desconectar();\n return id;\n }", "int getDoctorId();", "int getDoctorId();", "public static synchronized int getUserIDByEmail(String email){\n\t\t\n\t\t\tint user_ID = 0;\n\t\t\tConnection connection;\n\t\t \tPreparedStatement statement = null;\n\t\t\tString preparedSQL = \"Select User_ID From credential Where Email = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection = DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setString(1, email);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tuser_ID = rs.getInt(1);\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}\n\t\t catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t\tuser_ID=0;\n\t\t\t}\n\t\t\treturn user_ID;\n\t\t\t\n\t}", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();" ]
[ "0.57829595", "0.56568956", "0.55886596", "0.5374032", "0.53528184", "0.5271484", "0.5250879", "0.5239442", "0.5235881", "0.5224834", "0.5204191", "0.51644015", "0.5136764", "0.513115", "0.51070976", "0.5099486", "0.5099486", "0.5099486", "0.5099486", "0.5099486", "0.50927913", "0.5088284", "0.5088284", "0.5076585", "0.50689524", "0.50683504", "0.5052979", "0.5047649", "0.5018184", "0.5018184", "0.5018184", "0.5018184", "0.5018184", "0.4992085", "0.49852905", "0.4954368", "0.49494472", "0.49433747", "0.49433747", "0.49433747", "0.49277878", "0.49257135", "0.49257135", "0.49216852", "0.49153885", "0.49104875", "0.48866493", "0.48795897", "0.4873733", "0.48648483", "0.48648483", "0.48648483", "0.48648483", "0.48648483", "0.48587263", "0.48446304", "0.4843534", "0.4817554", "0.4809947", "0.47982332", "0.4796972", "0.47965842", "0.47801325", "0.4775187", "0.47726563", "0.47724134", "0.47642782", "0.47642246", "0.47642246", "0.47534025", "0.47475705", "0.4735442", "0.4727669", "0.47239345", "0.4716247", "0.47161373", "0.46960393", "0.46880212", "0.46852034", "0.46837956", "0.46745634", "0.46639898", "0.46610025", "0.46571702", "0.46469548", "0.46365523", "0.46306217", "0.46279567", "0.4624214", "0.4624214", "0.46225253", "0.46182817", "0.46182817", "0.46182817", "0.46182817", "0.46182817", "0.46182817", "0.46182817", "0.46182817", "0.46182817" ]
0.8416079
0
Method...........................................getKeyBYUserID Author......................................................JLH This method retrieves a key based on the user_ID Return Value (String) key: Returns an alphanumeric string generated when the user is created and removed when the user validates their email
public static synchronized String getKeyBYUserID(int user_ID){ String key = ""; Connection connection; PreparedStatement statement = null; String preparedSQL = "Select RegKey From credential Where User_ID = ?"; try{ connection = DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setInt(1, user_ID); ResultSet rs = statement.executeQuery(); while(rs.next()){ key = rs.getString(1); } rs.close(); statement.close(); connection.close(); } catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } return key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getUserKey() {\r\n\t\tif(email!=null&&password!=null) {\r\n\t\t\treturn (email.hashCode()+password.hashCode())/2;\r\n\t\t}else if(email!=null||password!=null) {\r\n\t\t\tif(email!=null) {\r\n\t\t\t\treturn email.hashCode();\r\n\t\t\t}else {\r\n\t\t\t\treturn password.hashCode();\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public String getUserKey()\r\n {\r\n return getAttribute(\"userkey\");\r\n }", "java.lang.String getClientKey();", "public PublicKey getKey (String userName) {\n Logger.write(\"VERBOSE\", \"DB\", \"getKey(\" + userName + \")\");\n int nameCount = 0;\n String key = \"<No Key>\";\n \n try {\n ResultSet results = query(DBStrings.getKey.replace(\"__USERNAME__\", userName) );\n while(results.next()) {\n nameCount++;\n key = results.getString(\"key\");\n }\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n }\n \n if(nameCount == 0)\n Logger.write(\"ERROR\", \"DB\", \"getKey(\" + userName + \") - No keys found for userName\");\n else if (nameCount > 1 )\n Logger.write(\"ERROR\", \"DB\", \"getKey(\" + userName + \") - Multple userNames found for key; Server OPs are evil!\");\n\n return Crypto.decodeKey(key);\n }", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "java.lang.String getSubjectKeyID();", "java.lang.String getSubjectKeyID();", "String key();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getUserID();", "java.lang.String getUserID();", "java.lang.String getUserID();", "public static String getKey(){\n\t\treturn key;\n\t}", "public String getKey() {\n\t\treturn id + \"\";\n\t}", "java.lang.String getUserId();", "java.lang.String getUserId();", "java.lang.String getUserId();", "public static String getKey() {\t\t\n\t\treturn key;\n\t}", "public String getKey();", "public String getKey();", "public String getKey();", "public String getKey();", "public String createCacheKey() {\n return \"organization.\" + userEmail;\n }", "String getUserID();", "protected String getKey(String baseKey){\n \treturn getKey(baseKey, id);\n }", "public String getUserKeyFromUserName(String userName) {\n Cursor resultSet = database.rawQuery(\n \"SELECT UserPublicKey FROM UserAccounts WHERE UserName = '\" + userName + \"'\", null);\n resultSet.moveToFirst();\n String retString = resultSet.getString(0);\n resultSet.close();\n return retString;\n }", "private String getUserKeyByUserLogin(String userLogin) throws NoSuchUserException, UserLookupException\n {\n boolean userLoginUsed = true;\n HashSet<String> attrsToFetch = new HashSet<String>();\n attrsToFetch.add(UserManagerConstants.AttributeName.USER_KEY.getId());\n attrsToFetch.add(UserManagerConstants.AttributeName.USER_LOGIN.getId());\n User user = userMgrOps.getDetails(userLogin, attrsToFetch, userLoginUsed);\n logger.log(ODLLevel.NOTIFICATION, \"User Details: {0}\", new Object[]{user});\n return user.getEntityId();\n }", "private synchronized int generateUserID(){\r\n\t\tint i;\r\n\t\tfor(i = 1; users.containsKey(i);i++);\r\n\t\treturn i;\r\n\t}", "private String getKey()\r\n\t\t{\r\n\t\t\tif (key != null)\r\n\t\t\t{\r\n\t\t\t\treturn key.toString();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn \"The key has not been found\";\r\n\t\t\t}\r\n\t\t}", "String getUserId();", "String getUserId();", "@Override\n\tpublic String getDocumentKey() {\n\t\treturn uid.toString();\n\t}", "public String getKey(){\n\t\treturn key;\n\t}", "String getEncryptionKeyId();", "Object getKey();", "abstract public String getKey();", "public String keyIdentifier() {\n return this.keyIdentifier;\n }", "public String keyIdentifier() {\n return this.keyIdentifier;\n }", "public long getKeyID()\n {\n return keyID;\n }", "public Key getKey() {\n\t\tString fieldvalue = getValue(\"sys_id\");\n\t\tassert fieldvalue != null;\n\t\treturn new Key(fieldvalue);\n\t}", "public String selectPKUser(int id) {\n String sql = \"SELECT publickey FROM users WHERE id = ?\";\n\n try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) {\n pstmt.setInt(1, id);\n ResultSet rs = pstmt.executeQuery();\n String value = rs.getString(\"publickey\");\n return value;\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n return \"\";\n }\n }", "Object getAuthInfoKey();", "public String getUserID();", "public byte[] getUserKey() throws IOException\n {\n byte[] u = null;\n COSString user = (COSString)encryptionDictionary.getDictionaryObject( COSName.getPDFName( \"U\" ) );\n if( user != null )\n {\n u = user.getBytes();\n }\n return u;\n }", "public String getKey(){\n SQLiteDatabase db = this.getReadableDatabase();\n\n // Define a projection that specifies which columns from the database\n // you will actually use after this query.\n String[] projection = {\n SportPartnerDBContract.LoginDB.COLUMN_KEY_NAME\n };\n\n Cursor cursor = db.query(\n SportPartnerDBContract.LoginDB.TABLE_NAME,\n projection,\n null,\n null,\n null,\n null,\n null\n );\n cursor.moveToLast();\n String key = cursor.getString(0);\n cursor.close();\n\n return key;\n }", "protected String generateUserID() {\n Random r = new Random();\n String userID;\n do {\n int randomIDnum = r.nextInt(999999999) + 1;\n userID = String.valueOf(randomIDnum);\n } while (this.userMap.containsKey(userID));\n return userID;\n }", "public String getAppKey(Integer appId) {\n\t\treturn \"d3d1f52452be41aaa1b68e33d59d0188\";\n\t}", "public static synchronized Credentials getCredentialByUserIDKey(int userID, String key){\n\t\t\tConnection connection;\n\t\t\tCredentials cred = null;\n\t\t \tPreparedStatement statement = null;\n\t\t\tString preparedSQL = \"Select * From credential Where User_ID = ? And RegKey =?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection = DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setInt(1,userID);\n\t\t \tstatement.setString(2,key);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tcred = new Credentials();\n\t\t\t\t\tcred.setCredID(rs.getInt(1));\n\t\t\t\t\tcred.setEmail(rs.getString(2));\n\t\t\t\t\tcred.setPass(rs.getString(3));\n\t\t\t\t\tcred.setUserID(rs.getInt(4));\n\t\t\t\t\tcred.setRole(rs.getString(5));\n\t\t\t\t\tcred.setValid(rs.getInt(6));\n\t\t\t\t\tcred.setRegKey(rs.getString(7));\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}\n\t\t catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn cred;\n\t}", "String newKey();", "byte[] getKey();", "java.lang.String getPublicEciesKey();", "@Override\n\tpublic String getKey() {\n\t\treturn id+\"\";\n\t}", "@Override\n\tpublic Long getUserId() {\n\t\treturn user.getKey().getId();\n\t}", "private String key(RepositoryModel repository, KeyType key, long id) {\n\t\treturn key(repository, key, \"\" + id);\n\t}", "private final static String getKey( Integer id ) {\n\t\treturn \"\" + id ;\n\t}", "public String getKey()\n\t{\n\t\treturn key;\n\t}", "@Override\n\tpublic String getKey() {\n\t\treturn key;\n\t}", "@Override\n\tpublic User findByKey(Integer id) {\n\t\treturn null;\n\t}", "public static synchronized int setKey(int userID, String key){\n\t\t\tint status=0;\t\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"Update credential Set RegKey = ? Where User_ID = ?\";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\n\t\t\t\tstatement.setString(1, key);\n\t\t\t\tstatement.setInt(2, userID);\n\t\t\t\tstatus = statement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn status;\n\t}", "public String getKey() {\n\treturn key;\n }", "Key getPrimaryKey();", "int getKey();", "int getKey();", "public String getKey()\n\t\t{\n\t\t\treturn key;\n\t\t}", "public String getKey() {\r\n return key;\r\n }", "public String getKey() {\r\n return key;\r\n }", "public String getKey() {\r\n return key;\r\n }", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();" ]
[ "0.714669", "0.7042218", "0.68268245", "0.6581801", "0.65796083", "0.65796083", "0.65796083", "0.65796083", "0.65796083", "0.65796083", "0.65796083", "0.65796083", "0.65796083", "0.65796083", "0.65796083", "0.65796083", "0.65796083", "0.6577311", "0.6577311", "0.6569758", "0.65022343", "0.65022343", "0.65022343", "0.65022343", "0.65022343", "0.65022343", "0.6429915", "0.6429915", "0.6429915", "0.63227385", "0.6278514", "0.62608516", "0.62608516", "0.62608516", "0.6253521", "0.6229239", "0.6229239", "0.6229239", "0.6229239", "0.6219549", "0.61785346", "0.61560714", "0.6145232", "0.6131802", "0.61265785", "0.6107755", "0.60800064", "0.60800064", "0.6076486", "0.60644263", "0.60616475", "0.6057634", "0.6046275", "0.60393107", "0.60393107", "0.6038639", "0.6034536", "0.6031937", "0.6020357", "0.602028", "0.6002872", "0.59911466", "0.5987043", "0.5981417", "0.5964606", "0.5962885", "0.59616566", "0.5956214", "0.59537554", "0.59389967", "0.5919779", "0.5894959", "0.5892735", "0.5889351", "0.5889173", "0.5888618", "0.5886511", "0.5881257", "0.58701897", "0.58701897", "0.58644325", "0.5864065", "0.5864065", "0.5864065", "0.5859759", "0.5859759", "0.5859759", "0.5859759", "0.5859759", "0.5859759", "0.5859759", "0.5859759", "0.5859759", "0.5859759", "0.5859759", "0.5859759", "0.5859759", "0.5859759", "0.5859759", "0.5859759" ]
0.77080727
0
Method.........................................getEmailByUserID Author......................................................JLH This method retrieves the user's email based on the user_ID Return Value (String) email: Returns the user's email address
public static synchronized String getEmailByUserID(int user_ID){ String email = ""; Connection connection; PreparedStatement statement = null; String preparedSQL = "Select Email From credential Where User_ID = ?"; try{ connection = DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setInt(1, user_ID); ResultSet rs = statement.executeQuery(); while(rs.next()){ email = rs.getString(1); } rs.close(); statement.close(); connection.close(); } catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } return email; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getUserEmail(String userId)\n {\n return null;\n }", "java.lang.String getUserEmail();", "String getUserMainEmail( int nUserId );", "@Override\r\n\tpublic String getEmail(String id) {\r\n\t\tString sql = \"SELECT email FROM \\\"Registration DB\\\".\\\"Userdetails\\\" where id=?\";\r\n\t\treturn jdbcTemplate.queryForObject(sql, new Object[] { id }, String.class);\r\n\t}", "public String getEmailById(long emailID) {\n SQLiteDatabase db_read = ClientBaseOpenHelper.getHelper(mContext).getReadableDatabase();\n Cursor cursor = null;\n String email = \"\";\n\n try {\n cursor = db_read.query(ClientBaseOpenHelper.TABLE_EMAILS,\n new String[]{ClientBaseOpenHelper.EMAIL},\n BaseColumns._ID + \"=\" + emailID, null, null, null, null);\n while (cursor.moveToNext()) {\n email = cursor.getString(cursor.getColumnIndex(ClientBaseOpenHelper.EMAIL));\n }\n return email;\n\n } catch (Exception e) {\n Log.e(TAG, e.getMessage());\n return email;\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n if (db_read != null && db_read.isOpen()) {\n db_read.close();\n }\n if (ClientBaseOpenHelper.getHelper(mContext) != null) {\n ClientBaseOpenHelper.getHelper(mContext).close();\n }\n }\n }", "@Override\n public String getUserId() {\n return email;\n }", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "private String getUserEmailAddress() {\n\t\tUser user = UserDirectoryService.getCurrentUser();\n\t\tString emailAddress = user.getEmail();\n\n\t\treturn emailAddress;\n\t}", "public java.lang.String getUserEmail() {\r\n return userEmail;\r\n }", "public User get(String emailID);", "public java.lang.String getUserEmail() {\n java.lang.Object ref = userEmail_;\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 userEmail_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUserEmail() {\n java.lang.Object ref = userEmail_;\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 userEmail_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public User getUser(String emailId);", "public String getUserEmail() {\r\n return userEmail;\r\n }", "public String getUserEmail() {\r\n return userEmail;\r\n }", "public String getEmail() {\n return userItem.getEmail();\n }", "public com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail fetchOneById(ULong value) {\n return fetchOne(UserEmail.USER_EMAIL.ID, value);\n }", "public WebElement getEmail()\n {\n\t\t\n \tWebElement user_emailId = driver.findElement(email);\n \treturn user_emailId;\n \t\n }", "public String getUserEmail() {\n return userEmail;\n }", "public synchronized String getUserString(String email) {\r\n User user = email2user.get(email);\r\n return (user == null) ? null : user2xml.get(user);\r\n }", "public String getEmailId()\r\n {\r\n return emailId;\r\n }", "public String getEmail() {\n return sp.getString(USER_EMAIL, null);\n }", "@Override\n\tpublic int getUserId(String email) throws DatabaseException, DataNotFoundException {\n\t\tConnection con = DbUtil.getConnection();\n\t\tStudentRegistrationValidationDaoi studentRegistrationValidationDaoi=new StudentRegistrationValidationDaoimpl();\n\t\tint value=studentRegistrationValidationDaoi.getUserId(email, con);\n\t\tDbUtil.closeConnection(con);\n\t\treturn value;\n\t}", "public String getEmailID() {\n\t\treturn emailID;\n\t}", "private String getEmailAddressForResource(long resourceId)\r\n throws LateDeliverablesProcessingException {\r\n Resource resource;\r\n\r\n try {\r\n resource = resourceManager.getResource(resourceId);\r\n } catch (ResourcePersistenceException e) {\r\n throw new LateDeliverablesProcessingException(\"Fails to get resource.\", e);\r\n }\r\n\r\n if (resource == null) {\r\n throw new LateDeliverablesProcessingException(\"Resource with id[\" + resourceId\r\n + \"] not exist.\");\r\n }\r\n\r\n long userId = resource.getUserId();\r\n\r\n ExternalUser user;\r\n\r\n try {\r\n user = userRetrieval.retrieveUser(userId);\r\n } catch (RetrievalException e) {\r\n throw new LateDeliverablesProcessingException(\"Fails to retrieve external user for id : \"\r\n + userId, e);\r\n }\r\n\r\n if (user == null) {\r\n throw new LateDeliverablesProcessingException(\"External user with id[\" + userId\r\n + \"] not exist.\");\r\n }\r\n\r\n String email = user.getEmail();\r\n\r\n if (email == null) {\r\n throw new LateDeliverablesProcessingException(\"email address of resource is null.\");\r\n }\r\n\r\n return email;\r\n }", "String getEmail();", "String getEmail();", "String getEmail();", "String getEmail();", "String getEmail();", "public String getEmailId() {\n return emailId;\n }", "String getUserMail();", "public User getByemailId(String emailId) {\n\t\treturn userDao.getByemailId(emailId);\n\t}", "@Override\n\tpublic UserVO getUserIdToEmail(String email, String pw) {\n\t\treturn mapper.getUserIdToEmail(email, pw);\n\t}", "public com.google.protobuf.ByteString\n getUserEmailBytes() {\n java.lang.Object ref = userEmail_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n userEmail_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getEmailId() {\r\n\t\treturn emailId;\r\n\t}", "@Override\n\tpublic Long getUserIdByEmail(final String email) {\n\t\tfinal UserFormData formData = new UserFormData();\n\t\tformData.getEmail().setValue(email.toLowerCase());\n\t\tthis.loadUserIdByEmail(formData);\n\t\treturn formData.getUserId().getValue();\n\t}", "public String getUserEmail() {\n return sharedPreferences.getString(PREFERENCE_USER_EMAIL, \"\");\n }", "@Override\n\tpublic ERSUser getUserByEmail(String email) {\n\t\treturn userDao.selectUserByEmail(email);\n\t}", "public com.google.protobuf.ByteString\n getUserEmailBytes() {\n java.lang.Object ref = userEmail_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n userEmail_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "User getUserByEmail(final String email);", "public java.lang.String getEmailAddress();", "@Override\n public User getUserById(String email) throws UserException {\n User user;\n\n if (email == null || email.equals(\"\")) {\n logger.error(\"invalid user id: \" + email);\n return null;\n }\n try {\n user = userDAO.getUserById(email);\n\n if (user == null) {\n throw new UserException(\"cannot find user to update with id: \" + email);\n }\n\n logger.info(\"created a new user successfully: \" + user.toString());\n return user;\n } catch (UserException e) {\n e.printStackTrace();\n logger.error(e.getMessage());\n return null;\n }\n }", "public static String getUserEmail() {\r\n return null;\r\n }", "@Override\n public TechGalleryUser getUserByEmail(final String email) throws NotFoundException {\n TechGalleryUser tgUser = userDao.findByEmail(email);\n// TechGalleryUser tgUser = userDao.findByEmail(\"example@example.com\");\n if (tgUser == null) {\n throw new NotFoundException(ValidationMessageEnums.USER_NOT_EXIST.message());\n } else {\n return tgUser;\n }\n }", "public User getUserByEmail(String email)throws EntityNotFoundException\n\t{\n\t\treturn userDao.getById(email);\n\t}", "public synchronized User getUser(String email) {\r\n return (email == null) ? null : email2user.get(email);\r\n }", "@AutoEscape\n\tpublic String getEmailId();", "public String findEmail(String email) {\n\t\tString sql=\"select email from SCOTT.USERS where USERNAME='\"+email+\"'\";\n\t\t\n\t\t Dbobj dj=new Dbobj();\n\t\t JdbcUtils jdbcu=new JdbcUtils();\n\t\t dj=jdbcu.executeQuery(sql);\n\t\t ResultSet rs=dj.getRs(); \n\t\t System.out.println(\"\"+sql);\t\n\t\t String t=\"\";\n\t\t try {\n\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tt=rs.getString(1);\n\t\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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\t\n\t\t \n\t\t\n\t\treturn t;\n\t\t\n\t}", "public void setEmailId(String emailId);", "public void setEmailID(String emailID) {\n this.emailID = emailID;\n }", "public String getEmail() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(email);\r\n\t\t\t\tStr_email = element.getText();\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 Str_email;\r\n\t\t}", "java.lang.String getUserId();", "java.lang.String getUserId();", "java.lang.String getUserId();", "User getUserByEmail(String email);", "public String getAlternateEmail() { return alternateEmail; }", "public String getUser()\n {\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n String email=\"\";\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n email = cursor.getString(1);\n }\n Log.d(TAG, \"Fetching user from Sqlite: \" + email);\n\n return email;\n }", "@Override\n\tpublic User getUser(String email) {\n\t\treturn userDatabase.get(email);\n\t}", "public static String getEmailAddress(final IUser iUser) {\r\n try {\r\n return SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable<String>() {\r\n public String call() {\r\n try {\r\n return iUser.getEMailAddress();\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }\r\n });\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }", "public UsersModel getUserById(String userEmail);", "@GetMapping(\"/getAnUserDetails/{emailId}\")\n\tpublic ResponseEntity<User> getAnUserDetails(@PathVariable String emailId)\n\t{\n\t\tlogger.trace(\"Requested to get user details\");\n\t\tUser user= service.getAnUserDetails(emailId);\n\t\tlogger.trace(\"Completed request to get user details\");\n\t\treturn ResponseEntity.ok(user);\n\t}", "String getEmail(int type);", "public User getUserByEmail(String email, String apikey) throws UserNotFoundException, APIKeyNotFoundException{\n if (authenticateApiKey(apikey)){\n return userMapper.getUserByEmail(email);\n }else throw new UserNotFoundException(\"User not found\");\n }", "public User retrieveUserByEmail(String email) throws ApplicationException;", "private UserFormData loadUserIdByEmail(final UserFormData formData) {\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"Searching userId with email : \" + formData.getEmail().getValue());\n\t\t}\n\t\tSQL.selectInto(SQLs.USER_SELECT_ID_ONLY + SQLs.USER_SELECT_FILTER_EMAIL + SQLs.USER_SELECT_INTO_ID_ONLY,\n\t\t\t\tformData);\n\t\treturn formData;\n\t}", "public java.lang.String getEmail () {\n\t\treturn email;\n\t}", "public static String getUserEmail ( final User user ) {\n if ( user == null ) {\n return null;\n }\n\n final Patient pat = Patient.getPatient( user.getUsername() );\n final Personnel per = Personnel.getByName( user.getUsername() );\n if ( null != pat ) {\n return pat.getEmail();\n }\n if ( null != per ) {\n return per.getEmail();\n }\n\n return null;\n }", "public java.lang.String getEmail() {\r\n return email;\r\n }", "public void setEmailID(String emailID) {\n\t\tthis.emailID = emailID;\n\t}", "public String getEmail()\n {\n return emailAddress;\n }", "public String getEmailAddress() {\r\n return email;\r\n }", "public String getEmail(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, EMAIL);\n\t}", "public String getEmail(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, EMAIL);\n\t}", "public String getEmail()\n\t{\n\t\treturn this._email;\n\t}", "public String getEmail()\r\n {\r\n return email;\r\n }", "public String getEmail() {return email; }", "public final String getEmail() {\n return email;\n }", "@Override\r\n\tpublic User getByMail(String eMail) {\n\r\n\t\treturn userDao.get(eMail);\r\n\t}", "public java.lang.String getEmail() {\n return email;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public static synchronized int getUserIDByEmail(String email){\n\t\t\n\t\t\tint user_ID = 0;\n\t\t\tConnection connection;\n\t\t \tPreparedStatement statement = null;\n\t\t\tString preparedSQL = \"Select User_ID From credential Where Email = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection = DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setString(1, email);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tuser_ID = rs.getInt(1);\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}\n\t\t catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t\tuser_ID=0;\n\t\t\t}\n\t\t\treturn user_ID;\n\t\t\t\n\t}", "@AutoEscape\n\tpublic String getEmail_address();", "public final String getEmail() {\n\t\treturn email;\n\t}", "public String getEmailAddress(){\r\n\t\treturn emailAddress;\r\n\t}", "public User getUserByEmail(String email);", "public User getUserByEmail(String email);", "public String getEmail(){\n\t\treturn email;\n\t}", "public String getEmail(){\n\t\treturn email;\n\t}", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }" ]
[ "0.7500701", "0.74200535", "0.72785515", "0.7204263", "0.7190986", "0.7132329", "0.69860476", "0.69860476", "0.69860476", "0.69860476", "0.69860476", "0.69860476", "0.6956613", "0.68270916", "0.68006253", "0.6778297", "0.6771778", "0.6701477", "0.66532654", "0.66532654", "0.6625377", "0.661019", "0.65925574", "0.65787596", "0.6574395", "0.65633166", "0.65492415", "0.6533725", "0.6516324", "0.65107644", "0.6489658", "0.6489658", "0.6489658", "0.6489658", "0.6489658", "0.6480694", "0.6438251", "0.6428342", "0.6419367", "0.64011526", "0.6400764", "0.63789487", "0.6374882", "0.63643354", "0.6356395", "0.6354995", "0.63470715", "0.63448495", "0.6340112", "0.6328609", "0.6317369", "0.62894523", "0.6286632", "0.628305", "0.62534577", "0.6244118", "0.6243345", "0.6219832", "0.6219832", "0.6219832", "0.6183791", "0.61618894", "0.6154994", "0.61528915", "0.6138582", "0.6137491", "0.6124118", "0.6123", "0.6115743", "0.6114359", "0.61054426", "0.61025995", "0.60998297", "0.6098814", "0.608581", "0.6074769", "0.6072544", "0.60703033", "0.60703033", "0.6059088", "0.60487616", "0.6048225", "0.6047584", "0.6045816", "0.60446995", "0.60446995", "0.60446995", "0.60446995", "0.60269326", "0.6025457", "0.60248893", "0.6024566", "0.6024307", "0.6024307", "0.6017013", "0.6017013", "0.60160124", "0.60160124", "0.60160124", "0.60160124" ]
0.8105681
0
Method.........................................getUserIDByEmail Author......................................................JLH This method retrieves the user ID based on the user's email address Return Value (int) user_ID: Returns the user's user_ID, an int automatically incremented in the database
public static synchronized int getUserIDByEmail(String email){ int user_ID = 0; Connection connection; PreparedStatement statement = null; String preparedSQL = "Select User_ID From credential Where Email = ?"; try{ connection = DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setString(1, email); ResultSet rs = statement.executeQuery(); while(rs.next()){ user_ID = rs.getInt(1); } rs.close(); statement.close(); connection.close(); } catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); user_ID=0; } return user_ID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int getUserId(String email) throws DatabaseException, DataNotFoundException {\n\t\tConnection con = DbUtil.getConnection();\n\t\tStudentRegistrationValidationDaoi studentRegistrationValidationDaoi=new StudentRegistrationValidationDaoimpl();\n\t\tint value=studentRegistrationValidationDaoi.getUserId(email, con);\n\t\tDbUtil.closeConnection(con);\n\t\treturn value;\n\t}", "@Override\n\tpublic Long getUserIdByEmail(final String email) {\n\t\tfinal UserFormData formData = new UserFormData();\n\t\tformData.getEmail().setValue(email.toLowerCase());\n\t\tthis.loadUserIdByEmail(formData);\n\t\treturn formData.getUserId().getValue();\n\t}", "public long getUserIdFromEmail(final String email) {\n LOG.info(\"Getting user id for email {}\", email);\n User user = userRepo.getUserByEmail(email);\n if (user == null) {\n LOG.info(\"No user found with email {}\", email);\n throw new ServiceException(\"No user found with email \" + email);\n }\n long userId = user.getId();\n LOG.info(\"Found id for email {}: {}\", email, userId);\n return userId;\n }", "@Override\r\n\tpublic int getIdByEmail(String email) {\n\t\treturn 0;\r\n\t}", "public long getEmailID(String email) {\n SQLiteDatabase db_read = ClientBaseOpenHelper.getHelper(mContext).getReadableDatabase();\n Cursor cursor = null;\n long emailID = 0;\n\n try {\n cursor = db_read.query(ClientBaseOpenHelper.TABLE_EMAILS, new String[]{BaseColumns._ID},\n ClientBaseOpenHelper.EMAIL + \"='\" + email + \"'\", null, null, null, null);\n while (cursor.moveToNext()) {\n emailID = cursor.getLong(cursor.getColumnIndex(BaseColumns._ID));\n }\n return emailID;\n\n } catch (Exception e) {\n Log.e(TAG, e.getMessage());\n return emailID;\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n if (db_read != null && db_read.isOpen()) {\n db_read.close();\n }\n if (ClientBaseOpenHelper.getHelper(mContext) != null) {\n ClientBaseOpenHelper.getHelper(mContext).close();\n }\n }\n }", "@Override\n public User getUserById(String email) throws UserException {\n User user;\n\n if (email == null || email.equals(\"\")) {\n logger.error(\"invalid user id: \" + email);\n return null;\n }\n try {\n user = userDAO.getUserById(email);\n\n if (user == null) {\n throw new UserException(\"cannot find user to update with id: \" + email);\n }\n\n logger.info(\"created a new user successfully: \" + user.toString());\n return user;\n } catch (UserException e) {\n e.printStackTrace();\n logger.error(e.getMessage());\n return null;\n }\n }", "private int getOwnerId(String email) {\n\t\tint ownerId=-1;\n\t\tResultSet rs=null;\n\t\tString query1=\"select ownerId from ApartmentOwner where oEmail=?\";\n\t\tPreparedStatement pstmt;\n\t\ttry {\n\t\t\tpstmt = dataSource.getConnection().prepareStatement(query1);\n\t\t\tpstmt.setString(1, email);\n\t\t\trs = pstmt.executeQuery();\n\t\t\trs.next();\n\t\t\townerId=rs.getInt(1);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn ownerId;\n\t}", "Integer getUserId();", "public int getContactIdByEmail(String email) {\r\n\t\tHttpGet request = new HttpGet(QueryId(email));\r\n credential(request);\r\n try {\r\n \tString jsonResponse = connectionHttp.ConnectionResponse(request); \t \r\n \t\tObjectMapper om = new ObjectMapper();\r\n \t\tJsonNode nodes = om.readTree(jsonResponse).get(PropertiesReader.stringElements());\r\n \t\treturn nodes.get(0).get(\"id\").asInt();\r\n }catch (ClientProtocolException e) {\r\n \treturn 0;\r\n }catch (IOException e) {\r\n \treturn 0;\r\n\t\t}catch (NullPointerException e) {\r\n \treturn 0;\r\n\t\t}\r\n\t}", "@Override\n public String getUserId() {\n return email;\n }", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "public int getUserId(User user) throws Exception;", "long getUserId();", "long getUserId();", "@Override\n\tpublic UserVO getUserIdToEmail(String email, String pw) {\n\t\treturn mapper.getUserIdToEmail(email, pw);\n\t}", "public int getCustomerIdFromEmail(String email) {\n return database.getCustomerIdFromEmail(email);\n }", "private UserFormData loadUserIdByEmail(final UserFormData formData) {\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"Searching userId with email : \" + formData.getEmail().getValue());\n\t\t}\n\t\tSQL.selectInto(SQLs.USER_SELECT_ID_ONLY + SQLs.USER_SELECT_FILTER_EMAIL + SQLs.USER_SELECT_INTO_ID_ONLY,\n\t\t\t\tformData);\n\t\treturn formData;\n\t}", "public User get(String emailID);", "String getUserMainEmail( int nUserId );", "public User getUser(String emailId);", "public String getEmailId()\r\n {\r\n return emailId;\r\n }", "public User getUserByEmail(String email)throws EntityNotFoundException\n\t{\n\t\treturn userDao.getById(email);\n\t}", "public long getUserId();", "public long getUserId();", "public long getUserId();", "public long getUserId();", "public long addEmail(String email, long clientID) {\n SQLiteDatabase db_write = ClientBaseOpenHelper.getHelper(mContext).getWritableDatabase();\n long emailID = 0;\n\n try {\n ContentValues cv = new ContentValues();\n cv.put(ClientBaseOpenHelper.ID_CLIENT_EMAIL, clientID);\n cv.put(ClientBaseOpenHelper.EMAIL, email);\n if (cv != null) {\n emailID = db_write.insert(ClientBaseOpenHelper.TABLE_EMAILS, ClientBaseOpenHelper.EMAIL, cv);\n }\n return emailID;\n\n } catch (SQLiteConstraintException e) {\n Log.e(TAG, e.getMessage());\n return emailID;\n\n } finally {\n if (db_write != null && db_write.isOpen()) {\n db_write.close();\n }\n if (ClientBaseOpenHelper.getHelper(mContext) != null) {\n ClientBaseOpenHelper.getHelper(mContext).close();\n }\n }\n }", "public int getUserID()\n {\n return this.userID;\n }", "public Integer getUser_id() {\n\t\treturn user_id;\n\t}", "java.lang.String getUserID();", "java.lang.String getUserID();", "java.lang.String getUserID();", "public int getUser1Y_ID();", "Long getUserId();", "java.lang.String getUserId();", "java.lang.String getUserId();", "java.lang.String getUserId();", "public int getUserID() {\n return userID;\n }", "public int getUserID() {\n return userID;\n }", "public int getUserID() {\n return userID;\n }", "public int getUser1X_ID();", "public int getUserID()\n {\n return userID;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUser1_ID();", "public int getUser1_ID();", "public static int userLogIn() {\n\t\tint userID = 0;\n\t\t\n\t\tSystem.out.println(\"User Email:\");\n\t\tString email = UserInput.stringInput(30);\n\t\ttry(Connection conn = DatabaseConnect.getConnection()) {\n\t\t\tString query = \"SELECT password, id FROM bank_users WHERE ? = email\"; //RETURNING password, id\";\n\t\t\tPreparedStatement statement = conn.prepareStatement(query);\n\t\t\t\n\t\t\tstatement.setString(1, email);\n\t\t\t\n\t\t\tResultSet resultSet = statement.executeQuery();\n//\t\t\tSystem.out.println(resultSet);\n\t\t\t\n\t\t\tif(resultSet.next()) {\n\t\t\t\tSystem.out.println(\"Please enter your password:\");\n\t\t\t\tString guess = UserInput.stringInput(30);\n\t\t\t\tif(guess.equals(resultSet.getString(\"password\"))) {\n//\t\t\t\t\tSystem.out.println(\"Welcome!\");\n\t\t\t\t\treturn resultSet.getInt(\"id\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Password Incorrect\");\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"User not found\");\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn userID;\n\t}", "public Integer getUserID() {\n return userID;\n }", "public User getByemailId(String emailId) {\n\t\treturn userDao.getByemailId(emailId);\n\t}", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "@Override\r\n\tpublic int emailcheck(String email) {\n\t\treturn dao.idcheck(email);\r\n\t}", "String getUserId();", "String getUserId();" ]
[ "0.7988896", "0.7771306", "0.73615366", "0.72230345", "0.7127544", "0.69308984", "0.6888359", "0.6869006", "0.68372214", "0.6819178", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6786306", "0.6782481", "0.6744548", "0.6744548", "0.6712519", "0.6668248", "0.6620262", "0.65612537", "0.65600914", "0.6554623", "0.6526644", "0.65241426", "0.65196157", "0.65196157", "0.65196157", "0.65196157", "0.65176105", "0.6513512", "0.6506504", "0.65017146", "0.65017146", "0.65017146", "0.6501254", "0.64991397", "0.64813626", "0.64813626", "0.64813626", "0.6478901", "0.6478901", "0.6478901", "0.6478048", "0.6467808", "0.6455854", "0.6455854", "0.6455854", "0.6455854", "0.6455854", "0.6455854", "0.6455854", "0.6455854", "0.6455854", "0.6455854", "0.6455854", "0.6455854", "0.6455854", "0.6455854", "0.6455854", "0.6455318", "0.6455318", "0.6455306", "0.6455306", "0.6436364", "0.6410354", "0.63974345", "0.63941896", "0.63941896", "0.6393281", "0.6393281", "0.6393281", "0.6393281", "0.6393281", "0.6393281", "0.6393281", "0.6393281", "0.6393281", "0.6393281", "0.6393281", "0.6393281", "0.6393281", "0.6393281", "0.6393281", "0.6357915", "0.63569736", "0.63569736" ]
0.8038015
0
Method...................................getCredentialByUser_ID Author......................................................JLH This method retrieves the Credential Bean based on the userID Return Value (Credentials) credentials: Returns a credentials bean of the user based on the userID, an int automatically incremented in the database
public static synchronized Credentials getCedentialByUser_ID(int userID){ Connection connection; Credentials cred = null; PreparedStatement statement = null; String preparedSQL = "Select * From credential Where User_ID = ?"; try{ connection = DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setInt(1,userID); ResultSet rs = statement.executeQuery(); while(rs.next()){ cred = new Credentials(); cred.setCredID(rs.getInt(1)); cred.setUserID(rs.getInt(2)); cred.setEmail(rs.getString(3)); cred.setPass(rs.getString(4)); cred.setRole(rs.getString(5)); cred.setValid(rs.getInt(6)); cred.setRegKey(rs.getString(7)); } rs.close(); statement.close(); connection.close(); } catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } return cred; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static synchronized Credentials getCredentialByUserIDKey(int userID, String key){\n\t\t\tConnection connection;\n\t\t\tCredentials cred = null;\n\t\t \tPreparedStatement statement = null;\n\t\t\tString preparedSQL = \"Select * From credential Where User_ID = ? And RegKey =?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection = DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setInt(1,userID);\n\t\t \tstatement.setString(2,key);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tcred = new Credentials();\n\t\t\t\t\tcred.setCredID(rs.getInt(1));\n\t\t\t\t\tcred.setEmail(rs.getString(2));\n\t\t\t\t\tcred.setPass(rs.getString(3));\n\t\t\t\t\tcred.setUserID(rs.getInt(4));\n\t\t\t\t\tcred.setRole(rs.getString(5));\n\t\t\t\t\tcred.setValid(rs.getInt(6));\n\t\t\t\t\tcred.setRegKey(rs.getString(7));\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}\n\t\t catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn cred;\n\t}", "public List<Credential> getCredentials(Integer userId){\n\n List<Credential> allCredentials = credentialMapper.getAllCredentials(userId);\n\n// for(Credential credential : allCredentials){\n// credential.setPassword(encryptionService.decryptValue(credential.getPassword(),salt));\n// }\n\n return allCredentials;\n }", "public static synchronized int getCred_IDByBean(Credentials cred){\n\t\t\tint cred_ID=0;\n\t\t\tConnection connection;\n\t\t \tPreparedStatement statement = null;\n\t\t\tString preparedSQL = \"Select Credentials_ID From credential Where Email = ? \" +\n\t\t\t\t\t\"And Pass= ? And Role= ? And Validated= ? And RegKey= ?\";\n\t\t\ttry{\n\t\t \tconnection = DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setString(1, cred.getEmail());\n\t\t\t\tstatement.setString(2, cred.getPass());\n\t\t\t\tstatement.setString(3, cred.getRole());\n\t\t\t\tstatement.setInt(4, cred.getValid());\n\t\t\t\tstatement.setString(5, cred.getRegKey());\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tcred_ID = rs.getInt(1);\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}\n\t\t catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn cred_ID;\n\t\t\t\n\t}", "public CredentialsModel find(int id) {\n Statement stmt = null;\n Connection connection = null;\n try {\n try {\n connection = ds.getConnection();\n try {\n stmt = connection.createStatement();\n ResultSet result = stmt\n .executeQuery(\"SELECT * FROM Credentials \"\n + \"where EmpNum = '\" + id + \"'\");\n if (result.next()) {\n CredentialsModel cred = new CredentialsModel();\n cred.setPassword(result.getString(\"EmpPassword\"));\n cred.setUserName(result.getString(\"EmpUsername\"));\n return cred;\n } else {\n return null;\n }\n } finally {\n if (stmt != null) {\n stmt.close();\n }\n\n }\n } finally {\n if (connection != null) {\n connection.close();\n }\n }\n } catch (SQLException ex) {\n System.out.println(\"Error in find \" + id);\n ex.printStackTrace();\n return null;\n }\n }", "public static synchronized Credentials authenticate(String userName, String password){\n\t\t\tConnection connection;\n\t\t \tCredentials credentials=null;\n\t\t \t\n\t\t \tPreparedStatement statement=null;\n\t\t\tString preparedSQL = \"SELECT * FROM Credential WHERE Email = ? and Pass = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection=DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setString(1, userName);\n\t\t \tstatement.setString(2, password);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\tif(rs.next()){\n\t\t\t\t\tcredentials = new Credentials();\n\t\t\t\t\tcredentials.setCredID(rs.getInt(1));\n\t\t\t\t\tcredentials.setUserID(rs.getInt(2));\n\t\t\t\t\tcredentials.setEmail(rs.getString(3));\n\t\t\t\t\tcredentials.setPass(rs.getString(4));\n\t\t\t\t\tcredentials.setRole(rs.getString(5));\n\t\t\t\t\tcredentials.setValid(rs.getInt(6));\n\t\t\t\t\tcredentials.setRegKey(rs.getString(7));\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}catch (SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t\t\tcredentials = null;\n\t\t\t\t}\t\n\t\t\treturn credentials;\n\t}", "public int getID(String username, String password) throws SQLException{\n int userID = 0;\n //Establish connection\n Connection conn = DriverManager.getConnection(url, user, pass);\n Statement statement = conn.createStatement();\n \n //Perform query\n ResultSet set = statement.executeQuery(\"Select userId FROM user WHERE userName = '\" + username + \"'\" + \" AND \"\n + \"password = '\" + password + \"'\");\n ResultSetMetaData meta = set.getMetaData();\n int columns = meta.getColumnCount();\n \n //Set value of userID\n while(set.next()){\n for(int i = 1; i <= columns; i++){\n userID = set.getInt(i);\n return userID;\n }\n }\n \n //Close connection \n conn.close();\n return userID;\n }", "public String getCredentialsId() {\n return settings.CredentialsId;\n }", "public java.lang.String getCredentialId() {\r\n return credentialId;\r\n }", "public int getUserID() {\n return userID;\n }", "public int getUserID() {\n return userID;\n }", "public int getUserID() {\n return userID;\n }", "public int getUserID()\n {\n return userID;\n }", "public Integer getUserID() {\n return userID;\n }", "@Override\n @SuppressWarnings(\"unchecked\")\n public String getPassword(int userID) throws DAOException{\n \n try{\n Session session = HibernateConnectionUtil.getSession();\n \n Criteria crit = session.createCriteria(UserPassword.class);\n //UserProfile user = getUserProfile(userID);\n crit.add(Restrictions.eq(\"user.ID\", userID));\n List<UserPassword> passList = crit.list();\n \n if (passList.isEmpty()){\n session.close();\n throw new DAOException( \n \"getPassword: No password for account with ID \" + userID);\n } \n \n UserPassword uPass = passList.get(0);\n session.evict(uPass);\n session.close();\n return uPass.getPass();\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n }", "@Override\n public void updateCredential(String userID, Object newCredential) throws IdentityStoreException {\n try (UnitOfWork unitOfWork = UnitOfWork.beginTransaction(dataSource.getConnection())) {\n\n NamedPreparedStatement updateCredentialPreparedStatement = new NamedPreparedStatement(\n unitOfWork.getConnection(),\n sqlStatements.get(ConnectorConstants.QueryTypes.SQL_QUERY_UPDATE_CREDENTIAL));\n updateCredentialPreparedStatement.setString(\"user_id\", userID);\n updateCredentialPreparedStatement.setString(\"credential\", (String) newCredential);\n int rowCount = updateCredentialPreparedStatement.getPreparedStatement().executeUpdate();\n\n if (rowCount < 1) {\n throw new IdentityStoreException(\"No credentials updated.\");\n }\n } catch (SQLException e) {\n throw new IdentityStoreException(\"Error occurred while updating credentials.\", e);\n }\n }", "public Person authenticateAndGetUser(String numCc, String password) throws RemoteException;", "public int getUserID()\n {\n return this.userID;\n }", "public static synchronized void addUserID(int user_ID, int cred_ID){\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"Update credential Set User_ID = ? Where Credentials_ID = ?\";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\t\t\n\t\t\t\tstatement.setInt(1, user_ID);\n\t\t\t\tstatement.setInt(2, cred_ID);\n\t\t\t\tstatement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t}", "public List<User> getUserDetails(int userid) {\r\n List<User> userList = new LinkedList<>();\r\n User theUser = null;\r\n List<UserCredsTbl> existing = crud.findByPrimaryKey(userid, \"FROM UserCredsTbl where roleId =:pk\");\r\n if (existing.size() > 0) {\r\n for (Object userObject : existing) {\r\n UserCredsTbl userProf = (UserCredsTbl) userObject ;\r\n theUser = new User(\r\n userProf.getUserId(),\r\n new Role(userProf.getRoleProfileTable().getBankId(), userProf.getRoleProfileTable().getDelFlg(), userProf.getRoleProfileTable().getEntityCreFlg(), userProf.getRoleProfileTable().getLchgTime(),\r\n userProf.getRoleProfileTable().getLchgUserId(), userProf.getRoleProfileTable().getRcreTime(), userProf.getRoleProfileTable().getRcreUserId(), userProf.getRoleProfileTable().getRoleDesc()), userProf.getAcctExpyDate(), userProf.getAcctInactiveDays(),\r\n userProf.getDisabledFromDate(), userProf.getDisabledUptoDate(), userProf.getRoleProfileTable().getBankId(), userProf.getLastAccessTime(),\r\n userProf.getUserId(), userProf.getNewUserFlg(), userProf.getNumPwdAttempts(), userProf.getNumPwdHistory(), userProf.getPwExpyDate(),\r\n userProf.getPwdHistory(), userProf.getRoleProfileTable().getRoleId(), userProf.getUserName(), userProf.getUserPw()\r\n );\r\n \r\n userList.add(theUser);\r\n\r\n }\r\n }\r\n return userList;\r\n\r\n }", "public String getCredentialId() {\n return this.CredentialId;\n }", "public List<UserCredential> getAllCredentials() {\n\t\t List<UserCredential> userCredentials = new ArrayList<>();\n\t\t \n\t\t credentialRepo.findAll().forEach(userCredential -> userCredentials.add(userCredential));\n\t\t \n\t\treturn userCredentials;\n\t}", "private GoogleCredential getCredentialFromCredentialCache(final String userId) throws IOException{\n\t\tGoogleCredential credential = (GoogleCredential)cache.get(userId);\n\t\tif (credential != null){\n\t\t\tM_log.debug(\"Fetching credential from cache for user: \" + userId);\n\t\t\treturn credential;\n\t\t}\n\t\telse{ // Need to create credential and create access token.\n\t\t\tcredential = SakaiGoogleAuthServiceImpl.authorize(userId, SERVICE_ACCOUNT_EMAIL, PRIVATE_KEY, CalendarScopes.CALENDAR);\n\t\t\tif (credential != null){\n\t\t\t\tcredential.refreshToken(); // Populates credential with access token\n\t\t\t\taddCredentialToCache(userId, credential);\n\t\t\t}\n\t\t\treturn credential;\n\t\t}\n\t}", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "protected long getUserID() {\n return userID;\n }", "@Override\n public boolean verifyCredentials(int userId, String password){\n logger.info(\"Verifying Credentials...\");\n try{\n return userDaoInterface.verifyCredentials(userId,password);\n }catch (UserNotFoundException ex){\n System.out.println(ConsoleColors.RED+ex.getMessage()+ConsoleColors.RESET);\n return false;\n }\n\n// return DummyDB.userList.containsKey(userId) && DummyDB.userList.get(userId).getPassword().equals(password);\n }", "Integer getUserId();", "public Long getUserid() {\r\n return userid;\r\n }", "@Override\n public User login(int userID) {\n return new DataClass().getUserByID(userID);\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public Object credentials() {\n return cred;\n }", "private GoogleCredential getGoogleCredential(String userId) {\t\t\n\t\t\n\t\ttry { \n\t\t\t// get the service account e-mail address and service account private key from property file\n\t\t\t// this email account and key file are specific for your environment\n\t\t\tif (SERVICE_ACCOUNT_EMAIL == null) {\n\t\t\t\tSERVICE_ACCOUNT_EMAIL = m_serverConfigurationService.getString(\"google.service.account.email\", \"\");\n\t\t\t}\n\t\t\tif (PRIVATE_KEY == null) {\n\t\t\t\tPRIVATE_KEY = m_serverConfigurationService.getString(\"google.private.key\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\tGoogleCredential credential = getCredentialFromCredentialCache(userId);\n\t\t\treturn credential;\n\n\t\t} catch (Exception e) {\n\t\t\t// return null if an exception occurs while communicating with Google.\n\t\t\tM_log.error(\"Error creating a GoogleCredential object or requesting access token: \" + userId + \" \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "long getUserId();", "long getUserId();", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public String getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "@Override\n public String getUserID() {\n return user_id;\n }", "public Integer getUserid() {\r\n\t\treturn userid;\r\n\t}" ]
[ "0.68828785", "0.6497909", "0.6444023", "0.5986006", "0.58988065", "0.58961403", "0.5724921", "0.56556267", "0.56522596", "0.56522596", "0.56522596", "0.56471723", "0.5612498", "0.5610937", "0.5610084", "0.5594052", "0.55877835", "0.5559539", "0.55480915", "0.5545009", "0.5536948", "0.55240303", "0.5519784", "0.5519784", "0.5519784", "0.5519784", "0.5519784", "0.5519784", "0.5519784", "0.5519784", "0.5519784", "0.5519784", "0.5519784", "0.5519784", "0.5519784", "0.5519784", "0.5519784", "0.55197656", "0.55197656", "0.5517457", "0.5512171", "0.5496271", "0.5495655", "0.5486687", "0.54764134", "0.54764134", "0.54764134", "0.54764134", "0.54764134", "0.54764134", "0.54764134", "0.54764134", "0.54764134", "0.54764134", "0.54764134", "0.54764134", "0.54106003", "0.54106003", "0.54096836", "0.54096836", "0.54096836", "0.54096836", "0.54096836", "0.54096836", "0.54096836", "0.54096836", "0.54096836", "0.54096836", "0.54096836", "0.54096836", "0.54096836", "0.54096836", "0.54096836", "0.5407546", "0.53740436", "0.5358988", "0.5358988", "0.534522", "0.534522", "0.534522", "0.5338107", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.53344166", "0.5330588", "0.533032" ]
0.7800586
0
Method..................................................addCred Author......................................................JLH This method creates a new entry in the credential database table Return Value (int) status: Returns an int that indicates the success or failure of the insert command
public static synchronized int addCred(Credentials cred){ int status=0; Connection connection; String preparedSQL = "INSERT INTO credential (Email, Pass, User_ID, Role, " + "Validated, RegKey) VALUES(?,?,?,?,?,?) "; PreparedStatement statement=null; try{ connection=DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setString(1, cred.getEmail()); statement.setString(2, cred.getPass()); statement.setInt(3, cred.getUserID()); statement.setString(4, cred.getRole()); statement.setInt(5, cred.getValid()); statement.setString(6, cred.getRegKey()); status = statement.executeUpdate(); statement.close(); connection.close(); }catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } return status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean addAccount() {\r\n String update = \"INSERT INTO LOGIN VALUES('\" + this.username + \"', '\" + new MD5().md5(this.password) + \"', '\" + this.codeID + \"', N'\" + this.fullname + \"')\";\r\n return model.ConnectToSql.update(update);\r\n }", "public void addUserCredentials(String login, String password) throws SQLException;", "public void addUser(){\r\n //gets entered username and password\r\n String user = signup.getUsername();\r\n String pass = signup.getFirstPassword();\r\n try{\r\n \r\n //connects to database\r\n \r\n //creates statement\r\n Connection myConn = DriverManager.getConnection(Main.URL);\r\n //adds username and password into database\r\n PreparedStatement myStmt = myConn.prepareStatement(\"insert into LISTOFUSERS(USERNAME, PASSWORD)values(?,?)\");\r\n myStmt.setString(1,user);\r\n myStmt.setString(2,pass);\r\n int a = myStmt.executeUpdate();\r\n \r\n if(a>0){\r\n System.out.println(\"Row Update\");\r\n }\r\n myConn.close();\r\n } catch (Exception e){\r\n System.err.println(e.getMessage());\r\n }\r\n }", "com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();", "public static synchronized void addUserID(int user_ID, int cred_ID){\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"Update credential Set User_ID = ? Where Credentials_ID = ?\";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\t\t\n\t\t\t\tstatement.setInt(1, user_ID);\n\t\t\t\tstatement.setInt(2, cred_ID);\n\t\t\t\tstatement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t}", "@Override\r\n\tpublic void addCredential(String role) {\n\r\n\t}", "public void createAccount(String acctId, String pass, String cardNo, String email) {\n accountId = acctId;\n password = pass;\n cardNumber = cardNo;\n customerEmail = email;\n \n try {\n //conect to database\n Class.forName(\"com.mysql.jdbc.Driver\");\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/make_order_request\", \"root\", \"admin\");\n Statement mystmt = con.createStatement();\n\n //write SQL query to update code in database\n String query = \"INSERT INTO customer_account(account_id, password, card_no, customer_email) VALUES (?,?,?,?)\";\n PreparedStatement ps = con.prepareStatement(query);\n ps.setString(1, accountId);\n ps.setString(2, password);\n ps.setInt(3, Integer.parseInt(cardNumber));\n ps.setString(4, customerEmail);\n\n ps.executeUpdate();\n\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n \n }\n\n }", "int insert(PasswdDo record);", "@Test\n @Order(0)\n public void addCredential() throws InterruptedException {\n int initialCredentialsCount = home.getCredentialItems().size();\n\n home.openAddCredentialModal();\n Thread.sleep(500);\n\n home.setCredential(\"http://localhost:8080\", \"uche\", \"1234568\");\n\n moveToCredentialsTab();\n assertEquals(home.getCredentialItems().size(), initialCredentialsCount + 1);\n\n initialCredentialsCount = home.getCredentialItems().size();\n\n home.openAddCredentialModal();\n Thread.sleep(500);\n\n home.setCredential(\"http://localhost:8080\", \"praise\", \"1dsaAA2\");\n\n moveToCredentialsTab();\n assertEquals(home.getCredentialItems().size(), initialCredentialsCount + 1);\n\n home.logout();\n }", "public void persist(CredentialsModel credential) {\n Connection connection = null;\n PreparedStatement stmt = null;\n try {\n try {\n connection = ds.getConnection();\n try {\n stmt = connection.prepareStatement(\n \"INSERT INTO Credentials VALUES (?, ?, ?)\");\n stmt.setInt(1, credential.getEmployee().getEmpNumber());\n stmt.setString(2, credential.getUserName());\n stmt.setString(3, credential.getPassword());\n stmt.executeUpdate();\n } finally {\n if (stmt != null) {\n stmt.close();\n }\n }\n } finally {\n if (connection != null) {\n connection.close();\n }\n }\n } catch (SQLException ex) {\n System.out.println(\"Error in persist \" + credential);\n ex.printStackTrace();\n }\n }", "private void addToDB(String CAlias, String CPwd, String CFirstName,\n String CLastName, String CStreet, String CZipCode, String CCity,\n String CEmail)\n {\n con.driverMysql();\n con.dbConnect();\n \n try \n {\n sqlStatement=con.getDbConnection().createStatement();\n sqlString=\"INSERT INTO customer (CAlias, CFirstName, CLastName, CPwd, \"\n + \"CStreetHNr, CZipCode, CCity, CEmail, CAccessLevel)\"\n + \" VALUES\"\n + \"('\" + CAlias + \"', '\" + CFirstName + \"', '\" + CLastName\n + \"', '\" + CPwd + \"', '\" + CStreet + \"', '\" \n + CZipCode + \"', '\" + CCity + \"', '\" + CEmail + \"', 1);\";\n \n sqlStatement.executeUpdate(sqlString);\n sqlString=null;\n con.getDbConnection().close();\n } \n catch (Exception ex) \n {\n error=ex.toString();\n }\n }", "private boolean createCredentials() {\r\n dbLogin = new SetUpUI();\r\n dbLogin.setVisible(true);\r\n actionListener = new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getSource() == dbLogin.getDoneBtn()) {\r\n FileOutputStream FOS = null;\r\n try {\r\n /**\r\n * I take the values fromthe text file and I insert it\r\n * into a text file create a file with specified details\r\n */\r\n File fout = new File(\"credentials.txt\");\r\n FOS = new FileOutputStream(fout);\r\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(FOS)); \r\n String userDetails = dbLogin.username().getText() + \":\" + dbLogin.password().getText();\r\n String dbPass = dbLogin.mysqlPassword().getText();\r\n if(dbLogin.mysqlPassword().getText().isEmpty()){ \r\n dbPass = \"e\";\r\n }\r\n String mysqlDetails = dbLogin.mysqlUsername().getText() + \":\" + dbPass; \r\n bw.write(userDetails);\r\n bw.newLine();\r\n bw.write(mysqlDetails);\r\n bw.close();\r\n JOptionPane.showMessageDialog(dbLogin, \"Succesfully Created Details Please Restart The Program\"); \r\n dbLogin.dispose();\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(SetUp.class.getName()).log(Level.SEVERE, null, ex);\r\n JOptionPane.showMessageDialog(dbLogin, \"Failed to create SetUp Details\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(SetUp.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Registering the components\r\n */\r\n dbLogin.getDoneBtn().addActionListener(actionListener);\r\n return state;\r\n }", "public synchronized static boolean addUser(Utente utente) throws SQLException{\r\n\r\n\t\t//istanzio la connessione\r\n\t\tConnection conn= null;\r\n\t\tPreparedStatement ps= null;\r\n\r\n\t\ttry{\r\n\r\n\t\t\tconn= Database.getConnection();\r\n\r\n\t\t\tps= conn.prepareStatement(queryAddUtente);\r\n\r\n\t\t\tps.setString(1, utente.getMail());\r\n\t\t\tps.setString(2, utente.getNome());\r\n\t\t\tps.setString(3, utente.getCognome());\r\n\t\t\tps.setString(4, utente.getIndirizzo());\r\n\t\t\tps.setString(5, utente.getPassword());\r\n\t\t\tps.setString(6, utente.getDomanda_sicurezza());\r\n\t\t\tps.setString(7, utente.getRisposta_sicurezza());\r\n\r\n\t\t\t//Istruzione che permette l'esecuzione della query\r\n\t\t\tps.executeUpdate();\r\n\r\n\t\t\t//Effettuo il commit della connessione\r\n\t\t\tconn.commit();\r\n\r\n\t\t\t//Creo adesso il carrello del nuovo utente che è stato creato\r\n\t\t\taggiungi_carrello(utente.getMail());\r\n\r\n\r\n\t\t\tSystem.out.println(\"Effettuo la connessione....\");\r\n\r\n\t\t\tps.close();\r\n\r\n\t\t}catch(SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void addAccount(String user, String password);", "public void addCredential(Credentials credential) {\n this.credentials.add(credential);\n }", "int insert(PasswordCard record);", "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}", "public boolean addUser(String username, String password) throws SQLException {\n\t\tString querystring = \"INSERT INTO user(username, password) \" + \"VALUES(?,?)\";\n\t\tPreparedStatement preparedStmt = conn.prepareStatement(querystring);\n\t\tpreparedStmt.setString(1, username);\n\t\tpreparedStmt.setString(2, password);\n\t\tint count = preparedStmt.executeUpdate();\n\t\tif (count > 0) {\n System.out.println(\"True\");\n\t\t\treturn true;\n\t\t}\n\t\telse {\n System.out.println(\"False\");\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic User add(String name, String pwd, String phone) {\n\t\tSystem.out.println(\"OracleDao is add\");\n\t\treturn null;\n\t}", "public void addData(String User, String password) throws SQLException\n {\n }", "@Override\n public void createOnlineAccount(String name, \n String ssn, String id, String psw)\n {\n final String url = \n \"jdbc:mysql://mis-sql.uhcl.edu/<username>?useSSL=false\";\n \n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n \n try\n {\n \n //connect to the databse\n connection = DriverManager.getConnection(url, \n db_id, db_password);\n connection.setAutoCommit(false);\n //crate the statement\n statement = connection.createStatement();\n \n //do a query\n resultSet = statement.executeQuery(\"Select * from onlineAccount \"\n + \"where id = '\" + id + \"' or ssn = '\"\n + ssn + \"'\");\n \n if(resultSet.next())\n {\n //either the ssn is used or the id is used\n System.out.println(\"Account creation failed\");\n }\n else\n {\n //insert a record into onlineAccount\n int r = statement.executeUpdate(\"insert into onlineAccount values\"\n + \"('\" + name + \"', '\" + id + \"', '\" + ssn + \"', '\"\n + psw +\"')\");\n System.out.println(\"Account creation successful!\");\n System.out.println();\n }\n connection.commit();\n connection.setAutoCommit(true);\n \n }\n catch (SQLException e)\n {\n System.out.println(\"Something wrong during the creation process!\");\n e.printStackTrace();\n }\n finally\n {\n //close the database\n try\n {\n resultSet.close();\n statement.close();\n connection.close();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n }", "public static boolean addUser(UserDetailspojo user) throws SQLException {\n Connection conn=DBConnection.getConnection();\n String qry=\"insert into users1 values(?,?,?,?,?)\";\n System.out.println(user);\n PreparedStatement ps=conn.prepareStatement(qry);\n ps.setString(1,user.getUserid());\n ps.setString(4,user.getPassword());\n ps.setString(5,user.getUserType());\n ps.setString(3,user.getEmpid());\n ps.setString(2,user.getUserName());\n //ResultSet rs=ps.executeQuery();\n int rs=ps.executeUpdate();\n return rs==1;\n //String username=null;\n }", "int insert(UserPasswordDO record);", "@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"Injection to database : Oracle\");\n\t}", "public int insertNewUser(String uname,String pswd,String role){\n\t\tif(this.connHndlr == null)\n\t\t\tthis.connHndlr = new ConnectionHandler();\n\t\tConnection conn = this.connHndlr.getConn();\n\t\tint returnvalue = 0;\n\t\t\n\t\tuname = uname.toLowerCase();\t\t\n\t\ttry{\n\t\t\tString vfnQuery = \"select * from LoginDetails l where l.username = '\" + uname + \"'\";\n\t\t\tthis.stmt = conn.createStatement();\n\t\t\tthis.resultSet = this.stmt.executeQuery(vfnQuery);\n\t\t\tif(!this.resultSet.next()){\n\t\t\t\tString insQuery = \"insert into LoginDetails(username,password,user_role) values(?,?,?)\";\n\t\t\t\tthis.preparedStatement = conn.prepareStatement(insQuery);\n\t\t\t\tthis.preparedStatement.setString(1,uname);\n\t\t\t\tthis.preparedStatement.setString(2,pswd);\n\t\t\t\tthis.preparedStatement.setString(3,role);\n\t\t\t\tthis.preparedStatement.executeUpdate();\n\t\t\t\treturnvalue = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturnvalue = 0;\n\t\t\t}\t\t\t\n\t\t}\n\t\tcatch(SQLException se){\n\t\t\tSystem.out.println(\"SQL Exception \" + se.getMessage());\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Exception \" + e.getMessage());\n\t\t}\n\t\treturn returnvalue;\n\t}", "public boolean addData(String name, String email, String accountno, String credits){\n SQLiteDatabase db= this.getWritableDatabase();\n ContentValues contentValues= new ContentValues();\n contentValues.put(COL1,name);\n contentValues.put(COL2,email);\n contentValues.put(COL3,accountno);\n contentValues.put(COL4,credits);\n long result;\n result = db.insert(TABLE_NAME,null,contentValues);\n\n if (result==-1){\n return false;\n } else {\n return true;\n }\n }", "int insert(SysAuthentication record);", "public boolean createUser(Connection con, String userid, String password, int access_code)\n throws SQLException, NoSuchAlgorithmException, UnsupportedEncodingException\n {\n PreparedStatement ps = null;\n try {\n if (userid != null && password != null && userid.length() <= 20){\n // Uses a secure Random not a simple Random\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\");\n // Salt generation 64 bits long\n byte[] bExtra = new byte[8];\n random.nextBytes(bExtra);\n // Digest computation\n byte[] bDigest = getHash(ITERATION_NUMBER,password,bExtra);\n String sDigest = byteToBase64(bDigest);\n String sSalt = byteToBase64(bExtra);\n\n ps = con.prepareStatement(\"insert into login (User_ID, password, access_code, extra) VALUES (?,?,?,?)\");\n ps.setString(1,userid);\n ps.setString(2,sDigest);\n ps.setInt(3,access_code);\n ps.setString(4, sSalt);\n ps.executeUpdate();\n return true;\n } else {\n return false;\n }\n } finally {\n close(ps);\n }\n }", "protected boolean registerInfo(String username, String secretcode) {\n\t\tboolean isSuccess = true;\n\t\tString sql = \"update Google_Auth set secretcode = ?, username = ? where rowid = 1\";\n\t\tresettable();\n\t\ttry {\n\t\t\tSystem.out.println(sql);\n\t\t\tstmt = conn.prepareStatement(sql);\n\t\t\tstmt.setString(1, aria.Encrypt(secretcode));\n\t\t\tstmt.setString(2, username);\n\t\t\tstmt.executeUpdate();\n\t\t}catch(SQLException e) {\n\t\t\tSystem.err.println(\"Error : Can't update otp info\\n\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tisSuccess = false;\n\t\t}\n\t\treturn isSuccess;\n }", "public boolean create_user(String login_id, String first_name, String middle_name, String last_name, String password, String branch, String rollno, String gender, String mobileno, String house,String date_of_birth, String home_town, String about, String hostel, String education, String security_q, String security_a)\r\n {\r\n DBConnect db = new DBConnect();\r\n try{\r\n String SQL = \"insert into user2(login_id, first_name,middle_name,last_name,password,branch,rollno,gender,mobileno,house,date_of_birth,home_town,about,hostel,education) values ('\" + login_id + \"', '\" + first_name + \"','\" \r\n + middle_name + \"','\" + last_name + \"','\" + password + \"','\" + branch + \"','\" + rollno + \"','\" + gender + \"','\" + mobileno + \"','\" + house + \"','\" + date_of_birth + \"','\" + home_town + \"','\" + about + \"','\" + hostel + \"','\" + education + \"')\";\r\n System.out.println(\"\"+SQL);\r\n try\r\n {\r\n \r\n db.pstmt = db.conn.prepareStatement(SQL);\r\n \r\n try\r\n {\r\n if (db.pstmt.executeUpdate() != 0)\r\n return true;\r\n }\r\n catch(Exception e)\r\n {\r\n \r\n }\r\n } catch(Exception e){\r\n \r\n }\r\n \r\n finally\r\n {\r\n try\r\n {\r\n db.conn.close();\r\n }\r\n catch (Exception e)\r\n {\r\n \r\n }\r\n }\r\n \r\n \r\n } catch(Exception e){\r\n \r\n }\r\n return false;\r\n }", "public void addToDatabaseRecord(ProductionRecord prodRec, String empUsername) {\n // Database credentials\n String pass = \"\";\n\n InputStream passPath = Controller.class.getResourceAsStream(\"/password.txt\");\n if (passPath == null) {\n System.out.println(\"Could not find password in resources folder\");\n }\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(passPath));\n String line = null;\n while (true) {\n try {\n if (!((line = reader.readLine()) != null)) {\n break;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(line);\n if (line != null) {\n pass = line;\n System.out.println(\"Password login: \" + line);\n break;\n }\n }\n Connection conn = null; //Temporary\n PreparedStatement stmt = null; //Temporary\n\n try {\n // STEP 1: Register JDBC driver\n Class.forName(\"org.h2.Driver\");\n\n //STEP 2: Open a connection\n conn = DriverManager.getConnection(\"jdbc:h2:./res/HR\", \"\",\n pass);\n\n stmt = conn.prepareStatement(\n \"INSERT INTO Productionrecord(production_num, product_id, \"\n + \"serial_num, date_produced, username) VALUES (?, ?, ?, ?, ?)\",\n Statement.RETURN_GENERATED_KEYS);\n stmt.setInt(1, prodRec.getProductionNumber());\n stmt.setInt(2, prodRec.getProductID());\n stmt.setString(3, prodRec.serialnumber);\n stmt.setDate(4, prodRec.getDateProduced());\n stmt.setString(5, empUsername);\n\n stmt.executeUpdate();\n\n stmt.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void createUser() {\r\n\t\tif(validateUser()) {\r\n\t\t\t\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"INSERT INTO t_user (nom,prenom,userName,pass,tel,type,status) values(?,?,?,?,?,?,?)\");\r\n\t\t\t\tps.setString(1, this.getNom());\r\n\t\t\t\tps.setString(2, this.getPrenom());\r\n\t\t\t\tps.setString(3, this.getUserName());\r\n\t\t\t\tps.setString(4, this.getPassword());\r\n\t\t\t\tps.setInt(5, Integer.parseInt(this.getTel().trim()));\r\n\t\t\t\tps.setString(6, this.getType());\r\n\t\t\t\tps.setBoolean(7, true);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\tnew Message().error(\"Fin d'ajout d'utilisateur\");\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tnew Message().error(\"Echec d'ajout d'utilisateur\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closePrepareStatement(ps);\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "@SuppressWarnings({ \"rawtypes\", \"unchecked\", \"deprecation\" })\r\n\tprotected void btnCreateactionPerformed() {\n\t\tif ((confirmpasswordcreatejTextField.getText()).equals(passwordcreatejPasswordField.getText()))\r\n\t\t{\r\n\t\t\tjava.sql.Connection conObj = JdbcConnect.createConnection();\r\n\t\t\tjava.sql.ResultSet rs = null;\r\n\t\t\ttry {\r\n\t\t\t\trs = JdbcSelectUname.selectRecordFromTable(conObj,usrname);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage(), \"Internal Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tif (rs.next())\r\n\t\t\t\t{\r\n\t\t\t\t\t\tString role = (String) rolecreatejComboBox.getSelectedItem();\r\n\t\r\n\t\t\t\t\t\tjava.util.Vector add_rows = new java.util.Vector();\r\n\t\t\t\t\t\t//adding new user details to the Vector_add_rows\r\n\t\t\t\t\t\tadd_rows.add(unamecreatejTextField.getText());\r\n\t\t\t\t\t\tadd_rows.add(passwordcreatejPasswordField.getText());\r\n\t\t\t\t\t\tadd_rows.add(passHintTextField.getText());\r\n\t\t\t\t\t\tadd_rows.add(role);\r\n\t\r\n\t\t\t\t\t\tint i = JdbcCreateUser.insertRecords(conObj,add_rows);\r\n\t\r\n\t\t\t\t\t\tif (i!=1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"User@\"+unamecreatejTextField.getText()+\" not created\\nPlease try again...\", \"User@\"+unamecreatejTextField.getText()+\" error\", javax.swing.JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"User@\"+unamecreatejTextField.getText()+\" added to the system\", \"User@\"+unamecreatejTextField.getText()+\" success message\", javax.swing.JOptionPane.PLAIN_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}//rs.next() if statement;\r\n\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"Access denied! User@\"+usrname+\" not granted to create new users\", \"User@\"+usrname+\" authentication error\", javax.swing.JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t} catch (HeadlessException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage(), \"\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage(), \"\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\telse {\r\n\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"Access Denied! The given password do not match\", \"Mismatch error\", javax.swing.JOptionPane.ERROR_MESSAGE);\t\t\t\t\t\t\r\n\t\t}\t\t\t\t\r\n\t}", "private void addUser(){\r\n\t\ttry{\r\n\t\t\tSystem.out.println(\"Adding a new user\");\r\n\r\n\t\t\tfor(int i = 0; i < commandList.size(); i++){//go through command list\r\n\t\t\t\tSystem.out.print(commandList.get(i) + \"\\t\");//print out the command and params\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\r\n\t\t\t//build SQL statement\r\n\t\t\tString sqlCmd = \"INSERT INTO users VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(4) + \"', '\" + commandList.get(5) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(6) + \"');\";\r\n\t\t\tSystem.out.println(\"sending command:\" + sqlCmd);//print SQL command to console\r\n\t\t\tstmt.executeUpdate(sqlCmd);//send command\r\n\r\n\t\t} catch(SQLException se){\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\terror = true;\r\n\t\t\tse.printStackTrace();\r\n\t\t\tout.println(se.getMessage());//return error message\r\n\t\t} catch(Exception e){\r\n\t\t\t//general error case, Class.forName\r\n\t\t\terror = true;\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());\r\n\t\t} \r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");//end try\r\n\t}", "public void addDoctor(String name, String lastname, String userName, String pass, String secAns)\r\n {\r\n\t try{\r\n\t\t // command to Insert is called with parameters\r\n\t String command = \"INSERT INTO DOCTORDATA (FIRSTNAME,LASTNAME,USERNAME,PASSWORD,SECURITYQN,SECURITYANS)\"+\r\n\t\t\t \"VALUES ('\"+name+\"', '\"+lastname+\"', '\"+userName+\"', '\"+pass+\"', '\"+\"What is Your favorite food?\"+\"', '\"+secAns+\"');\";\r\n\t stmt.executeUpdate(command);\r\n\t \r\n\t \r\n\t } catch (SQLException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t}\r\n\t \r\n }", "@Override\n\tpublic boolean addAccount(Account account) {\n\t\taccount.setStatus(-1);\n\t\t//String passwd = new UU\n\t\treturn accountDAO.addAccount(account);\n\t}", "public void insertIntoAdminDetails(String NIC, int CanteenNo, String Name, int ContactNo, String Password)\r\n {\r\n try \r\n {\r\n stmt = con.createStatement();\r\n stmt.execute(\"INSERT INTO admindetails(NIC, CanteenNo, Name, ContactNo, Password) VALUES('\"+NIC+\"',\"+CanteenNo+\",'\"+Name+\"',\"+ContactNo+\",'\"+Password+\"')\");\r\n\r\n } \r\n catch (SQLException ex) \r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n }\r\n }", "public void insertRegister(int id, String name, String password) throws SQLException\r\n\t{\n\t\tStatement stmt;\r\n\t\tstmt = conn.createStatement();\r\n\t\tString sql = \"insert into clientinfo(id, usrname, password,conninfo) values (\"+id+\", '\"+name+\"','\"+password+\"',true)\";\r\n\t\tstmt.executeUpdate(sql);\r\n\t}", "private void addNewUser() throws Exception, UnitException {\n String firstNameInput = firstName.getText();\n String lastNameInput = lastName.getText();\n String unitInput = unitID.getText();\n String accountInput = accountTypeValue;\n String passwordInput = password.getText();\n User newUserInfo;\n\n // Create user type based on the commandbox input\n switch (accountInput) {\n case \"Employee\":\n newUserInfo = new Employee(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Lead\":\n newUserInfo = new Lead(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Admin\":\n newUserInfo = new Admin(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + accountInput);\n }\n\n // Try adding this new user information to the database, if successful will return success prompt\n try {\n Admin.addUserToDatabase(newUserInfo);\n\n // If successful, output message dialog\n String msg = \"New User \" + firstNameInput + \" \" + lastNameInput + \" with UserID \"\n + newUserInfo.returnUserID() + \" successfully created\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset Values\n firstName.setText(\"\");\n lastName.setText(\"\");\n unitID.setText(\"\");\n password.setText(\"\");\n } catch (UserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "public static boolean addUser(UserDetails newUser){\n\t\t\t\t\t\t\n\t\t//getting attributes of UserDetails class with relevant data\n\t\t int id = newUser.getId();\n\t\t String name = newUser.getName(); \n\t\t String email = newUser.getEmail();\n\t\t String address = newUser.getAddress();\n\t\t String phone = newUser.getPhone(); \n\t\t String username = newUser.getUsername(); \n\t\t String password = newUser.getPassword();\n\t\t\t\n\t\ttry {\n\t\t\n\t\t\t //connecting to DB\n\t\t c = DatabaseConnection.getConnection();\n\t\t\t stmt = c.createStatement();\n\t\t\t String sqlStatement = \"insert into user values('\"+id+\"','\"+name+\"','\"+email+\"','\"+address+\"','\"+phone+\"','\"+username+\"','\"+password+\"')\";\n\t\t\t rsI = stmt.executeUpdate(sqlStatement);\n\t\t\t\t\n\t\t\t if(rsI>0) {\n\t\t\t\t status = true;\n\t\t\t }\n\t\t\t\n\t\t\t else {\n\t\t\t\t status = false;\t\n\t\t\t }\n\t\t\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\n\t\treturn status;\n\t}", "public void addUser(String username, String password) {\n\t\t// Connect to database\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\t\n\t\t// Create new entry\n\t\tString newEntryString = \"INSERT INTO User (username, password, winNum, loseNum) VALUES (?, ?, 0, 0)\";\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(newEntryString);\n\t\t\tps.setString(1, username);\n\t\t\tps.setString(2, password);\n\t\t\tps.executeUpdate();\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\t// Close connections\n\t\t\ttry {\n\t\t\t\tif(rs != null)\n\t\t\t\t{\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null)\n\t\t\t\t{\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(SQLException sqle)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sqle: \" + sqle.getMessage());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public int addCreditAccount(long pNr) throws SQLException {\r\n\t\tint accountId = -1;\r\n\r\n\t\t_db.connect();\r\n\r\n\t\tCustomer _cust = _db.findCustomer(pNr);\r\n\t\tif (_cust != null) {\r\n\t\t\tAccount _ac = new CreditAccount(0, 0.5, 7, 5000);\r\n\t\t\taccountId = _db.addAccount(_ac, pNr);\r\n\t\t}\r\n\r\n\t\t_db.disconnect();\r\n\r\n\t\treturn accountId;\r\n\t}", "public static boolean createAccountEntry(String playerName, String accountno, double withdrawlimit, String role) {\n\t\tString execute = \"INSERT INTO \" + EconomosConstants.DB_ACCOUNTENTRIES_TABLENAME + \" (accountno, user, role, withdrawlimit)\" +\n\t\t\t\t\" VALUES (\" + accountno + \", '\" + playerName + \"', '\" + role + \"', \" + withdrawlimit + \")\";\n\t\tif (SQLUtil.transactUpdate(execute)) {\n\t\t\tif (EconomosConstants.VERBOSE) GPP.consoleInfo(\"[GPP::ECONOMOS] AccountEntry created for account \" + accountno + \" for \" + playerName + \".\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (EconomosConstants.VERBOSE) GPP.consoleInfo(\"[GPP::ECONOMOS] AccountEntry creation MySQL DB transaction for account \" + accountno + \" for \" + playerName + \" failed. Check logs for more information.\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "public int addUser(String name, String pass) {\n this.connect();\n String sql = \"INSERT INTO users(username,password) VALUES(?,?)\";\n int val = 0;\n try (Connection conn = this.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n pstmt.setString(1, name);\n pstmt.setString(2, pass);\n pstmt.executeUpdate();\n val = 1;\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n val = 0;\n }\n return val;\n }", "public static synchronized int deleteCred(int credID){\n\t\t\tint status=0;\t\n\t\t\tConnection connection; \n\t\t\t \n\t\t\t \n\t\t\t\tString preparedSQL = \"DELETE FROM credential WHERE Credentials_ID = ?\";\n\t\t\t\tPreparedStatement statement=null;\t\n\t\t\t\ttry{\n\t\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\n\t\t\t\t\tstatement.setInt(1, credID);\n\t\t\t\t\tstatus = statement.executeUpdate();\n\t\t\t\t\tstatement.close();\n\t\t\t\t\tconnection.close();\n\t\t\t\t}catch (SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t\t}\n\n\t\t\treturn status;\n\t}", "boolean createAccount(String username,String email,String password){\n boolean isEmailExist = checkEmailExist(email);\n boolean isnewUser = false;\n if(isEmailExist){\n System.out.println(\"email already exists\");\n }\n else{\n if(email !=\"\" && email !=null && username !=\"\" && username !=null && password !=\"\" && password !=null){\n try{\n stmt = con.prepareStatement(\"INSERT INTO users(name,email,password) VALUES(?,?,?)\");\n stmt.setString(1,username);\n stmt.setString(2,email);\n stmt.setString(3,password);\n stmt.executeUpdate();\n isnewUser = true;\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n closeConnection();\n }\n }\n else{\n System.out.println(\"Please check the value\");\n }\n }\n return isnewUser;\n }", "public void addCustomer(int Id, String name, String dob, String gender, String number, String email, String address, String password, Boolean promo, Integer reward, Boolean reg) throws SQLException { //code for add-operation \n st.executeUpdate(\"INSERT INTO IOTBAY.CUSTOMER \" + \"VALUES ('\" \n + Id + \"','\" + name + \"', '\" + dob + \"', '\" \n + gender + \"', '\" + number + \"', '\" \n + email + \"', '\" + address + \"', '\" \n + password + \"', '\" + promo + \"', '\"+ reward + \"', '\"+ reg \n + \"')\");\n\n }", "boolean addUser(int employeeId, String name, String password, String role);", "@Override\n public void onClick(View v) {\n String strUsername = txtUsername.getText().toString();\n String strPassword = txtPassword.getText().toString();\n if (strPassword.length() < 4) {\n Toast.makeText(getApplicationContext(), \"Password requires at least 4 characters.\", Toast.LENGTH_LONG).show();\n return;\n }\n String strHashedPassword = hash(strPassword);\n\n //Build sql prepared statement\n String strStatement = \"insert into account (username, password) values (?, ?)\";\n try {\n PreparedStatement psInsert = Settings.getInstance().getConnection().prepareStatement(strStatement);\n psInsert.setString(1, strUsername);\n psInsert.setString(2, strHashedPassword);\n int result = psInsert.executeUpdate();\n if (result != 0) {\n Log.d(\"\", \"onClick: Error inserting account.\");\n }\n\n psInsert.close();\n\n //TODO: check result code to make sure it went through\n\n Toast.makeText(getApplicationContext(), \"Account successfully created.\", Toast.LENGTH_LONG).show();\n //Toast.makeText(getApplicationContext(), \"Username already exists.\", Toast.LENGTH_LONG).show();\n //Toast.makeText(getApplicationContext(), \"Password does not meet requirements.\", Toast.LENGTH_LONG).show();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n Log.v(this.getClass().toString(), \"Register complete.\");\n }", "public boolean addNewUser(UserDetails ud) {\n try {\n con = (Connection) DriverManager.getConnection(url, this.usernamel, this.passwordl);\n String query = \"INSERT INTO user VALUES(?,?,?,?,?,?,?,?)\";\n pst = (com.mysql.jdbc.PreparedStatement) con.prepareStatement(query);\n pst.setInt(1, ud.getEmpID());\n pst.setString(2, ud.getEmployeeType());\n pst.setString(3, ud.getName());\n pst.setString(4, ud.getAddress());\n pst.setInt(5, ud.getMobile());\n pst.setString(6, ud.getNic());\n pst.setString(7, ud.getUsername());\n pst.setString(8, ud.getPassword());\n pst.executeUpdate();\n return true;\n } catch (Exception ex) {\n //System.out.print(ex);\n return false;\n } finally {\n try {\n if (pst != null) {\n pst.close();\n }\n if (con != null) {\n con.close();\n }\n } catch (Exception e) {\n }\n }\n }", "public void complainAdd(String uName,String cm_type, String uCom,String userEmail,String UserTp){\n\n conn = con.connectTODB();\n\n try {\n String insert = \"INSERT INTO complain(u_name,c_type,u_complain,u_email,u_tp) VALUES('\"+uName+\"','\"+cm_type+\"','\"+uCom+\"','\"+userEmail+\"','\"+UserTp+\"')\";\n Statement RegisterUser = conn.createStatement();\n RegisterUser.execute(insert);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n\n }", "public void CreateUser(Connection conn, String user_name,\r\n String user_uid, String user_pwd, String status) \r\n throws DbException\r\n {\r\n Statement stmt = null;\r\n String sql = \"\";\r\n int id = 0;\r\n try \r\n {\r\n id = getNextID(conn, \"Users_seq\");\r\n \r\n sql = \"insert into Users values(\"+id+\", \"+sqlString(user_uid)+\", \"+sqlString(user_pwd)+\", \"+sqlString(user_name)+\", \"+sqlString(status)+\");\";\r\n stmt = conn.createStatement();\r\n stmt.execute(sql);\r\n } \r\n catch (SQLException sqle) \r\n { \r\n sqle.printStackTrace(System.err);\r\n \r\n throw new DbException(\"Internal error. Failed to call PL/SQL procedure\\n(\" +\r\n sqle.getMessage() + \")\");\r\n } \r\n finally \r\n {\r\n try \r\n {\r\n if (stmt != null) stmt.close();\r\n } \r\n catch (SQLException ignored) \r\n {}\r\n }\r\n }", "private boolean addClient() throws Exception {\n\n // Handle clicks for Add\n ContentValues content = new ContentValues();\n content.put(TakeAndGoConsts.ClientConst.FIRST_NAME, FirstName.getText().toString());\n content.put(TakeAndGoConsts.ClientConst.LAST_NAME, LastName.getText().toString());\n content.put(TakeAndGoConsts.ClientConst.ID, ID.getText().toString());\n content.put(TakeAndGoConsts.ClientConst.PHONE_NUMBER, PhoneNumber.getText().toString());\n content.put(TakeAndGoConsts.ClientConst.EMAIL, EmailAddress.getText().toString());\n content.put(TakeAndGoConsts.ClientConst.CREDIT_CARD, CreditCard.getText().toString());\n content.put(TakeAndGoConsts.ClientConst.PASSWORD, Password.getText().toString());\n\n\n DBFactory.getIdbManager().addClient(content);\n\n return true;\n }", "int insert(Privilege record);", "private void addAdmin() {\n try (Connection connection = this.getConnection();\n Statement st = connection.createStatement();\n ResultSet rs = st.executeQuery(INIT.GET_ADMIN.toString())) {\n if (!rs.next()) {\n int address_id = 0;\n st.executeUpdate(INIT.ADD_ADMIN_ADDRESS.toString(), Statement.RETURN_GENERATED_KEYS);\n try (ResultSet rs1 = st.getGeneratedKeys()) {\n if (rs1.next()) {\n address_id = rs1.getInt(1);\n }\n }\n try (PreparedStatement ps = connection.prepareStatement(INIT.ADD_ADMIN.toString())) {\n ps.setInt(1, address_id);\n ps.execute();\n }\n }\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n\n }", "public boolean makeNewAccount(String name, BigDecimal balance, int type)\n throws SQLException, ConnectionFailedException, DatabaseInsertException {\n if (currentCustomerAuthenticated && currentUserAuthenticated) {\n int id = DatabaseInsertHelper.insertAccount(name, balance, type);\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n // find out what account type the account is and create and add that account to the customer\n if (type == map.accountTypes.get(AccountTypes.CHEQUING)) {\n ChequingAccount chequing = new ChequingAccountImpl(id, name, balance);\n currentCustomer.addAccount(chequing);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.SAVINGS)) {\n SavingsAccount savings = new SavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(savings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.TFSA)) {\n TFSA tfsa = new TFSAImpl(id, name, balance);\n currentCustomer.addAccount(tfsa);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.RESTRICTEDSAVING)) {\n RestrictedSavingsAccount rsavings = new RestrictedSavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(rsavings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n }\n return false;\n }\n System.out.println(\"reached here\");\n throw new ConnectionFailedException();\n }", "public static void addUser(String username, String password) {\n try {\n // create a mysql database connection\n Class.forName(\"com.mysql.jdbc.Driver\");\n HashSalt hashSalt = new HashSalt();\n connection = DriverManager.getConnection(\"RDS_HOST\",\"RDS_USERNAME\",\"RDS_PASSWORD\");\n String query = \"INSERT INTO YOUR_TABLE_NAME_GOES_HERE (username, password) VALUES(?,?)\";\n PreparedStatement preparedStatement = connection.prepareStatement(query);\n preparedStatement.setString(1, username);\n preparedStatement.setString(2,hashSalt.hashPassword(password));\n preparedStatement.executeUpdate();\n connection.close();\n\n } catch (Exception e) {\n System.err.println(\"Got an exception!\");\n System.err.println(e.getMessage());\n }\n }", "@Override\n\tpublic boolean register(Credentials cred) {\n\t\treturn true;\n\t}", "public void setCredentials(String username, String role, String password)\n\t{\n\t\tConnection dbConnection = null;\n\t\tPreparedStatement preparedStatement=null;\n\n\t\ttry {\t\t\t\t\n\t\t\tInteger userId = null;\n\t\t\tString pwHash = BCrypt.hashpw(password, BCrypt.gensalt()); \n\n\t\t\tString configUrlQuery = \"UPSERT * from plnmonitor.user where name=\" + username;\n\n\t\t\tdbConnection = getDBConnection();\n\n\t\t\tString insertTableSQL = \n\t\t\t\t\t\"WITH upsert AS \" +\n\t\t\t\t\t\t\t\"(UPDATE plnmonitor.user \" +\n\t\t\t\t\t\t\t\"SET \\\"passwordHash\\\" = ?, \" +\n\t\t\t\t\t\t\t\"role = ? \" +\n\t\t\t\t\t\t\t\"WHERE name=? RETURNING *), \" +\n\n\t\t\t\t\t\"inserted AS (\"+\n\t\t\t\t\t\"INSERT INTO plnmonitor.user \" +\n\t\t\t\t\t\"(name,\\\"passwordHash\\\",role) \"+\n\t\t\t\t\t\"SELECT ?,?,? WHERE NOT EXISTS \"+\n\t\t\t\t\t\"(SELECT * FROM upsert) \"+\n\t\t\t\t\t\"RETURNING *) \"+\n\t\t\t\t\t\"SELECT * \" +\n\t\t\t\t\t\"FROM upsert \" +\n\t\t\t\t\t\"union all \" +\n\t\t\t\t\t\"SELECT * \" +\n\t\t\t\t\t\"FROM inserted\";\n\n\t\t\tdbConnection = getDBConnection();\n\t\t\tpreparedStatement = dbConnection.prepareStatement(insertTableSQL, Statement.KEEP_CURRENT_RESULT);\n\t\t\tpreparedStatement.setString(1, pwHash);\n\t\t\tpreparedStatement.setString(2, role);\n\t\t\tpreparedStatement.setString(3, username);\n\n\t\t\tpreparedStatement.setString(4, username);\n\t\t\tpreparedStatement.setString(5, pwHash);\n\t\t\tpreparedStatement.setString(6, role);\n\n\t\t\t//System.out.println(preparedStatement.toString());\n\t\t\tResultSet rs=preparedStatement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tuserId = rs.getInt(\"id\");\n\t\t\t\tLOGGER.info(\"Added or updated user: \" + username + \" to the database with ID: \" + userId + \" \" + pwHash );\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException e) {\n\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t} \n\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t}\n\n\t\t\t\tif (dbConnection != null) {\n\t\t\t\t\tdbConnection.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\n\t\t\t\tLOGGER.error(e.getMessage());\n\n\t\t\t}\n\n\t\t}\n\n\t}", "public static int save(User u){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database\n PreparedStatement ps=con.prepareStatement( \n \"insert into t_user(user_name,nama_lengkap,password,hak_akses) values(?,?,?,?)\"); \n ps.setString(1,u.getUserName()); \n ps.setString(2,u.getNamaLengkap()); \n ps.setString(3,u.getPassword()); \n ps.setString(4,u.getHakAkses()); \n status=ps.executeUpdate(); \n }catch(Exception e){\n System.out.println(e);\n } \n return status; \n }", "public boolean Add() {\n String query = \"INSERT INTO Proveedores(nombre, idContacto, activo) \"\r\n + \"VALUES('\" + nombre + \"',\" + idContacto + \",\" + activo + \");\";\r\n return dataAccess.Execute(query) >= 1;\r\n }", "public static String addUser(String name, String pass, String email, String fname, String lname, String account){\n String sql = \"insert into users(u_name,u_pass,u_email,u_fname,u_lname,u_accountnum) values ('\" + name + \"'\" + \",'\" + pass + \"'\" + \",'\"\n + email + \"'\" + \",'\" + fname + \"'\" + \",'\" + lname + \"'\" + \",'\" + account + \"')\";\n return sql;\n }", "String addAccount(UserInfo userInfo);", "int insert(SysRole record);", "private int createStudent(String firstname, String lastname, Role role, String username,\r\n\t\t\tString password, Level level, String period, boolean enabled) throws Exception\r\n\t{\r\n\t\tString query = \"INSERT INTO user \" +\r\n\t\t\t\t\"(firstname,lastname,role,username,password,level,period,enabled) VALUES \" +\r\n\t\t\t\t\"(?,?,?,?,?,?,?,?)\";\r\n\t\tConnection link = Database.getSingleton().getLink();\r\n\t\t\r\n\t\tif (link == null)\r\n\t\t\tthrow new Exception(\"Connection Failed!\");\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//create the prep stmt\r\n\t\t\tPreparedStatement stmt = link.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);\r\n\t\t\t\r\n\t\t\t//bind variables\r\n\t\t\tstmt.setString(1, firstname);\r\n\t\t\tstmt.setString(2, lastname);\r\n\t\t\tstmt.setString(3, role.toString());\r\n\t\t\tstmt.setString(4, username);\r\n\t\t\tstmt.setString(5, password);\r\n\t\t\tstmt.setString(6, level.toString());\r\n\t\t\tstmt.setString(7, period);\r\n\t\t\tstmt.setBoolean(8, enabled);\r\n\t\t\t\r\n\t\t\t//execute update\r\n\t\t\tstmt.executeUpdate();\r\n\t\t\t\r\n\t\t\tResultSet resultKey = stmt.getGeneratedKeys();\r\n\t\t\tif (!resultKey.next())\r\n\t\t\t\tthrow new Exception(\"Creating new Student failed - createStudent()\");\r\n\t\t\treturn resultKey.getInt(1);\r\n\t\t}\r\n\t\tcatch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in setEnabled\",e);\r\n\t\t\tlink.rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}", "int insert(SessionAccountConnectAttrs record);", "int insertSelective(PasswdDo record);", "public void merge(CredentialsModel credential) {\n Connection connection = null;\n PreparedStatement stmt = null;\n try {\n try {\n connection = ds.getConnection();\n try {\n stmt = connection.prepareStatement(\n \"UPDATE Credentials \"\n + \"SET EmpPassword = ? \"\n + \", EmpUsername = ?\"\n + \"WHERE EmpNum = ?\");\n stmt.setString(1, credential.getPassword());\n stmt.setString(2, credential.getUserName());\n stmt.setInt(3, credential.getEmployee().getEmpNumber());\n stmt.executeUpdate();\n } finally {\n if (stmt != null) {\n stmt.close();\n }\n\n }\n } finally {\n if (connection != null) {\n connection.close();\n }\n }\n } catch (SQLException ex) {\n System.out.println(\"Error in merge \" + credential);\n ex.printStackTrace();\n }\n }", "void add(User user) throws SQLException;", "public void addToDatabaseProduct() {\n // Database credentials\n String pass = \"\";\n\n InputStream passPath = Controller.class.getResourceAsStream(\"/password.txt\");\n if (passPath == null) {\n System.out.println(\"Could not find password in resources folder\");\n }\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(passPath));\n String line = null;\n while (true) {\n try {\n if (!((line = reader.readLine()) != null)) {\n break;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(line);\n if (line != null) {\n pass = line;\n System.out.println(\"Password login: \" + line);\n break;\n }\n }\n Connection conn = null; //Temporary\n PreparedStatement stmt = null; //Temporary\n\n try {\n // STEP 1: Register JDBC driver\n Class.forName(\"org.h2.Driver\");\n\n //STEP 2: Open a connection\n conn = DriverManager.getConnection(\"jdbc:h2:./res/HR\", \"\",\n pass);\n\n final String sqlProductName = txtProductName.getText();\n String sqlManufName = txtManufacturer.getText();\n ItemType sqlItemType = choiceType.getValue();\n\n stmt = conn.prepareStatement(\"INSERT INTO Product(type, manufacturer, name) VALUES (?, ?, ?)\",\n Statement.RETURN_GENERATED_KEYS);\n stmt.setString(1, sqlItemType.toString());\n stmt.setString(2, sqlManufName);\n stmt.setString(3, sqlProductName);\n\n stmt.executeUpdate();\n\n stmt.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "int insert(SysRoleDO record);", "public void saveNewProject(){\n String pn = tGUI.ProjectTextField2.getText();\n String pd = tGUI.ProjectTextArea1.getText();\n String statusID = tGUI.StatusComboBox.getSelectedItem().toString();\n String customerID = tGUI.CustomerComboBox.getSelectedItem().toString();\n\n int sstatusID = getStatusID(statusID);\n int ccustomerID = getCustomerID(customerID);\n\n try {\n pstat = cn.prepareStatement (\"insert into projects (project_name, project_description, project_status_id, customer_id) VALUES (?,?,?,?)\");\n pstat.setString(1, pn);\n pstat.setString(2,pd);\n pstat.setInt(3, sstatusID);\n pstat.setInt(4, ccustomerID);\n pstat.executeUpdate();\n\n }catch (SQLException ex) {\n Logger.getLogger(ProjectMethods.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tpublic void addToUserAccountTable(int accountId,String username) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString insertQuery = \"insert into user_account values(?, ?)\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(insertQuery);\n \n\t\t\tprepStmt.setString(1, username);\n\t\t\tprepStmt.setInt(2, accountId);\n\t\t\tprepStmt.executeUpdate();\n\t}", "public void addUser() throws AccountException {\n System.out.println(\"----------------- Add User -----------------\");\n System.out.print(\"Account: \");\n String username = this.checkUsername(); // Call method to check input of username\n\n System.out.print(\"Password: \");\n String password = this.checkEmpty(\"Password\"); // Call method to check input of password\n\n System.out.print(\"Name: \");\n String name = this.checkEmpty(\"Name\"); // Call method to check input of name\n\n System.out.print(\"Phone: \");\n String phone = this.checkPhone(); // Call method to check nput of phone\n\n System.out.print(\"Email: \");\n String email = this.checkEmail(); // Call method to check input of email\n\n System.out.print(\"Address: \");\n String address = this.checkEmpty(\"Address\"); // Call method to check input of address\n\n System.out.print(\"DOB: \");\n Date dob = this.checkDate(); // Call method to check input of dob\n\n // Add new user and print success if created\n this.addUser(username, password, name, phone, email, address, dob);\n System.out.println(\"Create account success.\");\n }", "@Test(groups = \"user\", priority = 1)\n public void testUserAdd() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient.userAdd(root, rootPass).get();\n this.authDisabledAuthClient.userAdd(user, userPass).get();\n }", "public void addCustomer() {\n\t \n\t try{\n\t\t con = openDBConnection();\n\t\t callStmt = con.prepareCall(\" {call team5.CUSTOMER_ADD_PROC(?,?,?,?,?,?,?)}\");\n\t\t callStmt.setString(1,this.emailad);\n\t\t callStmt.setString(2,this.fname);\n\t\t callStmt.setString(3,this.lname);\n\t\t callStmt.setString(4,this.username);\n\t\t callStmt.setString(5,this.password);\n\t\t callStmt.setString(6,this.adminUsername);\n\t\t callStmt.setInt(7, this.id);\n\t\t callStmt.execute();\n\t\t callStmt.close();\n\t } catch (Exception E) {\n\t E.printStackTrace();\n\t }\n}", "public boolean addToUser(PetDTO pet , String username) throws Exception{\n boolean check = false;\n try {\n conn = MyConnection.getConnection();\n String sql = \"Insert into tbl_UserPet(Username,PetID) values(?,?)\";\n preStm = conn.prepareStatement(sql);\n preStm.setString(1, username);\n preStm.setString(2, pet.getPetID());\n check = preStm.executeUpdate() > 0;\n } finally {\n closeConnection();\n }\n \n return check;\n }", "int insert(ErpOaLicKey record);", "void addUserpan(String userid,String username,String userpwd);", "public void add(AddressEntry addressEntry)\n {\n try{\n Class.forName(\"oracle.jdbc.OracleDriver\");\n Connection conn = DriverManager.getConnection(\"jdbc:oracle:thin\" +\n \":@adcsdb01.csueastbay.edu:1521:mcspdb.ad.csueastbay.edu\"\n , \"MCS1018\", \"y_WrlhyT\");\n // Statement stmt = conn.createStatement();\n\n PreparedStatement stmt = conn.prepareStatement(\"INSERT INTO \" +\n \"ADDRESSENTRYTABLE values(?,?,?,?,?,?,?,?, \" +\n \"default )\");\n stmt.setString(1, addressEntry.name.firstName);\n stmt.setString(2, addressEntry.name.lastName);\n stmt.setString(3, addressEntry.address.street);\n stmt.setString(4, addressEntry.address.city);\n stmt.setString(5, addressEntry.address.state);\n stmt.setInt(6, addressEntry.address.zip);\n stmt.setString(7, addressEntry.phone);\n stmt.setString(8, addressEntry.email);\n stmt.executeUpdate();\n\n conn.close();\n }\n catch(Exception e){System.out.println(e);}\n\n addressEntryList.addElement(addressEntry);\n }", "public boolean add(String username, String password, String email) {\n Accounts a = new Accounts(username, password, email);\n return crudInterface.add(a);\n\n }", "public void addUser(String firstName, String lastName, String username, String password, char type)\r\n\t{\r\n\t\tdb.user_addUser(firstName, lastName, username, password, type);\t\r\n\t}", "public static boolean creatAccount(String username, String passwd) {\n\t\tif (dao.insertStu(username, passwd))\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public ResultSet adduser(String firstname, String lastname, String username,\r\n\t\tString password, String address, String city, String eMail, Long phone,\r\n\t\tString security, String answer, String dob,\r\n\t\tLong pincode)throws SQLException {\n\tLong logid=null;\r\n\tint i=DbConnect.getStatement().executeUpdate(\"insert into login values(login_seq.nextval,'\"+username+\"'||username_seq.nextval,'\"+password+\"','not approved','user','\"+security+\"','\"+answer+\"') \");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"insert into customer values(user_seq.nextval,'\"+firstname+\"','\"+lastname+\"','\"+city+\"','\"+eMail+\"',\"+phone+\",'\"+dob+\"',sysdate,\"+pincode+\",login_seq.nextval-1,'\"+address+\"')\");\r\n\tResultSet rss=DbConnect.getStatement().executeQuery(\"select login_seq.nextval-2 from dual\");\r\n\tif(rss.next())\r\n\t{\r\n\t\tlogid=rss.getLong(1);\r\n\t}\r\n\trs=DbConnect.getStatement().executeQuery(\"select username from login where login_id=\"+logid+\"\");\r\n\treturn rs;\r\n}", "int insert(RoleSystemauthority record);", "int insert(LoginRecordDO record);", "public void createAccount(Account account) \n\t\t\tthrows SQLException, RegisterAccountDBException {\n\t\t\n\t\tString msg =\"Could not create account\";\n\t\tint updateRows=0;\n\t\t\n\t\ttry {\n\t\t\t//if(!accountExist(account.getPersonnr())) {\n\t\t\tif(getStudentInfo(account.getPersonnr())==null) {\n\t\t\tString personnr = account.getPersonnr();\n\t\t\tcreateAccountStmt.setString(1, personnr);\n\t\t updateRows = createAccountStmt.executeUpdate();\n\t\t if(updateRows!=1) {\n\t\t \thandleException(msg, null);\n\t\t }\n\t\t\tconnection.commit();\n\t\t }\n\t\t}catch (SQLException ex) {\n\t\t\thandleException(msg , ex);\t\n\t\t}\n\t}", "public ResultSet addbroker(String firstname, String lastname, String username,\r\n\t\tString password, String address, String gender, String eMail,\r\n\t\tNumber phone, String experience, String security, String answer, Long demat, Long bankacc, Double amt) throws SQLException {\n\tLong logid=null;\r\n\tint i=DbConnect.getStatement().executeUpdate(\"insert into login values(login_seq.nextval,'\"+username+\"'||username_seq.nextval,'\"+password+\"','not approved','broker','\"+security+\"','\"+answer+\"') \");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"insert into broker values(broker_seq.nextval,'\"+firstname+\"','\"+lastname+\"','\"+address+\"','\"+gender+\"','\"+eMail+\"',\"+phone+\",'\"+experience+\"',login_seq.nextval-1,\"+demat+\",\"+bankacc+\")\");\r\n int k=DbConnect.getStatement().executeUpdate(\"insert into account values(\"+bankacc+\",\"+amt+\")\");\r\n\tResultSet rss=DbConnect.getStatement().executeQuery(\"select login_seq.nextval-2 from dual\");\r\n\tif(rss.next())\r\n\t{\r\n\t\tlogid=rss.getLong(1);\r\n\t}\r\n\trs=DbConnect.getStatement().executeQuery(\"select username from login where login_id=\"+logid+\"\");\r\n\treturn rs;\r\n\t\r\n}", "public String addUser(String name, String email, String address, String postal, String phNum) {\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n ResultSet resultset = null;\n\n try {\n //Initialise the connection, statement and resultset \n\n connection = dsShoppingOnline.getConnection();\n\n \n\n \n // non-existed email,Allow user to create account and added to database tables\n // Prepare the Statement using the Connection\n preparedStatement = connection.prepareStatement(\"INSERT INTO customer (name, deliveryaddress, postalcode, contactnumber, emailaddress) VALUES (?,?,?,?,?)\");\n\n // Set the userinput into the prepared statement\n preparedStatement.setString(1, name);\n preparedStatement.setString(2, email);\n preparedStatement.setString(3, address);\n preparedStatement.setString(4, postal);\n preparedStatement.setString(5, phNum);\n\n \n\n // Make a query to the DB using ResultSet through the Statement \n preparedStatement.executeUpdate();\n\n \n\n } catch (SQLException ex) {\n //Usually, the error should be logged somewhere in the system log.\n //Sometimes, users may also need to be notified regarding such error\n ex.printStackTrace();\n System.err.println(ex.getMessage());\n } finally {\n //Resultset, Statement and Connection are closed in the finally \n // clause to ensure that they will be closed no matter what \n // happens to the system.\n if (resultset != null) {\n try {\n resultset.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n System.err.println(ex.getMessage());\n }\n }\n if (preparedStatement != null) {\n try {\n preparedStatement.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n System.err.println(ex.getMessage());\n }\n }\n if (connection != null) {\n try {\n connection.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n System.err.println(ex.getMessage());\n }\n }\n }\n\n return \"User added\";\n }", "@BeforeAll\n\tpublic void setup() throws CredentialAlreadyExistsException {\n \t\tLocalDate now_ld = LocalDate.now();\n \t\tuser1 = new User(\"testuser1@email.com\", \"FirstName1\", \"LastName1\", now_ld, null);\n \t\tuser2 = new User(\"testuser2@email.com\", \"FirstName2\",\"LastName2\", now_ld, null);\n \t\t\n \t\t// Add credentials to the database to use for testing if they don't already exist.\n \t\tpassword1 = \"testuser11234\";\n \t\tpassword2 = \"testuser21234\";\n\t credentialUser = new Credential(\"testuser1\", password1, user1); \n\t credentialAdmin = new Credential(\"testuser2\", password2, user2);\n\t credentialAdmin.setUserRole(\"ROLE_ADMIN\");\n\t \n\t credentialUser = credentialService.add(credentialUser);\n\t credentialAdmin = credentialService.add(credentialAdmin); \n\t}", "public static int add(Subject e) {\n int status = 0;\n try {\n String sqlInsert = \"insert into subjects(subject_code,subject_name,faculty_id,lect_id)\"\n + \"values(?,?,?,?)\";\n PreparedStatement pstmt = MySQL.getConnection().prepareStatement(sqlInsert);\n pstmt.setString(1, e.getSubjectCode());\n pstmt.setString(2, e.getSubjectName());\n pstmt.setInt(3, e.getFacultyID());\n pstmt.setInt(4, e.getLectID());\n status = pstmt.executeUpdate();\n } catch (SQLException ex) {\n ex.getMessage();\n }\n return status;\n }", "public static int addUser(String token, String email, String pass, String userName)\n\t\t\tthrows SQLException, ClassNotFoundException {\n\t\tString sql = \"INSERT INTO `RubykoDb`.`user` (`password`, `email`, `token`, `name`, `createTime`) VALUES ('111', '11', '11', '1', '1');\";\n\t\ttry (Connection conn = Database.getInstance().connect();\n\t\t\t\tPreparedStatement statement = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);) {\n\n\t\t\tint affectedRows = statement.executeUpdate();\n\t\t\tif (affectedRows == 0) {\n\t\t\t\tthrow new SQLException(\"Creating user failed, no rows affected.\");\n\t\t\t}\n\n\t\t\ttry (ResultSet generatedKeys = statement.getGeneratedKeys()) {\n\t\t\t\tif (generatedKeys.next()) {\n\t\t\t\t\treturn generatedKeys.getInt(1);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new SQLException(\"Creating user failed, no ID obtained.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void addCredito(double montante) {\r\n\t\tcredito += montante;\r\n\t}", "@Override\n\tpublic void addProfessor(Professor add1) {\n\t\ttry{\n\t\t\tstmt=conn.prepareStatement(\"INSERT INTO Professor(ssn,name,department,password) VALUES(?,?,?,?)\");\n\t\t\tstmt.setString(1, add1.getSsn());\n\t\t\tstmt.setString(2,add1.getName());\n\t\t\tstmt.setString(3, add1.getDepartment());\n\t\t\tstmt.setString(4, \"123456\");//Δ¬ΘΟΓάΒλ\n\t\t\t\n\t\t\t\n\t\t\tstmt.executeUpdate();\n\t\t\t}catch(SQLException e){\n\t\t\t\tex=e;\n\t\t\t}finally{\n\t\t\t\tif(conn!=null){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t}catch(SQLException e){\n\t\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\t\tex=e;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(ex!=null){\n\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t\t}\n\t}", "int insert(SysRoleUser record);", "public boolean insertMember(Member newMember) {\n boolean done = false;\n String img = \"images/bee-icon.jpg\";\n String usrpass = newMember.getPassword();\n String sql = \"INSERT INTO member(email, name, surname, password, city, postcode, address, phone, picture, active) VALUES (?,?,?,?,?,?,?,?,?,?)\";\n if (usrpass.toCharArray()[0] == '1' && usrpass.toCharArray()[1] == '2' && usrpass.toCharArray()[2] == '3') { //if the new member has only name, surname, email and password\n try ( Connection con = connect(); PreparedStatement pstmt = con.prepareStatement(sql);) {\n\n pstmt.setString(1, newMember.getEmail());\n pstmt.setString(2, newMember.getName());\n pstmt.setString(3, newMember.getSurname());\n pstmt.setString(4, BCrypt.hashpw(newMember.getPassword(),BCrypt.gensalt()));\n pstmt.setString(5, \"\");\n pstmt.setInt(6, 0);\n pstmt.setString(7, \"\");\n pstmt.setInt(8, 0);\n pstmt.setBoolean(10, false);\n pstmt.setString(9, img);\n pstmt.executeUpdate();\n\n done = true;\n } catch (SQLException e) {\n System.out.println(\"fail on insert\");\n System.out.println(e.getMessage());\n\n }\n\n } else {\n try ( Connection con = connect(); PreparedStatement pstmt = con.prepareStatement(sql);) {\n\n pstmt.setString(1, newMember.getEmail());\n pstmt.setString(2, newMember.getName());\n pstmt.setString(3, newMember.getSurname());\n pstmt.setString(4, BCrypt.hashpw(newMember.getPassword(),BCrypt.gensalt()));\n pstmt.setString(5, newMember.getCity());\n pstmt.setInt(6, newMember.getPostCode());\n pstmt.setString(7, newMember.getAddress());\n pstmt.setInt(8, newMember.getPhone());\n pstmt.setBoolean(9, newMember.isActive());\n pstmt.executeUpdate();\n\n done = true;\n } catch (SQLException e) {\n System.out.println(\"fail on insert\");\n System.out.println(e.getMessage());\n\n }\n\n }\n\n return done;\n }", "private void insertUser(String name, String password, int balance) throws SQLException {\n\t\tinsertUserStatement.clearParameters();\n\t\tinsertUserStatement.setString(1, name);\n\t\tinsertUserStatement.setString(2, password);\n\t\tinsertUserStatement.setInt(3, balance);\n\t\tinsertUserStatement.executeUpdate();\n\t}", "public boolean addUser(String username, String password, String role) throws InvalidUsername, InvalidRole {\n //Checking user name is valid:\n if (username == null) {\n throw new InvalidUsername(\"Username cannot be null!\");\n }\n //Checking role is valid:\n if (!checkRole(role)) {\n throw new InvalidRole(\"Role was not a valid input!\");\n }\n Pattern pattern = Pattern.compile(\"[^A-Za-z0-9]\");\n Matcher matcher = pattern.matcher(username);\n if (matcher.find()) {\n throw new InvalidUsername(\"Username cannot have special characters!\");\n }\n ArrayList<String> listOfUsernames = database.returnAllUsernames();\n for (int rowBeingChecked = 0; rowBeingChecked < listOfUsernames.size(); rowBeingChecked++) {\n if (listOfUsernames.get(rowBeingChecked).equals(username)) {\n throw new InvalidUsername(\"Name of username is not unique!\");\n }\n }\n\n //Hashing password, and generating salt:\n SecureRandom random = new SecureRandom();\n byte[] salt = new byte[16];\n random.nextBytes(salt);\n KeySpec spec = new PBEKeySpec(password.toCharArray(), salt, 66536, 128);\n SecretKeyFactory factory;\n byte[] hash;\n try {\n factory = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n hash = factory.generateSecret(spec).getEncoded();\n\n //Pushing to database (with hashed password + salt, instead of password)\n database.addAccount(username, role, byteToString(salt), byteToString(hash));\n return true;\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n return false;\n } catch (InvalidKeySpecException e) {\n e.printStackTrace();\n return false;\n }\n }", "public static void addAccount(Account newAccount) throws SQLIntegrityConstraintViolationException{\n try(Statement statement = connection.createStatement()){\n String username = newAccount.getUsername(), password = newAccount.getPassword(), firstName = newAccount.getFirstName(), lastName = newAccount.getLastName();\n int age = newAccount.getAge();\n System.out.println(\"Username: \" + username);\n // INSERT INTO login_accounts VALUES(username, password, firstName, lastName, age)\n String db_operation = \"INSERT INTO login_accounts VALUES('\" + username + \"','\" + password + \"','\" + firstName + \"','\" + lastName + \"',\" + age + \")\";\n statement.execute(db_operation);\n }catch (SQLIntegrityConstraintViolationException exc){\n throw exc;\n }\n catch (SQLException exc){\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, \"Attempting to add account.\", exc);\n }\n }", "public void addStaff(String name, String dob, String email, String number, String address, String password) throws SQLException { //code for add-operation \n st.executeUpdate(\"INSERT INTO IOTBAY.STAFF \" + \"VALUES ('\" \n + name + \"', '\" + dob + \"', '\" \n + email + \"', '\" + number+ \"', '\" \n + address + \"', '\" + password + \"')\");\n\n }" ]
[ "0.62159824", "0.6198878", "0.5990159", "0.59631133", "0.59212685", "0.58999777", "0.5889237", "0.5885064", "0.5777928", "0.5731702", "0.5723773", "0.5714189", "0.5671363", "0.5668201", "0.56425047", "0.563493", "0.5609641", "0.55908847", "0.5574721", "0.5555181", "0.5544609", "0.5543553", "0.55367863", "0.5533811", "0.5531881", "0.55152434", "0.5497819", "0.54888856", "0.5484321", "0.5482558", "0.5455399", "0.5425376", "0.5421357", "0.54190874", "0.5412192", "0.5410537", "0.5402909", "0.54027116", "0.5401958", "0.5400077", "0.5398702", "0.53965837", "0.5391951", "0.5333009", "0.5332474", "0.5322777", "0.53222775", "0.5301205", "0.5296941", "0.52924633", "0.52905595", "0.5283299", "0.5277657", "0.5259238", "0.52588475", "0.5258396", "0.525408", "0.5253431", "0.52466667", "0.5234141", "0.52199984", "0.5219065", "0.52189636", "0.5218601", "0.52155954", "0.5211261", "0.5195889", "0.51956815", "0.51950794", "0.51906896", "0.51890427", "0.51889604", "0.5185694", "0.51819825", "0.5179651", "0.51780105", "0.51762766", "0.51752347", "0.5175107", "0.5167087", "0.5165039", "0.5158379", "0.5153883", "0.51504064", "0.5150121", "0.5147871", "0.5133134", "0.51289976", "0.5128463", "0.5126852", "0.51261914", "0.5124328", "0.5124289", "0.5120007", "0.51171756", "0.5104976", "0.51047474", "0.5091855", "0.509054", "0.5089771" ]
0.821599
0
Method................................................adduserID Author......................................................JLH This method adds the automatically incremented int, user_ID, from the user table to the credentials table Return Value (Void)
public static synchronized void addUserID(int user_ID, int cred_ID){ Connection connection; String preparedSQL = "Update credential Set User_ID = ? Where Credentials_ID = ?"; PreparedStatement statement=null; try{ connection=DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setInt(1, user_ID); statement.setInt(2, cred_ID); statement.executeUpdate(); statement.close(); connection.close(); }catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Integer registerUser(User user) throws SQLException, ClassNotFoundException, IOException \r\n\t{\r\n\t\t//Declare all variables\r\n\t\t//Create Connection, PreparedStatement, and ResultSet Objects and\r\n\t\t//initialize to null. Create an OracleConnection Object with Java default Constructor.\r\n\t\tConnection conn = null;\t\t\t\r\n\t\tPreparedStatement stmt = null;\t\r\n\t\tResultSet rs = null;\t\t\t\r\n\t\tOracleConnection orcl= new OracleConnection();\t\r\n\t\t\r\n\t\t// Assign query statement (SQL) to String variable\r\n\t\tString insertString = \"insert into users (user_name, password, admin_role) values (?,?,?)\";\r\n\t\t\r\n\t\t//Assign column id value to String array for auto generated keys\r\n\t\tString[] COL = {\"user_id\"};\r\n\t\tint ID = -1;\r\n\t \r\n\t\t//Assign value to Connection Object using getConnection\r\n\t\t//method from OracleConnection Class.\r\n\t conn = orcl.getConnection(); \r\n\t\tSystem.out.println(\"DATABASE CONNECTION ESTABLISHED\");\r\n\t \r\n\t try\r\n\t\t{\r\n\t \t//Initialize Statement Object with passing of query and column id \r\n\t \t//Initialize Statement Object with column index and value to be inserted into the column\r\n\t stmt = conn.prepareStatement(insertString, COL);\r\n\t \r\n\t stmt.setString(1, user.getUserName());\r\n\t stmt.setString(2, user.getPassword());\r\n\t stmt.setString(3, user.getAdminRole());\r\n\t \r\n\t //Execute query\r\n\t stmt.executeUpdate();\r\n\t \r\n\t //Assign returned values to ResultSet Object.\r\n\t rs = stmt.getGeneratedKeys();\r\n\t if(rs != null && rs.next()) \r\n\t {\r\n\t ID = rs.getInt(1);\r\n\t user.setUserId(ID);\r\n\t System.out.println(\"The user has been registered as USER ID#: \"+ID);\r\n\t }\r\n\t }\r\n\t catch (SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t//Close all database access Objects\r\n\t\t\tif (rs != null) \r\n\t\t\t{\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\tif (stmt != null) \r\n\t\t\t{\r\n\t\t\t\tstmt.close();\r\n\t\t\t}\r\n\t\t\tif (conn != null) \r\n\t\t\t{\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n\t\treturn ID;\r\n\t}", "public ResultSet adduser(String firstname, String lastname, String username,\r\n\t\tString password, String address, String city, String eMail, Long phone,\r\n\t\tString security, String answer, String dob,\r\n\t\tLong pincode)throws SQLException {\n\tLong logid=null;\r\n\tint i=DbConnect.getStatement().executeUpdate(\"insert into login values(login_seq.nextval,'\"+username+\"'||username_seq.nextval,'\"+password+\"','not approved','user','\"+security+\"','\"+answer+\"') \");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"insert into customer values(user_seq.nextval,'\"+firstname+\"','\"+lastname+\"','\"+city+\"','\"+eMail+\"',\"+phone+\",'\"+dob+\"',sysdate,\"+pincode+\",login_seq.nextval-1,'\"+address+\"')\");\r\n\tResultSet rss=DbConnect.getStatement().executeQuery(\"select login_seq.nextval-2 from dual\");\r\n\tif(rss.next())\r\n\t{\r\n\t\tlogid=rss.getLong(1);\r\n\t}\r\n\trs=DbConnect.getStatement().executeQuery(\"select username from login where login_id=\"+logid+\"\");\r\n\treturn rs;\r\n}", "public long addUser(String userId, String uName, String uDOB, String uGen, String uContact, String uPassword, String privs, int donar ) throws SQLException {\n open();\n ContentValues values = new ContentValues();\n values.put(Database.userId, userId);\n values.put(Database.uName, uName);\n values.put(Database.uDOB, uDOB);\n values.put(Database.uGender, uGen);\n values.put(Database.uContact, uContact);\n values.put(Database.uPassword, uPassword);\n values.put(Database.uPriviledge, privs);\n values.put(Database.uDonar, donar);\n long insertId = database.insert(Database.userTable, null,values);\n close();\n return insertId;\n }", "void addUserpan(String userid,String username,String userpwd);", "@Override\n\tpublic void addToUserAccountTable(int accountId,String username) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString insertQuery = \"insert into user_account values(?, ?)\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(insertQuery);\n \n\t\t\tprepStmt.setString(1, username);\n\t\t\tprepStmt.setInt(2, accountId);\n\t\t\tprepStmt.executeUpdate();\n\t}", "private void addUser(int userID)\n\t{\n\t\tfor(int i=0;i<userIDs.size();i++)\n\t\t{\n\t\t\tif(userIDs.get(i)==userID)\n\t\t\t{\n\t\t\t\tisUserIDAssociatedWithSetInDatabase.set(i, false);//this will need to be updated\n\t\t\t\tthis.userCount.set(i, userCount.get(i)+1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tisUserIDAssociatedWithSetInDatabase.add(false);\n\t\tuserIDs.add(userID);\n\t\tthis.userCount.add(1);\n\t}", "public static int addUser(String token, String email, String pass, String userName)\n\t\t\tthrows SQLException, ClassNotFoundException {\n\t\tString sql = \"INSERT INTO `RubykoDb`.`user` (`password`, `email`, `token`, `name`, `createTime`) VALUES ('111', '11', '11', '1', '1');\";\n\t\ttry (Connection conn = Database.getInstance().connect();\n\t\t\t\tPreparedStatement statement = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);) {\n\n\t\t\tint affectedRows = statement.executeUpdate();\n\t\t\tif (affectedRows == 0) {\n\t\t\t\tthrow new SQLException(\"Creating user failed, no rows affected.\");\n\t\t\t}\n\n\t\t\ttry (ResultSet generatedKeys = statement.getGeneratedKeys()) {\n\t\t\t\tif (generatedKeys.next()) {\n\t\t\t\t\treturn generatedKeys.getInt(1);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new SQLException(\"Creating user failed, no ID obtained.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void addUser() throws NoSuchAlgorithmException\r\n\t{\r\n\t\tSystem.out.print(\"Create a user ID: \");\r\n\t\tString userIDinput = scan.next();\r\n\t\tSystem.out.print(\"Create a password: \");\r\n\t\tmakePassword(userIDinput, scan.next());\r\n\t}", "public static void trackerUserAdd(long id) throws TwitterException, ClassNotFoundException, SQLException{\n\t\tClass.forName(\"org.h2.Driver\");\n\t\tConnection conn = DriverManager.getConnection(DB, user, pass);\n\t\t\n\t\tif(!(DB_Interface.exist_User(id, conn))){\n\t\t\tDB_Interface.insertUser(conn, OAuth.authenticate().showUser(id));\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"User already exists in database\");\n\t\t}\n\t\t\n\t}", "public int insertUser(UUID userId,User user) {\n\t\treturn 1;\n\t\t\n\t}", "public int addUser(HttpServletRequest request) {\n\t\tHashMap<String, Object> parameters = buildUserInsertCondition(request);\n\n\t\tSimpleJdbcInsert insert = new SimpleJdbcInsert(jt).withTableName(\"sys_user\").usingGeneratedKeyColumns(\"userId\");\n\n\t\tNumber id = insert.executeAndReturnKey(parameters);\n\n\t\tint pk = id.intValue();\n\n\t\treturn pk;\n\t}", "void addRoleToUser(int userID,int roleID);", "void addNewUser(User user, int roleId) throws DAOException;", "public static void addUser(String newUsername, String newPassword, String newFullname) {\n //local database variables\n Statement stmt = null;\n ResultSet rs = null;\n //defaulting highest id to 0\n //before new user can be added, application must know what is the curent highest id\n int highestId = 0;\n //nested query to retrieve user detials with the highest id\n String searchQuery = \"select * from users where UserId = (select max(UserId) from users)\";\n //displaying the query as a control\n System.out.println(\"Query: \" + searchQuery);\n\n try {\n //connect to DB \n currentCon = ConnectionManager.getConnection();\n stmt = currentCon.createStatement();\n rs = stmt.executeQuery(searchQuery);\n //if at least one user is present in the database,\n //result set will not be empty\n boolean more = rs.next();\n //if user found\n if (more) {\n //assigning the user id to the highest value +1\n highestId = rs.getInt(\"UserId\") + 1;\n System.out.println(\"Current highest id \" + highestId);\n //if no user found in the db, first id must be set to 1\n } else {\n highestId = 1;\n }\n\n }\n //catching exception if any and displaying the error stack trace\n catch (Exception ex) {\n System.out.println(\"An Exception has occurred! \" + ex);\n }\n //some exception handling\n //cloaing the connection\n finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (Exception e) {\n }\n rs = null;\n }\n\n if (stmt != null) {\n try {\n stmt.close();\n } catch (Exception e) {\n }\n stmt = null;\n }\n\n if (currentCon != null) {\n try {\n currentCon.close();\n } catch (Exception e) {\n }\n\n currentCon = null;\n }\n }\n //preparing some objects for connection \n Statement stmt2 = null;\n //since the next user's id was found\n //new user can be persisted with the username, password, and fullname passed to\n //the user controller form the web form\n //greeting will be set to the default value for each new user\n String insertQuery =\n \"insert into users values ('\" + highestId + \"','\" + newUsername + \"','\" + newPassword + \"','\" + newFullname\n + \"','This is the default greeting')\";\n //displaying the query\n System.out.println(\"Query: \" + insertQuery);\n\n try {\n //connect to DB \n currentCon = ConnectionManager.getConnection();\n stmt2 = currentCon.createStatement();\n //executing query\n stmt2.executeUpdate(insertQuery);\n\n }\n //catching exception if any\n catch (Exception ex) {\n System.out.println(\"An Exception has occurred! \" + ex);\n }\n\n //some exception handling\n //closing the databse connection\n finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (Exception e) {\n }\n rs = null;\n }\n\n if (stmt != null) {\n try {\n stmt.close();\n } catch (Exception e) {\n }\n stmt = null;\n }\n\n if (currentCon != null) {\n try {\n currentCon.close();\n } catch (Exception e) {\n }\n\n currentCon = null;\n }\n }\n }", "public void addUserCredentials(String login, String password) throws SQLException;", "public static int register(String username, String password, int avatarNum){\n try {\n Statement st = conn.createStatement();\n ResultSet largestId = st.executeQuery(\"select max(userid) from users\");\n largestId.next();\n int thisId = Integer.parseInt(largestId.getString(1))+1;\n String encryptedPwd = encrypt(password);\n\n String insertUserCommand = String.format(\"INSERT INTO users(userid, username, password, avatarnum) VALUES(%d, '{%s}','{%s}',%d)\",thisId,username,encryptedPwd,avatarNum);\n st.executeUpdate(insertUserCommand);\n largestId.close();\n st.close();\n return thisId;\n }catch (SQLException e){\n return SERVER_FAILURE;\n }\n\n }", "public void newUserAdded(String userID);", "public void addUser(){\r\n //gets entered username and password\r\n String user = signup.getUsername();\r\n String pass = signup.getFirstPassword();\r\n try{\r\n \r\n //connects to database\r\n \r\n //creates statement\r\n Connection myConn = DriverManager.getConnection(Main.URL);\r\n //adds username and password into database\r\n PreparedStatement myStmt = myConn.prepareStatement(\"insert into LISTOFUSERS(USERNAME, PASSWORD)values(?,?)\");\r\n myStmt.setString(1,user);\r\n myStmt.setString(2,pass);\r\n int a = myStmt.executeUpdate();\r\n \r\n if(a>0){\r\n System.out.println(\"Row Update\");\r\n }\r\n myConn.close();\r\n } catch (Exception e){\r\n System.err.println(e.getMessage());\r\n }\r\n }", "boolean addUser(int employeeId, String name, String password, String role);", "void add(User user) throws SQLException;", "private void addUser(){\r\n\t\ttry{\r\n\t\t\tSystem.out.println(\"Adding a new user\");\r\n\r\n\t\t\tfor(int i = 0; i < commandList.size(); i++){//go through command list\r\n\t\t\t\tSystem.out.print(commandList.get(i) + \"\\t\");//print out the command and params\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\r\n\t\t\t//build SQL statement\r\n\t\t\tString sqlCmd = \"INSERT INTO users VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(4) + \"', '\" + commandList.get(5) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(6) + \"');\";\r\n\t\t\tSystem.out.println(\"sending command:\" + sqlCmd);//print SQL command to console\r\n\t\t\tstmt.executeUpdate(sqlCmd);//send command\r\n\r\n\t\t} catch(SQLException se){\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\terror = true;\r\n\t\t\tse.printStackTrace();\r\n\t\t\tout.println(se.getMessage());//return error message\r\n\t\t} catch(Exception e){\r\n\t\t\t//general error case, Class.forName\r\n\t\t\terror = true;\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());\r\n\t\t} \r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");//end try\r\n\t}", "public int insertUser(final User user);", "public int insertId(user user1)\n\t\t{\n\t\t\t\n\t\t\ttry {\n\t\t\t//\tString sql = \"INSERT INTO `employee`(`Eid`,`EmployeeName`, `Salary`, `email`) VALUES (102,'Zoeya Afreen',19000,'zoeya@gmail.com')\";\n\t\t//\t String X = \"VALUES (\"+ user1.name +\",'\"+user1.password+\"','\"+user1.email+\"')\";\n\t\t\t\tString sql = \"INSERT INTO `access`(`userid`,`password`, `email`) VALUES (?,?,?)\" ;\n\t\t\t\tpStmt = con.prepareStatement(sql);\n\t\t\t\tpStmt.setString(1, user1.name);\n\t\t\t\tpStmt.setString(2, user1.password);\n\t\t\t\tpStmt.setString(3, user1.email);\n\t\t\t\tSystem.out.println(\"Inside inset Method\");\n\t\t\t//\tstmt = con.createStatement(); \t\t\n\t\t\t\tint i = pStmt.executeUpdate();\t\t\n\t\t\t\tif (i>=0) {\n\t\t\t\tSystem.out.println(\"<<succesfully Registered\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"<<Some issues during Registration \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(\"Some error \"+e);\n\t\t\t}\n\t\t\tSystem.out.println(\"Value of return code i :\" +i);\n\t\t\treturn i;\n\t\t}", "public void addUser(String userId) {\n addUser(new IndividualUser(userId));\n }", "public long addEmptyUser() throws DBException {\n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tconn = factory.getConnection();\n\t\t\tps = conn.prepareStatement(\"INSERT INTO users(id) VALUES(NULL)\");\n\t\t\tps.executeUpdate();\n\t\t\tlong a = DBUtil.getLastInsert(conn);\n\t\t\tps.close();\n\t\t\treturn a;\n\t\t} catch (SQLException | NamingException e) {\n\t\t\tthrow new DBException(e);\n\t\t} finally {\n\t\t\tDBUtil.closeConnection(conn, ps);\n\t\t}\n\t}", "public int add(Userinfo user) {\n\t\treturn userDAO.AddUser(user);\r\n\t}", "public void insertUser() {}", "public void addUser(String username, String password) {\n\t\t// Connect to database\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\t\n\t\t// Create new entry\n\t\tString newEntryString = \"INSERT INTO User (username, password, winNum, loseNum) VALUES (?, ?, 0, 0)\";\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(newEntryString);\n\t\t\tps.setString(1, username);\n\t\t\tps.setString(2, password);\n\t\t\tps.executeUpdate();\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\t// Close connections\n\t\t\ttry {\n\t\t\t\tif(rs != null)\n\t\t\t\t{\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null)\n\t\t\t\t{\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(SQLException sqle)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sqle: \" + sqle.getMessage());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public long addUser(User user) {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tlong id = (long) session.save(user);\n\t\tsession.getTransaction().commit();\n\t\tsession.close();\n\t\t\n\t\treturn id;\n\t\t\n\t}", "public void addAccount(String user, String password);", "public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}", "public static synchronized int addCred(Credentials cred){\n\t\t\tint status=0;\t\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"INSERT INTO credential (Email, Pass, User_ID, Role, \" +\n\t\t\t\t\t\"Validated, RegKey) VALUES(?,?,?,?,?,?) \";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\n\t\t\t\tstatement.setString(1, cred.getEmail());\n\t\t\t\tstatement.setString(2, cred.getPass());\n\t\t\t\tstatement.setInt(3, cred.getUserID());\n\t\t\t\tstatement.setString(4, cred.getRole());\n\t\t\t\tstatement.setInt(5, cred.getValid());\n\t\t\t\tstatement.setString(6, cred.getRegKey());\n\t\t\t\tstatus = statement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\n\t\t\treturn status;\n\t}", "@Override\n public void insertUser(User user, String userType) {\n\n int userRoleId = insertUserRole(userType);\n\n try(Connection conn = DriverManager.getConnection(URL, USERNAME, PASSWORD)){\n\n String sql = \"INSERT INTO ers_users(ers_username, ers_password, user_first_name, user_last_time, user_email, user_role_id) \" +\n \"VALUES (?, ?, ?, ?, ?, ?);\";\n\n PreparedStatement ps = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, user.getUsername());//the 1st \"?\"\n ps.setString(2, user.getPassword());\n ps.setString(3, user.getFirstName());\n ps.setString(4, user.getLastName());\n ps.setString(5, user.getEmail());\n ps.setInt(6, userRoleId);\n\n ps.executeUpdate();\n\n //PRINTING THE PRIMARY KEY\n ResultSet rs = ps.getGeneratedKeys();\n if (rs.next()) {\n System.out.println(\"The returned PK: \"+ rs.getInt(\"ers_user_id\"));\n }\n\n }catch(SQLException e){\n e.printStackTrace();\n }\n }", "public long addUser(User user) {\n \t\tContentValues temp = new ContentValues();\n \n \t\ttemp.put(USER_COLUMN_USERNAME, user.getUserName());\n \t\ttemp.put(USER_COLUMN_USERID, user.getId());\n \t\ttemp.put(USER_COLUMN_IMGURL, user.getProfileImageURL());\n \t\ttemp.put(USER_COLUMN_SOURCE, \"Twitter\");\n \t\t// TODO implement source on user?\n \n \t\tlong userID = db.insert(TABLE_USER, null, temp);\n \t\treturn userID;\n \t}", "void addUser(String uid, String firstname, String lastname, String pseudo);", "public void setUser1X_ID (int User1X_ID);", "public long getUserID() {\n //userID++;\n return userID++;\n }", "@Override\n\tpublic Integer insertUserIntoUsersTable(final String username, final String password) \n\t{\n\t\treturn executeTransaction(new Transaction<Integer>() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic Integer execute(Connection conn) throws SQLException \n\t\t\t{\n\t\t\t\tPreparedStatement stmt1 = null;\n\t\t\t\tPreparedStatement stmt2 = null; \n\t\t\t\tPreparedStatement stmt3 = null; \t\n\t\t\t\t\n\t\t\t\tResultSet resultSet1 = null;\t\n\t\t\t\tResultSet resultSet3 = null; \n\t\t\t\t\n\t\t\t\t// for saving user ID\n\t\t\t\tInteger user_id = -1;\n\t\t\t\t\n\t\t\t\t// try to retrieve user_ID (if it exists) from DB, for username passed into query\n\t\t\t\ttry {\n\t\t\t\t\tstmt1 = conn.prepareStatement(\n\t\t\t\t\t\t\t\"select user_id from users \" +\n\t\t\t\t\t\t\t\" where username = ? \"\n\t\t\t\t\t);\n\t\t\t\t\tstmt1.setString(1, username);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// execute the query, get the result\n\t\t\t\t\tresultSet1 = stmt1.executeQuery();\n\n\t\t\t\t\t\n\t\t\t\t\t// if user was found then inform the user \t\t\t\t\t\n\t\t\t\t\tif (resultSet1.next())\n\t\t\t\t\t{\n\t\t\t\t\t\tuser_id = -1; \n\t\t\t\t\t\tSystem.out.println(\"Username already taken\");\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Creating new user\");\n\t\t\t\t\n\t\t\t\t\t\t// insert new user\n\t\t\t\t\t\tif (user_id <= 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// prepare SQL insert statement to add user to users table\n\t\t\t\t\t\t\tstmt2 = conn.prepareStatement(\n\t\t\t\t\t\t\t\t\t\"insert into users (username, password) \" +\n\t\t\t\t\t\t\t\t\t\" values(?, ?) \"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tstmt2.setString(1, username);\n\t\t\t\t\t\t\tstmt2.setString(2, password);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// execute the update\n\t\t\t\t\t\t\tstmt2.executeUpdate();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//Get the new user's id\n\t\t\t\t\t\t\tstmt3 = conn.prepareStatement(\n\t\t\t\t\t\t\t\t\t\"select user_id from users \" +\n\t\t\t\t\t\t\t\t\t\t\t\" where username = ? \"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tstmt3.setString(1, username);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//execute query and get result\n\t\t\t\t\t\t\tresultSet3 = stmt3.executeQuery(); \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//should only be one value \n\t\t\t\t\t\t\tresultSet3.next(); \n\t\t\t\t\t\t\tuser_id = resultSet3.getInt(1); \n\t\t\t\t\t\t\tSystem.out.println(\"New user added\");\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\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\treturn user_id;\n\t\t\t\t} \n\t\t\t\tfinally \n\t\t\t\t{\n\t\t\t\t\tDBUtil.closeQuietly(resultSet1);\n\t\t\t\t\tDBUtil.closeQuietly(stmt1);\n\t\t\t\t\tDBUtil.closeQuietly(stmt2);\t\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public void setUser1_ID (int User1_ID);", "public void setUser1_ID (int User1_ID);", "public boolean add_user_insert(AddUser addUsers)\n\t{\n\t\tAddUser addUser=(AddUser) addUsers;\n\t\tboolean flag=false;\n\t\tConnection conn = null;\n\t\tStatement stmt = null;\n\t\tResultSet rs=null;\n\t\tconn = (Connection) DBConnection.getConnection();\n\t\tString emp_category_id = null;\n\t\tString emp_category=addUser.getEmpCategory();\n\t\tInetAddress ip;\n\t\tDateFormat dateFormat=new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tDate date = new Date();\n\t\tRandom rnd=new Random();\n\t\tint emp_id=rnd.nextInt(Integer.MAX_VALUE)+1;\n\t\tString way2sms_username,way2sms_password;\n\t\tWay2Sms way2Sms=new Way2Sms();\n\t\tString phone=addUser.getPhone();\n\t\tif(conn != null){\n\t\t\t \n\t\t\ttry {\n\t\t\t\tip=InetAddress.getLocalHost();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(emp_category.equals(\"Client\"))\n\t\t\t\t{\n\t\t\t\t\temp_category_id=\"cln\" + emp_id;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(emp_category.equals(\"Employee\"))\n\t\t\t\t{\n\t\t\t\t\temp_category_id=\"emp\" + emp_id;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(emp_category.equals(\"Manager\"))\n\t\t\t\t{\n\t\t\t\t\temp_category_id=\"mng\" + emp_id;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(emp_category.equals(\"Project Manager\"))\n\t\t\t\t{\n\t\t\t\t\temp_category_id=\"pmng\" + emp_id;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tstmt = conn.createStatement();\n\t\t\t\tStringBuffer insertSQL = new StringBuffer(\"insert into emp_user_id_generator values('\"+ emp_category_id +\"','\"+emp_category+\"','0','\"+ ip.getHostAddress() +\"','\"+ dateFormat.format(date) +\"')\");\n\t\t\t\tStringBuffer selectSQL= new StringBuffer(\"select way2sms_user_name,way2sms_password from sms_authentication where user_name='Admin'\");\n\t\t\t\tstmt.executeUpdate(insertSQL.toString());\n\t\t\t\trs=stmt.executeQuery(selectSQL.toString());\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tway2sms_username=rs.getString(\"way2sms_user_name\");\n\t\t\t\t\tway2sms_password=rs.getString(\"way2sms_password\");\n\t\t\t\t\tway2Sms.test(\"site\",phone,\"Your Employee ID is:\"+emp_category_id,way2sms_username,way2sms_password);\n\t\t\t\t}\n\t\t\t\tflag=true;\n\t\t\t\t\n\t\t\t\t\n\t\t\t} \n\t\t\n\t\t\tcatch (SQLException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (UnknownHostException 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\t\n\t\telse\t{\n\t\t\tflag=false;\n\t\t}\n\t\t\n\t\n\t\treturn flag;\n\t}", "public Integer addUser(String username, String password, String email) {\n System.out.println(\"addUser()\" + username);\n Session session = HibernateSessionFactory.getSessionFactory().openSession();\n Transaction tx = null;\n Integer userID = null;\n try {\n tx = session.beginTransaction();\n User user = new User();\n user.setUsername(username);\n user.setPassword(password);\n user.setEmail(email);\n user.setEnabled(\"1\");\n userID = (Integer) session.save(user);\n\n Role role = new Role();\n role.setUsername(username);\n role.setRole(\"ROLE_USER\");\n session.save(role);\n\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n return userID;\n }", "void addUser(String page, String userId, String uid);", "public void addUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tSystem.out.print(\"Please enter your username: \");\r\n\t\tString username=sc.nextLine();\r\n\t\tusername=username.trim();\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter your password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter your password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tSystem.out.print(\"Please enter your full name: \");\r\n\t\tString fullname=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your email address: \");\r\n\t\tString email=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your Phone number: \");\r\n\t\tlong phone_number=sc.nextLong();\r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(username,hash_password,fullname,email,phone_number,0,last_login,false));\r\n\t\tSystem.out.println(\"Record added successfully!\");\r\n\t}", "public static boolean addUser(UserDetailspojo user) throws SQLException {\n Connection conn=DBConnection.getConnection();\n String qry=\"insert into users1 values(?,?,?,?,?)\";\n System.out.println(user);\n PreparedStatement ps=conn.prepareStatement(qry);\n ps.setString(1,user.getUserid());\n ps.setString(4,user.getPassword());\n ps.setString(5,user.getUserType());\n ps.setString(3,user.getEmpid());\n ps.setString(2,user.getUserName());\n //ResultSet rs=ps.executeQuery();\n int rs=ps.executeUpdate();\n return rs==1;\n //String username=null;\n }", "public static int inserUser(User user) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n \n int count;\n \n String rowNum = \"SELECT COUNT(*) FROM auttc_users.users \";\n String query = \"INSERT INTO auttc_users.users (user_id, username, email, password, admin) \"\n + \"VALUES (?, ?, ?, ?, ?)\";\n \n try{\n //get row count\n ps = connection.prepareStatement(rowNum);\n rs = ps.executeQuery();\n if (rs.next()) {\n count = rs.getInt(1);\n System.out.println(count);\n } else {\n count = 0;\n }\n \n //insert new user\n ps = connection.prepareStatement(query);\n ps.setInt(1, count + 1);\n ps.setString(2, user.getUsername());\n ps.setString(3, user.getEmail());\n ps.setString(4, user.getPassword());\n ps.setInt(5, 0);\n \n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "@Override\n\t@Transactional\n\tpublic int addUser(User user) {\n\t\t// Add record to user table\n\t\tSimpleJdbcInsert empInsert = new SimpleJdbcInsert(this.dataSource).withTableName(\"user\")\n\t\t\t\t.usingGeneratedKeyColumns(\"USER_ID\");\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tPasswordEncoder encoder = new BCryptPasswordEncoder();\n\t\tString hashPass = encoder.encode(user.getPassword());\n\t\tparams.put(\"NAME\", WordUtils.capitalizeFully(user.getName()));\n\t\tparams.put(\"USERNAME\", user.getUsername().toLowerCase());\n\t\tparams.put(\"PASSWORD\", hashPass);\n\t\tparams.put(\"ACTIVE\", true);\n\t\tparams.put(\"EXPIRED\", false);\n\t\tparams.put(\"EXPIRES_ON\", DateUtils.getOffsetFromCurrentDateObject(DateUtils.IST, 60));\n\t\tparams.put(\"FAILED_ATTEMPTS\", 0);\n\t\tCustomUserDetails curUser = ((CustomUserDetails) SecurityContextHolder.getContext().getAuthentication()\n\t\t\t\t.getPrincipal());\n\t\tif (curUser.hasBusinessFunction(\"ROLE_BF_OUTSIDE_ACCESS\")) {\n\t\t\tparams.put(\"OUTSIDE_ACCESS\", user.isOutsideAccess());\n\t\t} else {\n\t\t\tparams.put(\"OUTSIDE_ACCESS\", false);\n\t\t}\n\t\tparams.put(\"CREATED_BY\", curUser.getUserId());\n\t\tparams.put(\"LAST_MODIFIED_BY\", curUser.getUserId());\n\t\tDate dt = DateUtils.getCurrentDateObject(DateUtils.IST);\n\t\tparams.put(\"CREATED_DATE\", dt);\n\t\tparams.put(\"LAST_MODIFIED_DATE\", dt);\n\n\t\tint userId = 0;\n\t\ttry {\n\t\t\tuserId = empInsert.executeAndReturnKey(params).intValue();\n\t\t} catch (Exception m) {\n\t\t\treturn userId;\n\t\t}\n\t\tparams.clear();\n\t\t// add record to user_role table\n\t\tString sqlString = \"INSERT INTO user_role (USER_ID, ROLE_ID) VALUES(:userId, :roleId)\";\n\t\tparams.put(\"userId\", userId);\n\t\tparams.put(\"roleId\", user.getRole().getRoleId());\n\t\tthis.namedParameterJdbcTemplate.update(sqlString, params);\n\t\treturn userId;\n\t}", "public void addUser(String uid) {\r\n\t\tSQLiteDatabase db = this.getWritableDatabase();\r\n\r\n\t\tContentValues values = new ContentValues();\r\n\t\tvalues.put(KEY_UID, uid); // user id\r\n\t\t\r\n\t\t// Inserting Row\r\n\t\tdb.insert(TABLE_USERS, null, values);\r\n\t\tdb.close(); // Closing database connection\r\n\t}", "public void addUserUI() throws IOException {\n System.out.println(\"Add user: id;surname;first name;username;password\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n User user = new User(a[1], a[2], a[3], a[4], \" \");\n user.setId(Long.parseLong(a[0]));\n try\n {\n User newUser = service.addUser(user);\n if(newUser != null)\n System.out.println(\"ID already exists for \" + user.toString());\n else\n System.out.println(\"User added successfully!\");\n }\n catch (ValidationException ex)\n {\n System.out.println(ex.getMessage());\n }\n catch (IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "public void setUser1W_ID (int User1W_ID);", "@Override\n\tpublic int addUser(TbUser user) {\n\t\treturn new userDaoImpl().addUser(user);\n\t}", "public void addToUsers(Users users) {\n Connection connection = connectionDB.openConnection();\n PreparedStatement preparedStatement;\n try {\n preparedStatement = connection.prepareStatement(WP_USERS_ADD_USER);\n preparedStatement.setString(1, users.getUser_login());\n preparedStatement.setString(2, users.getUser_pass());\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n connectionDB.closeConnection(connection);\n }\n }", "public Integer registerUser(User user) throws SQLException, ClassNotFoundException, IOException {\n\t\t\t// Declare variables\n\t\t\tConnection conn = null;\n\t\t\tPreparedStatement stmt = null;\n\t\t\tResultSet rs = null;\n\t\t\t\n\t\t\t// Assign insert statement string to variable\n\t\t\tString insertString = \"insert into User (name, password,Javascore, sqlscore) values (?,?,?,?)\";\n\t\t\t\n\t\t int ID = -1;\n\t\t String[] COL = {\"Userid\"};\n\t\t \n\t\t DatabaseConnection mysql = new DatabaseConnection();\n\t\t \n\t\t try\n\t\t {\n\t\t conn = mysql.getConnection();\n\t\t stmt = conn.prepareStatement(insertString, COL);\n\t\t \n\t\t stmt.setString(1, user.getName());\n\t\t stmt.setString(2, user.getPassword());\n\t\t stmt.setDouble(3, user.getJavaScore());\n\t\t stmt.setDouble(4, user.getSqlScore());\n\t\t \n\t\t stmt.executeUpdate();\n\t\t \n\t\t rs = stmt.getGeneratedKeys();\n\t\t if(rs != null && rs.next()) {\n\t\t ID = rs.getInt(1);\n\t\t }\n\t\t System.out.println(ID);\n\t\t }\n\t\t catch (SQLException e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t\t}\n\t\t\tfinally\n\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 (stmt != null) {\n\t\t\t\t\tstmt.close();\n\t\t\t\t}\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t}\n\t\t \n\t\t\treturn ID;\n\t\t}", "public Long insert(User object) throws DaoException {\n long id = 0;\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n try {\n connection = dataSourceUtils.getConnection(dataSource);\n preparedStatement = connection.prepareStatement(INSERT_USER);\n\n preparedStatement.setString(1, object.getUserName());\n preparedStatement.setString(2, object.getLogin());\n preparedStatement.setString(3, object.getPassword());\n preparedStatement.executeUpdate();\n\n ResultSet resultSet = preparedStatement.getGeneratedKeys();\n if (resultSet.next()) {\n id = resultSet.getLong(1);\n object.setUserId(id);\n }\n } catch (SQLException e) {\n throw new DaoException(e);\n } finally {\n DataSourceUtils.releaseConnection(connection, dataSource);\n try {\n preparedStatement.close();\n } catch (SQLException e) {\n LOGGER.error(e);\n }\n }\n return id;\n }", "public void addUser() {\n\t\tthis.users++;\n\t}", "public int addNewUser(ConnectionHandler<T> connection) {\n activeUsers.put(Integer.valueOf(increaseId()), connection);\n return userId -1;\n }", "public Integer addUser(User u) {\n\n //the new User's id\n Integer id = null;\n\n Session session = ConnectionFactory.getInstance().getSession();\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n session.save(u);\n tx.commit();\n\n id = u.getUserId();\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n return id;\n }", "public void addUser(String firstName, String lastName, String username, String password, char type)\r\n\t{\r\n\t\tdb.user_addUser(firstName, lastName, username, password, type);\t\r\n\t}", "public void addUser(User user) {\n\t\t\r\n\t}", "public static int registerUser(Register reg) throws SQLException {\n\t\tint i =0;\r\n\t\tConnection con = connect();\r\n\t\tSystem.out.println(\"Reached DAOMvc\"+reg.getLastname());\r\n\t\tString sql = \"insert into registeruser\"+\r\n\t\t\"(userid,firstname,lastname,age,address,username,password,role,emailid)\"+\r\n\t\t\" values(userid_seq.nextval,?,?,?,?,?,?,?,?)\";\r\n\t\t\r\n\t\tPreparedStatement stmt = con.prepareStatement(sql);\t\t\r\n\t\tstmt.setString(1,reg.getFirstname());\r\n\t\tstmt.setString(2,reg.getLastname());\r\n\t\tstmt.setInt(3,reg.getAge());\r\n\t\tstmt.setString(4,reg.getAddress());\r\n\t\tstmt.setString(5,reg.getUsername());\r\n\t\tstmt.setString(6,reg.getPassword());\r\n\t\tstmt.setInt(7,reg.getRole());\r\n\t\tstmt.setString(8,reg.getEmail());\t\t\r\n\t\ti=stmt.executeUpdate();\r\n\t\t\r\n\t\treturn i;\r\n\t}", "@Override\n\tpublic int insertUser(String username, String password) {\n\t\treturn userMapper.insertUser(username, password);\n\t}", "public void addUser(User user){\n loginDAO.saveUser(user.getId(),user.getName(),user.getPassword());\n }", "private void addNewUser() throws Exception, UnitException {\n String firstNameInput = firstName.getText();\n String lastNameInput = lastName.getText();\n String unitInput = unitID.getText();\n String accountInput = accountTypeValue;\n String passwordInput = password.getText();\n User newUserInfo;\n\n // Create user type based on the commandbox input\n switch (accountInput) {\n case \"Employee\":\n newUserInfo = new Employee(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Lead\":\n newUserInfo = new Lead(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Admin\":\n newUserInfo = new Admin(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + accountInput);\n }\n\n // Try adding this new user information to the database, if successful will return success prompt\n try {\n Admin.addUserToDatabase(newUserInfo);\n\n // If successful, output message dialog\n String msg = \"New User \" + firstNameInput + \" \" + lastNameInput + \" with UserID \"\n + newUserInfo.returnUserID() + \" successfully created\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset Values\n firstName.setText(\"\");\n lastName.setText(\"\");\n unitID.setText(\"\");\n password.setText(\"\");\n } catch (UserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "void addUser(User user);", "void addUser(User user);", "public void addData(String User, String password) throws SQLException\n {\n }", "public int userAdd(User user) {\n\t\treturn userDao.userAdd(user);\r\n\t}", "public void addUser(String name,String password) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_USERNAME, name); // UserName\n values.put(KEY_PASSWORD,password);\n // Inserting Row\n long id = db.insert(TABLE_USER, null, values);\n //db.close(); // Closing database connection\n\n Log.d(TAG, \"New user inserted into sqlite: \" + id);\n }", "@Override\r\n\tpublic UserAccount add(UserAccount userAccount) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\tUserAccount ua = null;\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(Add, PreparedStatement.RETURN_GENERATED_KEYS);\r\n\t\t\tps.setInt(1, userAccount.getUser().getId());\r\n\t\t\tps.setInt(2, userAccount.getAccount().getId());\r\n\t\t\tps.setString(3, userAccount.getPassword());\r\n\t\t\tps.setInt(4, userAccount.getRole());\r\n\t\t\tint cnt = ps.executeUpdate();\r\n\t\t\tif (cnt > 0) {\r\n\t\t\t\tResultSet rs = ps.getGeneratedKeys();\r\n\t\t\t\tif (rs.next()) {\r\n\t\t\t\t\tua = get(rs.getInt(1));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn ua;\r\n\t}", "void addRealmToUserAccount(final String userId, final String realm);", "public void addUser(User user);", "public Long createAndStoreApplicationUser(ApplicationUser applicationUser, Long userID)\n throws ApplicationUserSaveException\n {\n \tLong returnValue = Long.valueOf(0);\n \n\t\ttry\n\t\t{\n returnValue = this.getApplicationUserDao().createAndStoreApplicationUser(applicationUser, userID);\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t throw new ApplicationUserSaveException(\"ApplicationUserEntityDataManager::createAndStoreApplicationUser\", ex);\n\t\t}\t\t\n\t\t\n\t\treturn returnValue;\n }", "public void addUser(String name, String email, String uid, String created_at,String address,String number) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, name); // Name\n values.put(KEY_EMAIL, email); // Email\n values.put(KEY_UID, uid); // Email\n values.put(KEY_CREATED_AT, created_at); // Created At\n values.put(KEY_ADDRESS, address);\n values.put(KEY_NUMBER, number);\n\n // Inserting Row\n long id = db.insert(TABLE_USER, null, values);\n db.close(); // Closing database connection\n\n Log.d(TAG, \"New user inserted into sqlite: \" + id);\n }", "public void updateUser(int uid, String name, String phone, String email, String password, int money, int credit);", "public boolean createUser(Connection con, String userid, String password, int access_code)\n throws SQLException, NoSuchAlgorithmException, UnsupportedEncodingException\n {\n PreparedStatement ps = null;\n try {\n if (userid != null && password != null && userid.length() <= 20){\n // Uses a secure Random not a simple Random\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\");\n // Salt generation 64 bits long\n byte[] bExtra = new byte[8];\n random.nextBytes(bExtra);\n // Digest computation\n byte[] bDigest = getHash(ITERATION_NUMBER,password,bExtra);\n String sDigest = byteToBase64(bDigest);\n String sSalt = byteToBase64(bExtra);\n\n ps = con.prepareStatement(\"insert into login (User_ID, password, access_code, extra) VALUES (?,?,?,?)\");\n ps.setString(1,userid);\n ps.setString(2,sDigest);\n ps.setInt(3,access_code);\n ps.setString(4, sSalt);\n ps.executeUpdate();\n return true;\n } else {\n return false;\n }\n } finally {\n close(ps);\n }\n }", "public void updateUser(long userID) {\n \t}", "@Override\n\tpublic int addUser(User_role user) throws Exception{\n\t\treturn userMapper.insertByUser(user);\n\t}", "public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }", "@Override\n public synchronized void addUser(String sessID, String user, char[] pass, UserLevel level) throws SQLException, SessionExpiredException {\n PooledConnection conn = ConnectionController.connectPooled(sessID);\n try {\n if (user.startsWith(DATABASE_USER_KEY_PREFIX)) {\n throw new SQLException(\"Can't create user \" + user + \" -- illegal username\");\n }\n // TODO: Transactions aren't supported for MyISAM, so this has no effect.\n conn.setAutoCommit(false);\n\n conn.executePreparedUpdate(\"CREATE USER ?@'%' IDENTIFIED BY ?\", user, new String(pass));\n grantPrivileges(sessID, user, level);\n conn.commit();\n } catch (SQLException sqlx) {\n conn.rollback();\n throw sqlx;\n } finally {\n for (int i = 0; i < pass.length; i++) {\n pass[i] = 0;\n }\n conn.setAutoCommit(true);\n conn.close();\n }\n }", "public void insertUser(Long userId) {\n\r\n\t\tTUserDetail detail = new TUserDetail();\r\n\t\tdetail.setUserId(userId);\r\n\t\tdetail.setSex(\"M\");\r\n\t\tdetail.setTel(10000);\r\n\t\tdetail.setLinkman(\"ZS\");\r\n\t\ttUserDetailMapper.insert(detail);\r\n\r\n\t\tTUser user = new TUser(userId);\r\n\t\tuser.setStatus(\"UNOK\");\r\n\t\tuser.setUserName(\"killer\");\r\n\t\ttUserMapper.insert(user);\r\n\t}", "public int insertUser(User newUser) {\r\n\r\n try {\r\n BusTrackerDB = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(\"username\", newUser.getUsername());\r\n values.put(\"password\", newUser.getPassword());\r\n\r\n BusTrackerDB.insert(\"user\", null, values);\r\n } catch (SQLiteException e) { return 0; }\r\n\r\n BusTrackerDB.close();\r\n\r\n return 1;\r\n }", "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}", "void setUserId(int newId) {\r\n\t\t\tuserId = newId;\r\n\t\t}", "public void setUserid(java.lang.String value) {\n this.userid = value;\n }", "@Override\n\tpublic void addNewUser(User user) {\n\t\tusersHashtable.put(user.getAccount(),user);\n\t}", "public void addUser(TIdentifiable user) {\r\n\t // make sure that the user doesn't exists already\r\n\t if (userExists(user)) return;\r\n\t \r\n\t // check to see if we need to expand the array:\r\n\t if (m_current_users_count == m_current_max_users) expandTable(2, 1);\t \r\n\t m_users.addID(user);\r\n\t m_current_users_count++;\r\n }", "public void addUser() {\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tframeManager.addUser(user);\r\n\t\t\tpesquisar();\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "public void Adduser(User u1) {\n\t\tUserDao ua=new UserDao();\n\t\tua.adduser(u1);\n\t\t\n\t}", "@Override\n\tpublic int AddUser(UserBean userbean) {\n\t\treturn 0;\n\t}", "public void addNewUser(String contextName, String userName) throws Exception {\n try {\n api.users.newUser(getContextId(contextName), userName);\n } catch (Exception e) {\n throw new UnicornZapException(\"Exception while adding new user: \" + userName + \" in context: \" + contextName);\n }\n }", "public int adduser(UserBean user) {\n\t\t// TODO Auto-generated method stub\n\t\tuser.setGrantedpermission(0);\n\t\tuser.setFirsttimelogin(1);\n\t\tuser.setStartdate(LocalDate.now().toString());\n\t\tuser.setUserpassword(\"Hello@123\");\n\t\tcrud1.save(user);\n\t\tValidateBean validate = new ValidateBean();\n\n\t\tvalidate.setId(user.getUserid());\n\n\t\tvalidate.setPassword(user.getUserpassword());\n\t\tvalidate.setRole(\"user\");\n\t\tcrud.save(validate);\n\t\treturn 1;\n\t}", "public static void insertUser(Context context, String userID, String fName,\r\n\t\t\tString lName, String email, String Pass) {\r\n\t\tContentValues cv = new ContentValues();\r\n\r\n\t\tcv.put(EquestDbHelper.USERID, userID);\r\n\t\tcv.put(EquestDbHelper.FIRSTNAME, fName);\r\n\t\tcv.put(EquestDbHelper.LASTNAME, lName);\r\n\t\tcv.put(EquestDbHelper.EMAILID, email);\r\n\t\tcv.put(EquestDbHelper.PASSWORD, Pass);\r\n\r\n\t\tUri contentUri = Uri.withAppendedPath(EquestProvider.CONTENT_URI,\r\n\t\t\t\tEquestDbHelper.USER_TABLE);\r\n\t\tcontext.getContentResolver().insert(contentUri, cv);\r\n\t}", "Integer addUser(ServiceUserEntity user);", "@Override\r\n\tpublic int register(User user) {\n\t\treturn dao.addUser(user);\r\n\t}", "public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}", "public static Task<Void> addUserToken(String userId, String token) {\n // add the token to the given user's document in the db\n return FirebaseFirestore.getInstance()\n .collection(Const.USERS_COLLECTION)\n .document(userId)\n .update(Const.USER_TOKEN_KEY, token);\n }", "public void addUser(SPUser user, String tableName) { // tar inn user-tabellen\n\t try {\n\t myCon.execute(\"INSERT INTO \"+tableName+\" VALUES ('\"+ user.getUsername() +\"', '\"+ user.getPassword()+\"');\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void addUser(User user) {\n \t\tuser.setId(userCounterIdCounter);\n \t\tusers.add(user);\n \t\tuserCounterIdCounter++;\n \t}", "public int add(User user) {\n\t\treturn this.userDao.insert(user);\r\n\t}", "@Override\n\tpublic int addUser(User user) {\n\t\treturn userDao.addUser(user);\n\t}" ]
[ "0.68619925", "0.6720332", "0.6718736", "0.6698456", "0.664699", "0.6644999", "0.66376126", "0.66239876", "0.66002107", "0.6556066", "0.6518526", "0.6465969", "0.6461448", "0.6450991", "0.6444548", "0.64348143", "0.6428008", "0.6426454", "0.6373275", "0.63607407", "0.633342", "0.6320722", "0.6276956", "0.6276455", "0.62715214", "0.6263382", "0.6252504", "0.62505895", "0.6247461", "0.62147915", "0.620154", "0.61908925", "0.6170231", "0.6169314", "0.6163196", "0.6156856", "0.6152277", "0.6137184", "0.6136126", "0.6136126", "0.6135224", "0.6123734", "0.611547", "0.6106508", "0.6095701", "0.6087942", "0.6071512", "0.60689855", "0.6060785", "0.6046015", "0.6043018", "0.60387194", "0.60219103", "0.60113674", "0.5981443", "0.5977291", "0.59771705", "0.5977017", "0.59764814", "0.5976481", "0.597362", "0.59636354", "0.596066", "0.5954114", "0.5954114", "0.5953943", "0.5948725", "0.5943056", "0.594248", "0.5940376", "0.59347874", "0.59332186", "0.5932966", "0.5927293", "0.5918582", "0.59156096", "0.590857", "0.5906455", "0.5905176", "0.5904637", "0.58995664", "0.5896832", "0.5887052", "0.5877836", "0.5877141", "0.5870873", "0.58674675", "0.5864539", "0.5860608", "0.5854551", "0.5852179", "0.5851081", "0.58428735", "0.584184", "0.5832158", "0.58243364", "0.58147836", "0.58135116", "0.58121395", "0.58112276" ]
0.7523964
0
Method................................................adduserID Author......................................................JLH This method adds the automatically incremented int, user_ID, from the user table to the credentials table Return Value (Void)
public static synchronized int modUser(int user_ID, String role, int valid){ Connection connection; int result =0; String preparedSQL = "Update credential Set Role = ?, Validated = ? Where User_ID = ?"; PreparedStatement statement=null; try{ connection=DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setString(1, role); statement.setInt(2, valid); statement.setInt(3, user_ID); result = statement.executeUpdate(); statement.close(); connection.close(); }catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static synchronized void addUserID(int user_ID, int cred_ID){\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"Update credential Set User_ID = ? Where Credentials_ID = ?\";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\t\t\n\t\t\t\tstatement.setInt(1, user_ID);\n\t\t\t\tstatement.setInt(2, cred_ID);\n\t\t\t\tstatement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t}", "@Override\r\n\tpublic Integer registerUser(User user) throws SQLException, ClassNotFoundException, IOException \r\n\t{\r\n\t\t//Declare all variables\r\n\t\t//Create Connection, PreparedStatement, and ResultSet Objects and\r\n\t\t//initialize to null. Create an OracleConnection Object with Java default Constructor.\r\n\t\tConnection conn = null;\t\t\t\r\n\t\tPreparedStatement stmt = null;\t\r\n\t\tResultSet rs = null;\t\t\t\r\n\t\tOracleConnection orcl= new OracleConnection();\t\r\n\t\t\r\n\t\t// Assign query statement (SQL) to String variable\r\n\t\tString insertString = \"insert into users (user_name, password, admin_role) values (?,?,?)\";\r\n\t\t\r\n\t\t//Assign column id value to String array for auto generated keys\r\n\t\tString[] COL = {\"user_id\"};\r\n\t\tint ID = -1;\r\n\t \r\n\t\t//Assign value to Connection Object using getConnection\r\n\t\t//method from OracleConnection Class.\r\n\t conn = orcl.getConnection(); \r\n\t\tSystem.out.println(\"DATABASE CONNECTION ESTABLISHED\");\r\n\t \r\n\t try\r\n\t\t{\r\n\t \t//Initialize Statement Object with passing of query and column id \r\n\t \t//Initialize Statement Object with column index and value to be inserted into the column\r\n\t stmt = conn.prepareStatement(insertString, COL);\r\n\t \r\n\t stmt.setString(1, user.getUserName());\r\n\t stmt.setString(2, user.getPassword());\r\n\t stmt.setString(3, user.getAdminRole());\r\n\t \r\n\t //Execute query\r\n\t stmt.executeUpdate();\r\n\t \r\n\t //Assign returned values to ResultSet Object.\r\n\t rs = stmt.getGeneratedKeys();\r\n\t if(rs != null && rs.next()) \r\n\t {\r\n\t ID = rs.getInt(1);\r\n\t user.setUserId(ID);\r\n\t System.out.println(\"The user has been registered as USER ID#: \"+ID);\r\n\t }\r\n\t }\r\n\t catch (SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t//Close all database access Objects\r\n\t\t\tif (rs != null) \r\n\t\t\t{\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\tif (stmt != null) \r\n\t\t\t{\r\n\t\t\t\tstmt.close();\r\n\t\t\t}\r\n\t\t\tif (conn != null) \r\n\t\t\t{\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n\t\treturn ID;\r\n\t}", "public ResultSet adduser(String firstname, String lastname, String username,\r\n\t\tString password, String address, String city, String eMail, Long phone,\r\n\t\tString security, String answer, String dob,\r\n\t\tLong pincode)throws SQLException {\n\tLong logid=null;\r\n\tint i=DbConnect.getStatement().executeUpdate(\"insert into login values(login_seq.nextval,'\"+username+\"'||username_seq.nextval,'\"+password+\"','not approved','user','\"+security+\"','\"+answer+\"') \");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"insert into customer values(user_seq.nextval,'\"+firstname+\"','\"+lastname+\"','\"+city+\"','\"+eMail+\"',\"+phone+\",'\"+dob+\"',sysdate,\"+pincode+\",login_seq.nextval-1,'\"+address+\"')\");\r\n\tResultSet rss=DbConnect.getStatement().executeQuery(\"select login_seq.nextval-2 from dual\");\r\n\tif(rss.next())\r\n\t{\r\n\t\tlogid=rss.getLong(1);\r\n\t}\r\n\trs=DbConnect.getStatement().executeQuery(\"select username from login where login_id=\"+logid+\"\");\r\n\treturn rs;\r\n}", "public long addUser(String userId, String uName, String uDOB, String uGen, String uContact, String uPassword, String privs, int donar ) throws SQLException {\n open();\n ContentValues values = new ContentValues();\n values.put(Database.userId, userId);\n values.put(Database.uName, uName);\n values.put(Database.uDOB, uDOB);\n values.put(Database.uGender, uGen);\n values.put(Database.uContact, uContact);\n values.put(Database.uPassword, uPassword);\n values.put(Database.uPriviledge, privs);\n values.put(Database.uDonar, donar);\n long insertId = database.insert(Database.userTable, null,values);\n close();\n return insertId;\n }", "void addUserpan(String userid,String username,String userpwd);", "@Override\n\tpublic void addToUserAccountTable(int accountId,String username) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString insertQuery = \"insert into user_account values(?, ?)\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(insertQuery);\n \n\t\t\tprepStmt.setString(1, username);\n\t\t\tprepStmt.setInt(2, accountId);\n\t\t\tprepStmt.executeUpdate();\n\t}", "private void addUser(int userID)\n\t{\n\t\tfor(int i=0;i<userIDs.size();i++)\n\t\t{\n\t\t\tif(userIDs.get(i)==userID)\n\t\t\t{\n\t\t\t\tisUserIDAssociatedWithSetInDatabase.set(i, false);//this will need to be updated\n\t\t\t\tthis.userCount.set(i, userCount.get(i)+1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tisUserIDAssociatedWithSetInDatabase.add(false);\n\t\tuserIDs.add(userID);\n\t\tthis.userCount.add(1);\n\t}", "public static int addUser(String token, String email, String pass, String userName)\n\t\t\tthrows SQLException, ClassNotFoundException {\n\t\tString sql = \"INSERT INTO `RubykoDb`.`user` (`password`, `email`, `token`, `name`, `createTime`) VALUES ('111', '11', '11', '1', '1');\";\n\t\ttry (Connection conn = Database.getInstance().connect();\n\t\t\t\tPreparedStatement statement = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);) {\n\n\t\t\tint affectedRows = statement.executeUpdate();\n\t\t\tif (affectedRows == 0) {\n\t\t\t\tthrow new SQLException(\"Creating user failed, no rows affected.\");\n\t\t\t}\n\n\t\t\ttry (ResultSet generatedKeys = statement.getGeneratedKeys()) {\n\t\t\t\tif (generatedKeys.next()) {\n\t\t\t\t\treturn generatedKeys.getInt(1);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new SQLException(\"Creating user failed, no ID obtained.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void addUser() throws NoSuchAlgorithmException\r\n\t{\r\n\t\tSystem.out.print(\"Create a user ID: \");\r\n\t\tString userIDinput = scan.next();\r\n\t\tSystem.out.print(\"Create a password: \");\r\n\t\tmakePassword(userIDinput, scan.next());\r\n\t}", "public static void trackerUserAdd(long id) throws TwitterException, ClassNotFoundException, SQLException{\n\t\tClass.forName(\"org.h2.Driver\");\n\t\tConnection conn = DriverManager.getConnection(DB, user, pass);\n\t\t\n\t\tif(!(DB_Interface.exist_User(id, conn))){\n\t\t\tDB_Interface.insertUser(conn, OAuth.authenticate().showUser(id));\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"User already exists in database\");\n\t\t}\n\t\t\n\t}", "public int insertUser(UUID userId,User user) {\n\t\treturn 1;\n\t\t\n\t}", "public int addUser(HttpServletRequest request) {\n\t\tHashMap<String, Object> parameters = buildUserInsertCondition(request);\n\n\t\tSimpleJdbcInsert insert = new SimpleJdbcInsert(jt).withTableName(\"sys_user\").usingGeneratedKeyColumns(\"userId\");\n\n\t\tNumber id = insert.executeAndReturnKey(parameters);\n\n\t\tint pk = id.intValue();\n\n\t\treturn pk;\n\t}", "void addRoleToUser(int userID,int roleID);", "void addNewUser(User user, int roleId) throws DAOException;", "public static void addUser(String newUsername, String newPassword, String newFullname) {\n //local database variables\n Statement stmt = null;\n ResultSet rs = null;\n //defaulting highest id to 0\n //before new user can be added, application must know what is the curent highest id\n int highestId = 0;\n //nested query to retrieve user detials with the highest id\n String searchQuery = \"select * from users where UserId = (select max(UserId) from users)\";\n //displaying the query as a control\n System.out.println(\"Query: \" + searchQuery);\n\n try {\n //connect to DB \n currentCon = ConnectionManager.getConnection();\n stmt = currentCon.createStatement();\n rs = stmt.executeQuery(searchQuery);\n //if at least one user is present in the database,\n //result set will not be empty\n boolean more = rs.next();\n //if user found\n if (more) {\n //assigning the user id to the highest value +1\n highestId = rs.getInt(\"UserId\") + 1;\n System.out.println(\"Current highest id \" + highestId);\n //if no user found in the db, first id must be set to 1\n } else {\n highestId = 1;\n }\n\n }\n //catching exception if any and displaying the error stack trace\n catch (Exception ex) {\n System.out.println(\"An Exception has occurred! \" + ex);\n }\n //some exception handling\n //cloaing the connection\n finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (Exception e) {\n }\n rs = null;\n }\n\n if (stmt != null) {\n try {\n stmt.close();\n } catch (Exception e) {\n }\n stmt = null;\n }\n\n if (currentCon != null) {\n try {\n currentCon.close();\n } catch (Exception e) {\n }\n\n currentCon = null;\n }\n }\n //preparing some objects for connection \n Statement stmt2 = null;\n //since the next user's id was found\n //new user can be persisted with the username, password, and fullname passed to\n //the user controller form the web form\n //greeting will be set to the default value for each new user\n String insertQuery =\n \"insert into users values ('\" + highestId + \"','\" + newUsername + \"','\" + newPassword + \"','\" + newFullname\n + \"','This is the default greeting')\";\n //displaying the query\n System.out.println(\"Query: \" + insertQuery);\n\n try {\n //connect to DB \n currentCon = ConnectionManager.getConnection();\n stmt2 = currentCon.createStatement();\n //executing query\n stmt2.executeUpdate(insertQuery);\n\n }\n //catching exception if any\n catch (Exception ex) {\n System.out.println(\"An Exception has occurred! \" + ex);\n }\n\n //some exception handling\n //closing the databse connection\n finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (Exception e) {\n }\n rs = null;\n }\n\n if (stmt != null) {\n try {\n stmt.close();\n } catch (Exception e) {\n }\n stmt = null;\n }\n\n if (currentCon != null) {\n try {\n currentCon.close();\n } catch (Exception e) {\n }\n\n currentCon = null;\n }\n }\n }", "public void addUserCredentials(String login, String password) throws SQLException;", "public static int register(String username, String password, int avatarNum){\n try {\n Statement st = conn.createStatement();\n ResultSet largestId = st.executeQuery(\"select max(userid) from users\");\n largestId.next();\n int thisId = Integer.parseInt(largestId.getString(1))+1;\n String encryptedPwd = encrypt(password);\n\n String insertUserCommand = String.format(\"INSERT INTO users(userid, username, password, avatarnum) VALUES(%d, '{%s}','{%s}',%d)\",thisId,username,encryptedPwd,avatarNum);\n st.executeUpdate(insertUserCommand);\n largestId.close();\n st.close();\n return thisId;\n }catch (SQLException e){\n return SERVER_FAILURE;\n }\n\n }", "public void newUserAdded(String userID);", "public void addUser(){\r\n //gets entered username and password\r\n String user = signup.getUsername();\r\n String pass = signup.getFirstPassword();\r\n try{\r\n \r\n //connects to database\r\n \r\n //creates statement\r\n Connection myConn = DriverManager.getConnection(Main.URL);\r\n //adds username and password into database\r\n PreparedStatement myStmt = myConn.prepareStatement(\"insert into LISTOFUSERS(USERNAME, PASSWORD)values(?,?)\");\r\n myStmt.setString(1,user);\r\n myStmt.setString(2,pass);\r\n int a = myStmt.executeUpdate();\r\n \r\n if(a>0){\r\n System.out.println(\"Row Update\");\r\n }\r\n myConn.close();\r\n } catch (Exception e){\r\n System.err.println(e.getMessage());\r\n }\r\n }", "boolean addUser(int employeeId, String name, String password, String role);", "void add(User user) throws SQLException;", "private void addUser(){\r\n\t\ttry{\r\n\t\t\tSystem.out.println(\"Adding a new user\");\r\n\r\n\t\t\tfor(int i = 0; i < commandList.size(); i++){//go through command list\r\n\t\t\t\tSystem.out.print(commandList.get(i) + \"\\t\");//print out the command and params\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\r\n\t\t\t//build SQL statement\r\n\t\t\tString sqlCmd = \"INSERT INTO users VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(4) + \"', '\" + commandList.get(5) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(6) + \"');\";\r\n\t\t\tSystem.out.println(\"sending command:\" + sqlCmd);//print SQL command to console\r\n\t\t\tstmt.executeUpdate(sqlCmd);//send command\r\n\r\n\t\t} catch(SQLException se){\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\terror = true;\r\n\t\t\tse.printStackTrace();\r\n\t\t\tout.println(se.getMessage());//return error message\r\n\t\t} catch(Exception e){\r\n\t\t\t//general error case, Class.forName\r\n\t\t\terror = true;\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());\r\n\t\t} \r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");//end try\r\n\t}", "public int insertUser(final User user);", "public void addUser(String userId) {\n addUser(new IndividualUser(userId));\n }", "public int insertId(user user1)\n\t\t{\n\t\t\t\n\t\t\ttry {\n\t\t\t//\tString sql = \"INSERT INTO `employee`(`Eid`,`EmployeeName`, `Salary`, `email`) VALUES (102,'Zoeya Afreen',19000,'zoeya@gmail.com')\";\n\t\t//\t String X = \"VALUES (\"+ user1.name +\",'\"+user1.password+\"','\"+user1.email+\"')\";\n\t\t\t\tString sql = \"INSERT INTO `access`(`userid`,`password`, `email`) VALUES (?,?,?)\" ;\n\t\t\t\tpStmt = con.prepareStatement(sql);\n\t\t\t\tpStmt.setString(1, user1.name);\n\t\t\t\tpStmt.setString(2, user1.password);\n\t\t\t\tpStmt.setString(3, user1.email);\n\t\t\t\tSystem.out.println(\"Inside inset Method\");\n\t\t\t//\tstmt = con.createStatement(); \t\t\n\t\t\t\tint i = pStmt.executeUpdate();\t\t\n\t\t\t\tif (i>=0) {\n\t\t\t\tSystem.out.println(\"<<succesfully Registered\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"<<Some issues during Registration \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(\"Some error \"+e);\n\t\t\t}\n\t\t\tSystem.out.println(\"Value of return code i :\" +i);\n\t\t\treturn i;\n\t\t}", "public long addEmptyUser() throws DBException {\n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tconn = factory.getConnection();\n\t\t\tps = conn.prepareStatement(\"INSERT INTO users(id) VALUES(NULL)\");\n\t\t\tps.executeUpdate();\n\t\t\tlong a = DBUtil.getLastInsert(conn);\n\t\t\tps.close();\n\t\t\treturn a;\n\t\t} catch (SQLException | NamingException e) {\n\t\t\tthrow new DBException(e);\n\t\t} finally {\n\t\t\tDBUtil.closeConnection(conn, ps);\n\t\t}\n\t}", "public int add(Userinfo user) {\n\t\treturn userDAO.AddUser(user);\r\n\t}", "public void insertUser() {}", "public void addUser(String username, String password) {\n\t\t// Connect to database\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\t\n\t\t// Create new entry\n\t\tString newEntryString = \"INSERT INTO User (username, password, winNum, loseNum) VALUES (?, ?, 0, 0)\";\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(newEntryString);\n\t\t\tps.setString(1, username);\n\t\t\tps.setString(2, password);\n\t\t\tps.executeUpdate();\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\t// Close connections\n\t\t\ttry {\n\t\t\t\tif(rs != null)\n\t\t\t\t{\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null)\n\t\t\t\t{\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(SQLException sqle)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sqle: \" + sqle.getMessage());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public long addUser(User user) {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tlong id = (long) session.save(user);\n\t\tsession.getTransaction().commit();\n\t\tsession.close();\n\t\t\n\t\treturn id;\n\t\t\n\t}", "public void addAccount(String user, String password);", "public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}", "public static synchronized int addCred(Credentials cred){\n\t\t\tint status=0;\t\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"INSERT INTO credential (Email, Pass, User_ID, Role, \" +\n\t\t\t\t\t\"Validated, RegKey) VALUES(?,?,?,?,?,?) \";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\n\t\t\t\tstatement.setString(1, cred.getEmail());\n\t\t\t\tstatement.setString(2, cred.getPass());\n\t\t\t\tstatement.setInt(3, cred.getUserID());\n\t\t\t\tstatement.setString(4, cred.getRole());\n\t\t\t\tstatement.setInt(5, cred.getValid());\n\t\t\t\tstatement.setString(6, cred.getRegKey());\n\t\t\t\tstatus = statement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\n\t\t\treturn status;\n\t}", "@Override\n public void insertUser(User user, String userType) {\n\n int userRoleId = insertUserRole(userType);\n\n try(Connection conn = DriverManager.getConnection(URL, USERNAME, PASSWORD)){\n\n String sql = \"INSERT INTO ers_users(ers_username, ers_password, user_first_name, user_last_time, user_email, user_role_id) \" +\n \"VALUES (?, ?, ?, ?, ?, ?);\";\n\n PreparedStatement ps = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, user.getUsername());//the 1st \"?\"\n ps.setString(2, user.getPassword());\n ps.setString(3, user.getFirstName());\n ps.setString(4, user.getLastName());\n ps.setString(5, user.getEmail());\n ps.setInt(6, userRoleId);\n\n ps.executeUpdate();\n\n //PRINTING THE PRIMARY KEY\n ResultSet rs = ps.getGeneratedKeys();\n if (rs.next()) {\n System.out.println(\"The returned PK: \"+ rs.getInt(\"ers_user_id\"));\n }\n\n }catch(SQLException e){\n e.printStackTrace();\n }\n }", "public long addUser(User user) {\n \t\tContentValues temp = new ContentValues();\n \n \t\ttemp.put(USER_COLUMN_USERNAME, user.getUserName());\n \t\ttemp.put(USER_COLUMN_USERID, user.getId());\n \t\ttemp.put(USER_COLUMN_IMGURL, user.getProfileImageURL());\n \t\ttemp.put(USER_COLUMN_SOURCE, \"Twitter\");\n \t\t// TODO implement source on user?\n \n \t\tlong userID = db.insert(TABLE_USER, null, temp);\n \t\treturn userID;\n \t}", "void addUser(String uid, String firstname, String lastname, String pseudo);", "public void setUser1X_ID (int User1X_ID);", "public long getUserID() {\n //userID++;\n return userID++;\n }", "public boolean add_user_insert(AddUser addUsers)\n\t{\n\t\tAddUser addUser=(AddUser) addUsers;\n\t\tboolean flag=false;\n\t\tConnection conn = null;\n\t\tStatement stmt = null;\n\t\tResultSet rs=null;\n\t\tconn = (Connection) DBConnection.getConnection();\n\t\tString emp_category_id = null;\n\t\tString emp_category=addUser.getEmpCategory();\n\t\tInetAddress ip;\n\t\tDateFormat dateFormat=new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tDate date = new Date();\n\t\tRandom rnd=new Random();\n\t\tint emp_id=rnd.nextInt(Integer.MAX_VALUE)+1;\n\t\tString way2sms_username,way2sms_password;\n\t\tWay2Sms way2Sms=new Way2Sms();\n\t\tString phone=addUser.getPhone();\n\t\tif(conn != null){\n\t\t\t \n\t\t\ttry {\n\t\t\t\tip=InetAddress.getLocalHost();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(emp_category.equals(\"Client\"))\n\t\t\t\t{\n\t\t\t\t\temp_category_id=\"cln\" + emp_id;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(emp_category.equals(\"Employee\"))\n\t\t\t\t{\n\t\t\t\t\temp_category_id=\"emp\" + emp_id;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(emp_category.equals(\"Manager\"))\n\t\t\t\t{\n\t\t\t\t\temp_category_id=\"mng\" + emp_id;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(emp_category.equals(\"Project Manager\"))\n\t\t\t\t{\n\t\t\t\t\temp_category_id=\"pmng\" + emp_id;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tstmt = conn.createStatement();\n\t\t\t\tStringBuffer insertSQL = new StringBuffer(\"insert into emp_user_id_generator values('\"+ emp_category_id +\"','\"+emp_category+\"','0','\"+ ip.getHostAddress() +\"','\"+ dateFormat.format(date) +\"')\");\n\t\t\t\tStringBuffer selectSQL= new StringBuffer(\"select way2sms_user_name,way2sms_password from sms_authentication where user_name='Admin'\");\n\t\t\t\tstmt.executeUpdate(insertSQL.toString());\n\t\t\t\trs=stmt.executeQuery(selectSQL.toString());\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tway2sms_username=rs.getString(\"way2sms_user_name\");\n\t\t\t\t\tway2sms_password=rs.getString(\"way2sms_password\");\n\t\t\t\t\tway2Sms.test(\"site\",phone,\"Your Employee ID is:\"+emp_category_id,way2sms_username,way2sms_password);\n\t\t\t\t}\n\t\t\t\tflag=true;\n\t\t\t\t\n\t\t\t\t\n\t\t\t} \n\t\t\n\t\t\tcatch (SQLException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (UnknownHostException 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\t\n\t\telse\t{\n\t\t\tflag=false;\n\t\t}\n\t\t\n\t\n\t\treturn flag;\n\t}", "@Override\n\tpublic Integer insertUserIntoUsersTable(final String username, final String password) \n\t{\n\t\treturn executeTransaction(new Transaction<Integer>() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic Integer execute(Connection conn) throws SQLException \n\t\t\t{\n\t\t\t\tPreparedStatement stmt1 = null;\n\t\t\t\tPreparedStatement stmt2 = null; \n\t\t\t\tPreparedStatement stmt3 = null; \t\n\t\t\t\t\n\t\t\t\tResultSet resultSet1 = null;\t\n\t\t\t\tResultSet resultSet3 = null; \n\t\t\t\t\n\t\t\t\t// for saving user ID\n\t\t\t\tInteger user_id = -1;\n\t\t\t\t\n\t\t\t\t// try to retrieve user_ID (if it exists) from DB, for username passed into query\n\t\t\t\ttry {\n\t\t\t\t\tstmt1 = conn.prepareStatement(\n\t\t\t\t\t\t\t\"select user_id from users \" +\n\t\t\t\t\t\t\t\" where username = ? \"\n\t\t\t\t\t);\n\t\t\t\t\tstmt1.setString(1, username);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// execute the query, get the result\n\t\t\t\t\tresultSet1 = stmt1.executeQuery();\n\n\t\t\t\t\t\n\t\t\t\t\t// if user was found then inform the user \t\t\t\t\t\n\t\t\t\t\tif (resultSet1.next())\n\t\t\t\t\t{\n\t\t\t\t\t\tuser_id = -1; \n\t\t\t\t\t\tSystem.out.println(\"Username already taken\");\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Creating new user\");\n\t\t\t\t\n\t\t\t\t\t\t// insert new user\n\t\t\t\t\t\tif (user_id <= 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// prepare SQL insert statement to add user to users table\n\t\t\t\t\t\t\tstmt2 = conn.prepareStatement(\n\t\t\t\t\t\t\t\t\t\"insert into users (username, password) \" +\n\t\t\t\t\t\t\t\t\t\" values(?, ?) \"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tstmt2.setString(1, username);\n\t\t\t\t\t\t\tstmt2.setString(2, password);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// execute the update\n\t\t\t\t\t\t\tstmt2.executeUpdate();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//Get the new user's id\n\t\t\t\t\t\t\tstmt3 = conn.prepareStatement(\n\t\t\t\t\t\t\t\t\t\"select user_id from users \" +\n\t\t\t\t\t\t\t\t\t\t\t\" where username = ? \"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tstmt3.setString(1, username);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//execute query and get result\n\t\t\t\t\t\t\tresultSet3 = stmt3.executeQuery(); \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//should only be one value \n\t\t\t\t\t\t\tresultSet3.next(); \n\t\t\t\t\t\t\tuser_id = resultSet3.getInt(1); \n\t\t\t\t\t\t\tSystem.out.println(\"New user added\");\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\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\treturn user_id;\n\t\t\t\t} \n\t\t\t\tfinally \n\t\t\t\t{\n\t\t\t\t\tDBUtil.closeQuietly(resultSet1);\n\t\t\t\t\tDBUtil.closeQuietly(stmt1);\n\t\t\t\t\tDBUtil.closeQuietly(stmt2);\t\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public void setUser1_ID (int User1_ID);", "public void setUser1_ID (int User1_ID);", "public Integer addUser(String username, String password, String email) {\n System.out.println(\"addUser()\" + username);\n Session session = HibernateSessionFactory.getSessionFactory().openSession();\n Transaction tx = null;\n Integer userID = null;\n try {\n tx = session.beginTransaction();\n User user = new User();\n user.setUsername(username);\n user.setPassword(password);\n user.setEmail(email);\n user.setEnabled(\"1\");\n userID = (Integer) session.save(user);\n\n Role role = new Role();\n role.setUsername(username);\n role.setRole(\"ROLE_USER\");\n session.save(role);\n\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n return userID;\n }", "void addUser(String page, String userId, String uid);", "public void addUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tSystem.out.print(\"Please enter your username: \");\r\n\t\tString username=sc.nextLine();\r\n\t\tusername=username.trim();\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter your password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter your password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tSystem.out.print(\"Please enter your full name: \");\r\n\t\tString fullname=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your email address: \");\r\n\t\tString email=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your Phone number: \");\r\n\t\tlong phone_number=sc.nextLong();\r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(username,hash_password,fullname,email,phone_number,0,last_login,false));\r\n\t\tSystem.out.println(\"Record added successfully!\");\r\n\t}", "public static boolean addUser(UserDetailspojo user) throws SQLException {\n Connection conn=DBConnection.getConnection();\n String qry=\"insert into users1 values(?,?,?,?,?)\";\n System.out.println(user);\n PreparedStatement ps=conn.prepareStatement(qry);\n ps.setString(1,user.getUserid());\n ps.setString(4,user.getPassword());\n ps.setString(5,user.getUserType());\n ps.setString(3,user.getEmpid());\n ps.setString(2,user.getUserName());\n //ResultSet rs=ps.executeQuery();\n int rs=ps.executeUpdate();\n return rs==1;\n //String username=null;\n }", "public static int inserUser(User user) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n \n int count;\n \n String rowNum = \"SELECT COUNT(*) FROM auttc_users.users \";\n String query = \"INSERT INTO auttc_users.users (user_id, username, email, password, admin) \"\n + \"VALUES (?, ?, ?, ?, ?)\";\n \n try{\n //get row count\n ps = connection.prepareStatement(rowNum);\n rs = ps.executeQuery();\n if (rs.next()) {\n count = rs.getInt(1);\n System.out.println(count);\n } else {\n count = 0;\n }\n \n //insert new user\n ps = connection.prepareStatement(query);\n ps.setInt(1, count + 1);\n ps.setString(2, user.getUsername());\n ps.setString(3, user.getEmail());\n ps.setString(4, user.getPassword());\n ps.setInt(5, 0);\n \n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "@Override\n\t@Transactional\n\tpublic int addUser(User user) {\n\t\t// Add record to user table\n\t\tSimpleJdbcInsert empInsert = new SimpleJdbcInsert(this.dataSource).withTableName(\"user\")\n\t\t\t\t.usingGeneratedKeyColumns(\"USER_ID\");\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tPasswordEncoder encoder = new BCryptPasswordEncoder();\n\t\tString hashPass = encoder.encode(user.getPassword());\n\t\tparams.put(\"NAME\", WordUtils.capitalizeFully(user.getName()));\n\t\tparams.put(\"USERNAME\", user.getUsername().toLowerCase());\n\t\tparams.put(\"PASSWORD\", hashPass);\n\t\tparams.put(\"ACTIVE\", true);\n\t\tparams.put(\"EXPIRED\", false);\n\t\tparams.put(\"EXPIRES_ON\", DateUtils.getOffsetFromCurrentDateObject(DateUtils.IST, 60));\n\t\tparams.put(\"FAILED_ATTEMPTS\", 0);\n\t\tCustomUserDetails curUser = ((CustomUserDetails) SecurityContextHolder.getContext().getAuthentication()\n\t\t\t\t.getPrincipal());\n\t\tif (curUser.hasBusinessFunction(\"ROLE_BF_OUTSIDE_ACCESS\")) {\n\t\t\tparams.put(\"OUTSIDE_ACCESS\", user.isOutsideAccess());\n\t\t} else {\n\t\t\tparams.put(\"OUTSIDE_ACCESS\", false);\n\t\t}\n\t\tparams.put(\"CREATED_BY\", curUser.getUserId());\n\t\tparams.put(\"LAST_MODIFIED_BY\", curUser.getUserId());\n\t\tDate dt = DateUtils.getCurrentDateObject(DateUtils.IST);\n\t\tparams.put(\"CREATED_DATE\", dt);\n\t\tparams.put(\"LAST_MODIFIED_DATE\", dt);\n\n\t\tint userId = 0;\n\t\ttry {\n\t\t\tuserId = empInsert.executeAndReturnKey(params).intValue();\n\t\t} catch (Exception m) {\n\t\t\treturn userId;\n\t\t}\n\t\tparams.clear();\n\t\t// add record to user_role table\n\t\tString sqlString = \"INSERT INTO user_role (USER_ID, ROLE_ID) VALUES(:userId, :roleId)\";\n\t\tparams.put(\"userId\", userId);\n\t\tparams.put(\"roleId\", user.getRole().getRoleId());\n\t\tthis.namedParameterJdbcTemplate.update(sqlString, params);\n\t\treturn userId;\n\t}", "public void addUser(String uid) {\r\n\t\tSQLiteDatabase db = this.getWritableDatabase();\r\n\r\n\t\tContentValues values = new ContentValues();\r\n\t\tvalues.put(KEY_UID, uid); // user id\r\n\t\t\r\n\t\t// Inserting Row\r\n\t\tdb.insert(TABLE_USERS, null, values);\r\n\t\tdb.close(); // Closing database connection\r\n\t}", "public void addUserUI() throws IOException {\n System.out.println(\"Add user: id;surname;first name;username;password\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n User user = new User(a[1], a[2], a[3], a[4], \" \");\n user.setId(Long.parseLong(a[0]));\n try\n {\n User newUser = service.addUser(user);\n if(newUser != null)\n System.out.println(\"ID already exists for \" + user.toString());\n else\n System.out.println(\"User added successfully!\");\n }\n catch (ValidationException ex)\n {\n System.out.println(ex.getMessage());\n }\n catch (IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "public void setUser1W_ID (int User1W_ID);", "@Override\n\tpublic int addUser(TbUser user) {\n\t\treturn new userDaoImpl().addUser(user);\n\t}", "public void addToUsers(Users users) {\n Connection connection = connectionDB.openConnection();\n PreparedStatement preparedStatement;\n try {\n preparedStatement = connection.prepareStatement(WP_USERS_ADD_USER);\n preparedStatement.setString(1, users.getUser_login());\n preparedStatement.setString(2, users.getUser_pass());\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n connectionDB.closeConnection(connection);\n }\n }", "public Integer registerUser(User user) throws SQLException, ClassNotFoundException, IOException {\n\t\t\t// Declare variables\n\t\t\tConnection conn = null;\n\t\t\tPreparedStatement stmt = null;\n\t\t\tResultSet rs = null;\n\t\t\t\n\t\t\t// Assign insert statement string to variable\n\t\t\tString insertString = \"insert into User (name, password,Javascore, sqlscore) values (?,?,?,?)\";\n\t\t\t\n\t\t int ID = -1;\n\t\t String[] COL = {\"Userid\"};\n\t\t \n\t\t DatabaseConnection mysql = new DatabaseConnection();\n\t\t \n\t\t try\n\t\t {\n\t\t conn = mysql.getConnection();\n\t\t stmt = conn.prepareStatement(insertString, COL);\n\t\t \n\t\t stmt.setString(1, user.getName());\n\t\t stmt.setString(2, user.getPassword());\n\t\t stmt.setDouble(3, user.getJavaScore());\n\t\t stmt.setDouble(4, user.getSqlScore());\n\t\t \n\t\t stmt.executeUpdate();\n\t\t \n\t\t rs = stmt.getGeneratedKeys();\n\t\t if(rs != null && rs.next()) {\n\t\t ID = rs.getInt(1);\n\t\t }\n\t\t System.out.println(ID);\n\t\t }\n\t\t catch (SQLException e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t\t}\n\t\t\tfinally\n\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 (stmt != null) {\n\t\t\t\t\tstmt.close();\n\t\t\t\t}\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t}\n\t\t \n\t\t\treturn ID;\n\t\t}", "public Long insert(User object) throws DaoException {\n long id = 0;\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n try {\n connection = dataSourceUtils.getConnection(dataSource);\n preparedStatement = connection.prepareStatement(INSERT_USER);\n\n preparedStatement.setString(1, object.getUserName());\n preparedStatement.setString(2, object.getLogin());\n preparedStatement.setString(3, object.getPassword());\n preparedStatement.executeUpdate();\n\n ResultSet resultSet = preparedStatement.getGeneratedKeys();\n if (resultSet.next()) {\n id = resultSet.getLong(1);\n object.setUserId(id);\n }\n } catch (SQLException e) {\n throw new DaoException(e);\n } finally {\n DataSourceUtils.releaseConnection(connection, dataSource);\n try {\n preparedStatement.close();\n } catch (SQLException e) {\n LOGGER.error(e);\n }\n }\n return id;\n }", "public void addUser() {\n\t\tthis.users++;\n\t}", "public Integer addUser(User u) {\n\n //the new User's id\n Integer id = null;\n\n Session session = ConnectionFactory.getInstance().getSession();\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n session.save(u);\n tx.commit();\n\n id = u.getUserId();\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n return id;\n }", "public static int registerUser(Register reg) throws SQLException {\n\t\tint i =0;\r\n\t\tConnection con = connect();\r\n\t\tSystem.out.println(\"Reached DAOMvc\"+reg.getLastname());\r\n\t\tString sql = \"insert into registeruser\"+\r\n\t\t\"(userid,firstname,lastname,age,address,username,password,role,emailid)\"+\r\n\t\t\" values(userid_seq.nextval,?,?,?,?,?,?,?,?)\";\r\n\t\t\r\n\t\tPreparedStatement stmt = con.prepareStatement(sql);\t\t\r\n\t\tstmt.setString(1,reg.getFirstname());\r\n\t\tstmt.setString(2,reg.getLastname());\r\n\t\tstmt.setInt(3,reg.getAge());\r\n\t\tstmt.setString(4,reg.getAddress());\r\n\t\tstmt.setString(5,reg.getUsername());\r\n\t\tstmt.setString(6,reg.getPassword());\r\n\t\tstmt.setInt(7,reg.getRole());\r\n\t\tstmt.setString(8,reg.getEmail());\t\t\r\n\t\ti=stmt.executeUpdate();\r\n\t\t\r\n\t\treturn i;\r\n\t}", "public void addUser(User user) {\n\t\t\r\n\t}", "public int addNewUser(ConnectionHandler<T> connection) {\n activeUsers.put(Integer.valueOf(increaseId()), connection);\n return userId -1;\n }", "public void addUser(String firstName, String lastName, String username, String password, char type)\r\n\t{\r\n\t\tdb.user_addUser(firstName, lastName, username, password, type);\t\r\n\t}", "@Override\n\tpublic int insertUser(String username, String password) {\n\t\treturn userMapper.insertUser(username, password);\n\t}", "public void addUser(User user){\n loginDAO.saveUser(user.getId(),user.getName(),user.getPassword());\n }", "private void addNewUser() throws Exception, UnitException {\n String firstNameInput = firstName.getText();\n String lastNameInput = lastName.getText();\n String unitInput = unitID.getText();\n String accountInput = accountTypeValue;\n String passwordInput = password.getText();\n User newUserInfo;\n\n // Create user type based on the commandbox input\n switch (accountInput) {\n case \"Employee\":\n newUserInfo = new Employee(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Lead\":\n newUserInfo = new Lead(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Admin\":\n newUserInfo = new Admin(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + accountInput);\n }\n\n // Try adding this new user information to the database, if successful will return success prompt\n try {\n Admin.addUserToDatabase(newUserInfo);\n\n // If successful, output message dialog\n String msg = \"New User \" + firstNameInput + \" \" + lastNameInput + \" with UserID \"\n + newUserInfo.returnUserID() + \" successfully created\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset Values\n firstName.setText(\"\");\n lastName.setText(\"\");\n unitID.setText(\"\");\n password.setText(\"\");\n } catch (UserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "void addUser(User user);", "void addUser(User user);", "public void addData(String User, String password) throws SQLException\n {\n }", "public int userAdd(User user) {\n\t\treturn userDao.userAdd(user);\r\n\t}", "@Override\r\n\tpublic UserAccount add(UserAccount userAccount) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\tUserAccount ua = null;\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(Add, PreparedStatement.RETURN_GENERATED_KEYS);\r\n\t\t\tps.setInt(1, userAccount.getUser().getId());\r\n\t\t\tps.setInt(2, userAccount.getAccount().getId());\r\n\t\t\tps.setString(3, userAccount.getPassword());\r\n\t\t\tps.setInt(4, userAccount.getRole());\r\n\t\t\tint cnt = ps.executeUpdate();\r\n\t\t\tif (cnt > 0) {\r\n\t\t\t\tResultSet rs = ps.getGeneratedKeys();\r\n\t\t\t\tif (rs.next()) {\r\n\t\t\t\t\tua = get(rs.getInt(1));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn ua;\r\n\t}", "public void addUser(String name,String password) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_USERNAME, name); // UserName\n values.put(KEY_PASSWORD,password);\n // Inserting Row\n long id = db.insert(TABLE_USER, null, values);\n //db.close(); // Closing database connection\n\n Log.d(TAG, \"New user inserted into sqlite: \" + id);\n }", "void addRealmToUserAccount(final String userId, final String realm);", "public void addUser(User user);", "public Long createAndStoreApplicationUser(ApplicationUser applicationUser, Long userID)\n throws ApplicationUserSaveException\n {\n \tLong returnValue = Long.valueOf(0);\n \n\t\ttry\n\t\t{\n returnValue = this.getApplicationUserDao().createAndStoreApplicationUser(applicationUser, userID);\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t throw new ApplicationUserSaveException(\"ApplicationUserEntityDataManager::createAndStoreApplicationUser\", ex);\n\t\t}\t\t\n\t\t\n\t\treturn returnValue;\n }", "public void addUser(String name, String email, String uid, String created_at,String address,String number) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, name); // Name\n values.put(KEY_EMAIL, email); // Email\n values.put(KEY_UID, uid); // Email\n values.put(KEY_CREATED_AT, created_at); // Created At\n values.put(KEY_ADDRESS, address);\n values.put(KEY_NUMBER, number);\n\n // Inserting Row\n long id = db.insert(TABLE_USER, null, values);\n db.close(); // Closing database connection\n\n Log.d(TAG, \"New user inserted into sqlite: \" + id);\n }", "public void updateUser(int uid, String name, String phone, String email, String password, int money, int credit);", "public boolean createUser(Connection con, String userid, String password, int access_code)\n throws SQLException, NoSuchAlgorithmException, UnsupportedEncodingException\n {\n PreparedStatement ps = null;\n try {\n if (userid != null && password != null && userid.length() <= 20){\n // Uses a secure Random not a simple Random\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\");\n // Salt generation 64 bits long\n byte[] bExtra = new byte[8];\n random.nextBytes(bExtra);\n // Digest computation\n byte[] bDigest = getHash(ITERATION_NUMBER,password,bExtra);\n String sDigest = byteToBase64(bDigest);\n String sSalt = byteToBase64(bExtra);\n\n ps = con.prepareStatement(\"insert into login (User_ID, password, access_code, extra) VALUES (?,?,?,?)\");\n ps.setString(1,userid);\n ps.setString(2,sDigest);\n ps.setInt(3,access_code);\n ps.setString(4, sSalt);\n ps.executeUpdate();\n return true;\n } else {\n return false;\n }\n } finally {\n close(ps);\n }\n }", "public void updateUser(long userID) {\n \t}", "@Override\n\tpublic int addUser(User_role user) throws Exception{\n\t\treturn userMapper.insertByUser(user);\n\t}", "public void insertUser(Long userId) {\n\r\n\t\tTUserDetail detail = new TUserDetail();\r\n\t\tdetail.setUserId(userId);\r\n\t\tdetail.setSex(\"M\");\r\n\t\tdetail.setTel(10000);\r\n\t\tdetail.setLinkman(\"ZS\");\r\n\t\ttUserDetailMapper.insert(detail);\r\n\r\n\t\tTUser user = new TUser(userId);\r\n\t\tuser.setStatus(\"UNOK\");\r\n\t\tuser.setUserName(\"killer\");\r\n\t\ttUserMapper.insert(user);\r\n\t}", "public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }", "@Override\n public synchronized void addUser(String sessID, String user, char[] pass, UserLevel level) throws SQLException, SessionExpiredException {\n PooledConnection conn = ConnectionController.connectPooled(sessID);\n try {\n if (user.startsWith(DATABASE_USER_KEY_PREFIX)) {\n throw new SQLException(\"Can't create user \" + user + \" -- illegal username\");\n }\n // TODO: Transactions aren't supported for MyISAM, so this has no effect.\n conn.setAutoCommit(false);\n\n conn.executePreparedUpdate(\"CREATE USER ?@'%' IDENTIFIED BY ?\", user, new String(pass));\n grantPrivileges(sessID, user, level);\n conn.commit();\n } catch (SQLException sqlx) {\n conn.rollback();\n throw sqlx;\n } finally {\n for (int i = 0; i < pass.length; i++) {\n pass[i] = 0;\n }\n conn.setAutoCommit(true);\n conn.close();\n }\n }", "public int insertUser(User newUser) {\r\n\r\n try {\r\n BusTrackerDB = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(\"username\", newUser.getUsername());\r\n values.put(\"password\", newUser.getPassword());\r\n\r\n BusTrackerDB.insert(\"user\", null, values);\r\n } catch (SQLiteException e) { return 0; }\r\n\r\n BusTrackerDB.close();\r\n\r\n return 1;\r\n }", "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}", "void setUserId(int newId) {\r\n\t\t\tuserId = newId;\r\n\t\t}", "public void setUserid(java.lang.String value) {\n this.userid = value;\n }", "@Override\n\tpublic void addNewUser(User user) {\n\t\tusersHashtable.put(user.getAccount(),user);\n\t}", "public void addUser(TIdentifiable user) {\r\n\t // make sure that the user doesn't exists already\r\n\t if (userExists(user)) return;\r\n\t \r\n\t // check to see if we need to expand the array:\r\n\t if (m_current_users_count == m_current_max_users) expandTable(2, 1);\t \r\n\t m_users.addID(user);\r\n\t m_current_users_count++;\r\n }", "public void addUser() {\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tframeManager.addUser(user);\r\n\t\t\tpesquisar();\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "public void Adduser(User u1) {\n\t\tUserDao ua=new UserDao();\n\t\tua.adduser(u1);\n\t\t\n\t}", "@Override\n\tpublic int AddUser(UserBean userbean) {\n\t\treturn 0;\n\t}", "public void addNewUser(String contextName, String userName) throws Exception {\n try {\n api.users.newUser(getContextId(contextName), userName);\n } catch (Exception e) {\n throw new UnicornZapException(\"Exception while adding new user: \" + userName + \" in context: \" + contextName);\n }\n }", "public int adduser(UserBean user) {\n\t\t// TODO Auto-generated method stub\n\t\tuser.setGrantedpermission(0);\n\t\tuser.setFirsttimelogin(1);\n\t\tuser.setStartdate(LocalDate.now().toString());\n\t\tuser.setUserpassword(\"Hello@123\");\n\t\tcrud1.save(user);\n\t\tValidateBean validate = new ValidateBean();\n\n\t\tvalidate.setId(user.getUserid());\n\n\t\tvalidate.setPassword(user.getUserpassword());\n\t\tvalidate.setRole(\"user\");\n\t\tcrud.save(validate);\n\t\treturn 1;\n\t}", "public static void insertUser(Context context, String userID, String fName,\r\n\t\t\tString lName, String email, String Pass) {\r\n\t\tContentValues cv = new ContentValues();\r\n\r\n\t\tcv.put(EquestDbHelper.USERID, userID);\r\n\t\tcv.put(EquestDbHelper.FIRSTNAME, fName);\r\n\t\tcv.put(EquestDbHelper.LASTNAME, lName);\r\n\t\tcv.put(EquestDbHelper.EMAILID, email);\r\n\t\tcv.put(EquestDbHelper.PASSWORD, Pass);\r\n\r\n\t\tUri contentUri = Uri.withAppendedPath(EquestProvider.CONTENT_URI,\r\n\t\t\t\tEquestDbHelper.USER_TABLE);\r\n\t\tcontext.getContentResolver().insert(contentUri, cv);\r\n\t}", "@Override\r\n\tpublic int register(User user) {\n\t\treturn dao.addUser(user);\r\n\t}", "Integer addUser(ServiceUserEntity user);", "public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}", "public static Task<Void> addUserToken(String userId, String token) {\n // add the token to the given user's document in the db\n return FirebaseFirestore.getInstance()\n .collection(Const.USERS_COLLECTION)\n .document(userId)\n .update(Const.USER_TOKEN_KEY, token);\n }", "public void addUser(SPUser user, String tableName) { // tar inn user-tabellen\n\t try {\n\t myCon.execute(\"INSERT INTO \"+tableName+\" VALUES ('\"+ user.getUsername() +\"', '\"+ user.getPassword()+\"');\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void addUser(User user) {\n \t\tuser.setId(userCounterIdCounter);\n \t\tusers.add(user);\n \t\tuserCounterIdCounter++;\n \t}", "public int add(User user) {\n\t\treturn this.userDao.insert(user);\r\n\t}", "@Override\n\tpublic int addUser(User user) {\n\t\treturn userDao.addUser(user);\n\t}" ]
[ "0.7523689", "0.6862737", "0.67205906", "0.67191404", "0.6698938", "0.6646193", "0.6645945", "0.6637027", "0.66255546", "0.66009074", "0.6557013", "0.6518943", "0.646627", "0.64615834", "0.6452214", "0.6442806", "0.64335585", "0.64283705", "0.6426199", "0.6372225", "0.6360875", "0.6334318", "0.6320497", "0.627837", "0.62781525", "0.6272259", "0.62625897", "0.62530655", "0.6249308", "0.6248321", "0.6212956", "0.62020326", "0.6189518", "0.61723876", "0.61693007", "0.61635154", "0.6157466", "0.6153485", "0.61365485", "0.6136525", "0.6136413", "0.6136413", "0.6124039", "0.61151356", "0.6106848", "0.60965264", "0.60879964", "0.6071619", "0.60706323", "0.60625744", "0.6046475", "0.604308", "0.6038082", "0.6022802", "0.60124207", "0.59812945", "0.5978266", "0.5976955", "0.5976653", "0.59761626", "0.5975381", "0.5971702", "0.5964062", "0.5961393", "0.5953411", "0.5953411", "0.5953214", "0.5948498", "0.59424835", "0.59420925", "0.5941045", "0.59342474", "0.59331185", "0.5932977", "0.5926899", "0.5918549", "0.5916334", "0.5908522", "0.5907227", "0.590697", "0.5905643", "0.5900525", "0.5898496", "0.58892536", "0.587872", "0.5877051", "0.5870808", "0.58684915", "0.58646816", "0.58601", "0.5854544", "0.5852282", "0.58516216", "0.58415693", "0.584136", "0.58312285", "0.58243185", "0.5815535", "0.5813263", "0.5811894", "0.58109254" ]
0.0
-1
Method...............................................deleteCred Author......................................................JLH This method deletes the row in the credentials table based on the credID Return Value (int) status: Returns an int that indicates the success or failure of the delete command
public static synchronized int deleteCred(int credID){ int status=0; Connection connection; String preparedSQL = "DELETE FROM credential WHERE Credentials_ID = ?"; PreparedStatement statement=null; try{ connection=DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setInt(1, credID); status = statement.executeUpdate(); statement.close(); connection.close(); }catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } return status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CloudCredentialStatus delete(@Nonnull AuthenticatedContext authenticatedContext);", "@Test\n public void deleteCredential() throws InterruptedException {\n credentialPage.addOneCredential(TestUtil.url3, TestUtil.username3, TestUtil.password3);\n Thread.sleep(1000);\n // then delete a row\n int numRowsBeforeDelete = credentialPage.getRowCount();\n credentialPage.deleteRow(TestUtil.url3, TestUtil.username3);\n int numRowsAfterDelete = credentialPage.getRowCount();\n\n assertEquals(numRowsBeforeDelete-1, numRowsAfterDelete);\n }", "public void remove(CredentialsModel credential) {\n Connection connection = null; \n PreparedStatement stmt = null;\n try {\n try {\n connection = ds.getConnection();\n try {\n stmt = connection.prepareStatement(\n \"DELETE FROM Credentials WHERE EmpUsername = ?\");\n stmt.setString(1, credential.getUserName());\n stmt.executeUpdate();\n } finally {\n if (stmt != null) {\n stmt.close();\n }\n }\n } finally {\n if (connection != null) {\n connection.close();\n }\n }\n } catch (SQLException ex) {\n System.out.println(\"Error in remove \" + credential);\n ex.printStackTrace();\n }\n }", "public void deleteUserCredentials(String login) throws SQLException;", "public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}", "private boolean _credDestroy() \n {\n// String loginFileLocation = this._loginReader.getLoginFileLocation();\n// \n// File file = new File(loginFileLocation);\n// if (file.exists()) {\n// file.delete();\n// }\n String svgp = (String) this._argTable.get(CMD.SERVERGROUP);\n boolean success = true;\n \n if (svgp != null)\n {\n boolean sgFound = false;\n String[] sgs = this._loginReader.getNamespaces();\n for (int i = 0; !sgFound && i < sgs.length; ++i)\n {\n if (svgp.equals(sgs[i]))\n sgFound = true;\n }\n if (!sgFound)\n {\n this._logger.error(ERROR_TAG + \"No credentials found for server group '\"+svgp+\"'\");\n success = false;\n }\n else\n { \n this._loginReader.remove(svgp);\n System.out.println(\"Removed entry for server group '\"+svgp+\"'\");\n try {\n _loginReader.commit();\n } catch (IOException ioEx) {\n success = false;\n }\n }\n }\n else\n {\n try {\n _loginReader.delete();\n } catch (IOException ioEx) {\n success = false;\n } \n }\n \n return success;\n }", "@Override\n\tpublic boolean delete( String uname,String upasswords,int rid) throws RemoteException{\n\t\tboolean result=false;\n\t\tif(uname!=null&upasswords!=null&rid>0){\n\t\t\ttry{\n\t\t\tConnection con1=jdbcconnect.connnect();\n\t\t\tString sql1=\"select upasswords from users where uname='\"+uname+\"'\";\n\t\t\t//System.out.println(sql1);\n\t\t\tStatement st1=con1.createStatement();\n\t\t\tResultSet res= st1.executeQuery(sql1);//\n\t\t\t//System.out.println(\"there is not exe\");\n\t\t\tres.next();\n\t\t\tString upws=res.getString(\"upasswords\");\n\t\t\t//System.out.println(upws);\n\t\t\tres.close();\n\t\t\tst1.close();\n\t\t\tcon1.close();\n\t\t\tjdbcconnect.jdbcclose();\n\t\t\tif(upasswords.equals(upws)){\n\t\t\t\tString sql=\"delete from records where rid=\"+rid;\n\t\t\t\tString sqlmember=\"delete from members where rid=\"+rid;\n\t\t\t\t\tConnection conn=jdbcconnect.connnect();\n\t\t\t\tStatement stmt;\n\t\t\t\tSystem.out.println(sql);\n\t\t\t\tSystem.out.println(sqlmember);\n\t\t\t\tstmt=conn.createStatement();\n\t\t\t\tif(stmt.executeUpdate(sqlmember)>0) {\n\t\t\t\t\tif(stmt.executeUpdate(sql)>0){System.out.println(\"delete succeed!\");result= true;}\n\t\t\t\t}\n\t\t\t\telse System.out.println(\"fail to delete!\");\n\t\t\t\tstmt.close();\n\t\t\t\tjdbcconnect.jdbcclose();\n\t\t\t\t}\n\t\t\t}catch(Exception e){System.out.println(e);}\n\t\t}\n\t\treturn result;\n\t}", "public static String deleteAuthUserCredentialsForRallyMember(WebDriver driver) throws ClassNotFoundException, SQLException, java.text.ParseException\n\t{\n\t\tString port = Directory.Oracle_Port;\n\t\tString database_name=Directory.Oracle_Databasename;\n\t\tString user = Directory.Oracle_User;\n\t\tString pass = Directory.Oracle_Pass;\n\t\tString hostname =Directory.Oracle_Hostname;\n\t\tString url =\"jdbc:oracle:thin:@\"+hostname+\":\"+port+\":\"+database_name+\"\";\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\tConnection conn = DriverManager.getConnection(url,user,pass);\n\t\tSystem.out.println(\"connection success\");\n\t\tString memberEmail=Directory.Rally_TestPage_DefaultSubdomain_Email;\n\t\tSystem.out.println(memberEmail);\n\t\tPreparedStatement st = conn.prepareStatement(\"delete from AUTH_USER_CREDENTIALS where COMMON_USER_ID in(select id from account where lower(email)=lower('\"+memberEmail+\"'))\");\n\t st.executeUpdate();\n\t Statement stat=conn.createStatement();\n\t stat.executeQuery(\"COMMIT\");\n\t System.out.println(\"Rows deleted: \"+st);\n\t return memberEmail;\n\t}", "public int Rejectcomp(Long id) throws SQLException {\n\tLong idd=null;\r\n\trs=DbConnect.getStatement().executeQuery(\"select login_id from company where comp_id=\"+id+\"\");\r\n\tif(rs.next())\r\n\t{\r\n\t\tidd=rs.getLong(1);\r\n\t}\r\n\tSystem.out.println(idd);\r\n\tint i=DbConnect.getStatement().executeUpdate(\"delete from login where login_id=\"+idd+\"\");\r\n\treturn i;\r\n}", "public boolean deleteAccount() {\r\n String delete = \"DELETE FROM LOG WHERE username='\" + this.username + \"'\";\r\n return model.ConnectToSql.update(delete);\r\n }", "@Test\n @Order(2)\n public void deleteCredential() throws InterruptedException {\n List<WebElement> credentials = home.getCredentialItems();\n int initialCredentialsCount = credentials.size();\n\n int credentialPosition = new Random().nextInt(credentials.size() - 1);\n WebElement deleteCredentialButton = credentials.get(credentialPosition).findElement(By.id(\"deleteCredentialBtn\"));\n\n // For additional check\n String currentDeleteUrl = deleteCredentialButton.getAttribute(\"href\");\n deleteCredentialButton.click();\n\n moveToCredentialsTab();\n assertEquals(home.getCredentialItems().size(), initialCredentialsCount - 1);\n\n boolean stillExists = false;\n for (WebElement webElement : home.getCredentialItems()){\n deleteCredentialButton = webElement.findElement(By.id(\"deleteCredentialBtn\"));\n stillExists = deleteCredentialButton.getAttribute(\"href\").equals(currentDeleteUrl);\n\n if(stillExists) break;\n }\n\n assertFalse(stillExists);\n\n home.logout();\n }", "@Override\n\tpublic int delete(Uri uri, String selection, String[] selectionArgs) {\n\t\tint cnt = 1;\n\t\tmChallengesDB.del();\n\t\treturn cnt;\n\t}", "boolean deleteClient(Integer id) throws SQLException;", "int deleteByPrimaryKey(@Param(\"roleId\") String roleId, @Param(\"adminId\") String adminId);", "int deleteByPrimaryKey(Long accountid);", "public int delComp(Long cid, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String eMail,\r\n\t\tLong shareamt, Long getnoShare)throws SQLException {\n\tLong id=null;\r\n\trs=DbConnect.getStatement().executeQuery(\"select login_id from company where comp_id=\"+cid+\"\");\r\n\tif(rs.next())\r\n\t{\r\n\t\tid=rs.getLong(1);\r\n\t}\r\n\tint i=DbConnect.getStatement().executeUpdate(\"Delete from login where login_id=\"+id+\"\");\r\n\treturn i;\r\n}", "private void deletePassword() {\n\t\t// Which entries have been selected?\n\t\tint[] selectedRows = passwordsTable.getSelectedRows();\n\t\tif (selectedRows.length == 0) // no password entry selected\n\t\t\treturn;\n\n\t\t// Ask user to confirm the deletion\n\t\tif (showConfirmDialog(\n\t\t\t\tnull,\n\t\t\t\t\"Are you sure you want to delete the selected username and password entries?\",\n\t\t\t\tALERT_TITLE, YES_NO_OPTION) != YES_OPTION)\n\t\t\treturn;\n\n\t\tString exMessage = null;\n\t\tfor (int i = selectedRows.length - 1; i >= 0; i--) { // delete from backwards\n\t\t\t// Get service URI for the current entry\n\t\t\tURI serviceURI = URI.create((String) passwordsTable.getValueAt(selectedRows[i], 1));\n\t\t\t// current entry's service URI\n\t\t\ttry {\n\t\t\t\t// Delete the password entry from the Keystore\n\t\t\t\tcredManager.deleteUsernameAndPasswordForService(serviceURI);\n\t\t\t} catch (CMException cme) {\n\t\t\t\texMessage = \"Failed to delete the username and password pair from the Keystore\";\n\t\t\t}\n\t\t}\n\t\tif (exMessage != null)\n\t\t\tshowMessageDialog(this, exMessage, ERROR_TITLE, ERROR_MESSAGE);\n\t}", "public void delete(int acc_num) {\n accountRepository.deleteById(acc_num);\n }", "@Transactional\r\n public void delete(long directProjectId) throws ContributionServiceException {\r\n String signature = CLASS_NAME + \".delete(long directProjectId)\";\r\n\r\n deleteEntity(signature, DirectProjectCPConfig.class, directProjectId, \"directProjectId\");\r\n }", "int deleteByPrimaryKey(Integer authenticationId);", "int deleteByPrimaryKey(Integer parklotstatusid);", "boolean delete(Account account);", "@Secured( { \"ROLE_ADMIN\",\"ROLE_PUBLISH\",\"ROLE_WRITE\" })\n\tpublic void delete (Credit credit);", "public static int delete(User u){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection(); \n //melakukan query database untuk menghapus data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement(\"delete from t_user where id=?\"); \n ps.setInt(1,u.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n\n return status; \n }", "public static void delete() throws SQLException{\n\t \n\t\n\t\t String sid = new String();\n\t\t try{\n \t\tSystem.out.println(\"Please enter the sid(Starting with 'B')\\n\"); \n\t\t \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in )); \n\t\t\tsid = br.readLine();\n //Connection to Oracle server\n OracleDataSource ds = new oracle.jdbc.pool.OracleDataSource();\n ds.setURL(\"jdbc:oracle:thin:@grouchoIII.cc.binghamton.edu:1521:ACAD111\");\nConnection conn = ds.getConnection(\"vbobhat1\", \"BingData\");\nCallableStatement cs = conn.prepareCall (\"begin StudRegSys.delete_student(:1); end;\");\n\t \t \n\t \t\tcs.setString(1,sid);\n\t \t\tcs.executeQuery();\n\t \t\tSystem.out.println(\"Student Successfully deleted from student table!\");\n\t\t\tSystem.out.println(\"\\n\\n\");\n\t\t \n\t\t }\n\tcatch (SQLException ex) { System.out.println (\"\\n*** SQLException caught ***\\n\" + ex.getMessage());}\n catch (Exception e) {System.out.println (\"\\n*** other Exception caught ***\\n\");}\n }", "public static synchronized int addCred(Credentials cred){\n\t\t\tint status=0;\t\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"INSERT INTO credential (Email, Pass, User_ID, Role, \" +\n\t\t\t\t\t\"Validated, RegKey) VALUES(?,?,?,?,?,?) \";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\n\t\t\t\tstatement.setString(1, cred.getEmail());\n\t\t\t\tstatement.setString(2, cred.getPass());\n\t\t\t\tstatement.setInt(3, cred.getUserID());\n\t\t\t\tstatement.setString(4, cred.getRole());\n\t\t\t\tstatement.setInt(5, cred.getValid());\n\t\t\t\tstatement.setString(6, cred.getRegKey());\n\t\t\t\tstatus = statement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\n\t\t\treturn status;\n\t}", "int deleteByPrimaryKey(Long socialSecurityAccountId);", "@Override\n\tpublic void delete(Integer roleid) {\n\t\tjdbcTemplate.update(\"delete from role where id=?\",roleid);\n\t}", "int deleteByPrimaryKey(Integer roleId);", "int deleteByPrimaryKey(Integer roleId);", "boolean deleteUserAccount(long userAccountId);", "public int Rejectbroker(Long id) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"delete from login where loginid=\"+id+\"\");\r\n\treturn i;\r\n}", "@Override\r\n\tpublic int deleteAccountByPrimaryKey(String accountId) {\n\t\treturn this.accountMapper.deleteAccountByPrimaryKey(accountId);\r\n\t}", "void deleteAccount(Account account) throws SQLException {\n String query = \"DELETE FROM CARD WHERE id = ?;\";\n PreparedStatement pstm = conn.prepareStatement(query);\n pstm.setInt(1, account.getId());\n\n int result = pstm.executeUpdate();\n }", "public int Rejectuser(Long id) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"delete from login where loginid=\"+id+\"\");\r\n\treturn i;\r\n\r\n}", "public void delete(StructuredTableContext context, CredentialProfileId id)\n throws IOException, NotFoundException {\n StructuredTable table = context.getTable(CredentialProviderStore.CREDENTIAL_PROFILES);\n Collection<Field<?>> key = Arrays.asList(\n Fields.stringField(CredentialProviderStore.NAMESPACE_FIELD,\n id.getNamespace()),\n Fields.stringField(CredentialProviderStore.PROFILE_NAME_FIELD,\n id.getName()));\n table.delete(key);\n }", "int deleteByPrimaryKey(String loginuuid);", "public int deleteCard() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn CreditCardDA.deleteCard(id);\r\n\t}", "@Override\n\tpublic int deleteRoleInfo(int roleid) throws Exception {\n\t\tDBContextHolder.setDBType(\"0\");\n\t\treturn froleMapper.deleteRoleInfo(roleid);\n\t}", "@Override\r\n\tpublic int delRoleAuth(long raId) {\n\t\treturn 0;\r\n\t}", "public int handleDeleteError(String target, int errCode, String errMsg);", "@Override\r\n\tpublic boolean delete(String email, String pw) {\n\t\treturn jdbcTemplate.update(\"delete s_member where email=?,pw=?\", email,pw)>0;\r\n\t}", "public static int deleteUser(int adminId) {\r\n\t\t//conn = DBConnection.getConnection();\r\n\t\tPreparedStatement statement;\r\n\t\ttry {\r\n\r\n\t\t\tstatement = conn.prepareStatement(deleteQuery);\r\n\t\t\tstatement.setInt(1, adminId);\r\n\t\t\tint rowsUpdated = statement.executeUpdate();\r\n\t\t\tif (rowsUpdated == 1)\r\n\t\t\t\treturn 1;\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "int deleteByPrimaryKey(Integer spAccount);", "@Delete({\n \"delete from A_USER_ROLE\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);", "@Override\n public void deleteStatus(Status s) {\n }", "int deleteByPrimaryKey(String depCode);", "@Override\r\n\tpublic String delete() {\n\t\tList<Object> paramList=new ArrayList<Object>();\r\n\t\tparamList.add(admin.getAdminAccount());\r\n\t\tboolean mesg=false;\r\n\t\tif(adminDao.doDelete(paramList)==1)\r\n\t\t\tmesg=true;\r\n\t\tthis.setResultMesg(mesg, \"ɾ³ý\");\r\n\t\treturn SUCCESS;\r\n\t}", "public void testDelete() {\n\t\ttry {\n\t\t\tServerParameterTDG.create();\n\n\t\t\t// insert\n\t\t\tServerParameterTDG.insert(\"paramName\", \"A description\", \"A value\");\n\t\t\t// delete\n\t\t\tassertEquals(1, ServerParameterTDG.delete(\"paramName\"));\n\t\t\t\t\n\t\t\tServerParameterTDG.drop();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.drop();\n\t\t\t} catch (SQLException e) {\n\t\t\t}\n\t\t}\n\t}", "public int Rejuser(Long id) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"delete from login where login_id=\"+id+\"\");\r\n\treturn i;\r\n\t\r\n}", "int deleteByPrimaryKey(Integer roleResId);", "public static String deleteAuthUserCredentialsForRAMember(WebDriver driver,String memEmail) throws ClassNotFoundException, SQLException, java.text.ParseException\n\t{\n\t\tString port = Directory.Oracle_Port;\n\t\tString database_name=Directory.Oracle_Databasename;\n\t\tString user = Directory.Oracle_User;\n\t\tString pass = Directory.Oracle_Pass;\n\t\tString hostname =Directory.Oracle_Hostname;\n\t\tString url =\"jdbc:oracle:thin:@\"+hostname+\":\"+port+\":\"+database_name+\"\";\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\tConnection conn = DriverManager.getConnection(url,user,pass);\n\t\tSystem.out.println(\"connection success\");\n\t\tSystem.out.println(memEmail);\n\t\tPreparedStatement st = conn.prepareStatement(\"delete from AUTH_USER_CREDENTIALS where COMMON_USER_ID in(select id from account where lower(email)=lower('\"+memEmail+\"'))\");\n\t st.executeUpdate();\n\t Statement stat=conn.createStatement();\n\t stat.executeQuery(\"COMMIT\");\n\t System.out.println(\"Rows deleted: \"+st);\n\t return memEmail;\n\t}", "public void DeleteUser(Connection conn, int id) throws DbException\r\n {\r\n Statement stmt = null;\r\n String sql = \"\";\r\n try \r\n {\r\n sql = \"update users set status='D' where id = \"+id;\r\n stmt = conn.createStatement();\r\n stmt.execute(sql);\r\n \r\n \r\n } \r\n catch (SQLException sqle) \r\n {\r\n sqle.printStackTrace(System.err);\r\n \r\n throw new DbException(\"Internal error. Failed to delete user\\n(\" +\r\n sqle.getMessage() + \")\");\r\n } \r\n finally \r\n {\r\n try \r\n {\r\n if (stmt != null) stmt.close();\r\n } \r\n catch (SQLException ignored) \r\n {}\r\n }\r\n }", "public boolean delete(long arg) throws DeleteException {\n Connection conn = null;\n try {\n conn = getConnection();\n return delete(arg, conn);\n } catch (DeleteException deleteE) {\n throw new DeleteException(deleteE.getMessage());\n } catch (Exception e) {\n throw new DeleteException(e.getMessage());\n } finally {\n JDBCUtil.release(conn,null,null,null);\n }\n }", "boolean deleteEntry(String id) throws SQLException;", "Status destroyStatus(long statusId) throws TwitterException;", "protected Response delete(String csid, ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx)\r\n throws Exception {\r\n getRepositoryClient(ctx).delete(ctx, csid);\r\n return Response.status(HttpResponseCodes.SC_OK).build();\r\n }", "void DeleteCompteUser(int id);", "int deleteByExample(SysAuthenticationExample example);", "@Override\n\tpublic int deleteUser(String username) throws SQLException {\n\t\tnumberOfRowsImpacted = 0;\n\t\t\n\t\tc = DriverManager.getConnection(dbURL, user, password);\n\t\tSystem.out.println(\"Connection Successful! \" + dbURL + \" User: \" + user + \" PW: \" + password);\n\n\t\t//create a SQL statement\n\t\tpstmt = c.prepareStatement(\"delete from thatcoffeeshop.user where username = ?\");\n\t\tpstmt.setString(1, username);\n\t\t\n\t\t//execute the statement\n\t\tnumberOfRowsImpacted = pstmt.executeUpdate();\n\t\t\n\t\t//success msg\n\t\tSystem.out.println(\"Rows affected \" + numberOfRowsImpacted);\n\n\t\tpstmt.close();\n\t\tc.close();\n\t\t\n\t\treturn numberOfRowsImpacted;\n\t}", "@Override\n\tpublic void delete(String bc_id) {\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(driver);\n\t\t\tcon = DriverManager.getConnection(url, userid, passwd);\n\t\t\tpstmt = con.prepareStatement(DELETE);\n\n\t\t\tpstmt.setString(1, bc_id);\n\t\t\t\n\t\t\tpstmt.executeUpdate();\n\t\t\tSystem.out.println(\"刪除成功 delete method\");\n\t\t\t\n\t\t\t\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"Couldn't load database driver. \"\n\t\t\t\t\t+ e.getMessage());\n\t\t} catch (Exception se) {\n\t\t\tthrow new RuntimeException(\"A database error occured. \" + se.getMessage());\n\t\t} finally {\n\t\t\tif (pstmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void delete(Privilege pri) throws Exception {\n\t\tCommandUpdatePrivilege com=new CommandUpdatePrivilege(AuthModel.getInstance().getUser(),pri);\r\n\t\tClient.getInstance().write(com);\r\n\t\tObject obj=Client.getInstance().read();\r\n\t\tif(obj instanceof Command){\r\n\t\t\tdirty=true;\r\n\t\t\tlist=this.get(cond);\r\n\t\t\tthis.fireModelChange(list);\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tthrow new Exception(\"Delete Customer failed...\"+list);\r\n\t}", "int deleteByPrimaryKey(TawRoleDomainKey key);", "@Override\n\tpublic int delete(String username) {\n\t\tUsers user = userDAO.read(username);\n\t\treturn delete(user);\n\t}", "@Override\n\tpublic boolean delete() {\n\t\tString sql=\"DELETE FROM tc_student where id=\"+id;\n\t\t//`\n\t\t\n\t\tSystem.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t}", "public void deleteRecord() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry\n\t\t{\n\t\t\tmyData.record.delete(background.getClient());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "void deleteChallengeById(int id);", "public int delete(LikesStat likesStat) {\n\t\ttry {\n\t\t\treturn db.executeUpdate(\n\t\t\t\t\"DELETE FROM LikesStat WHERE user_id = ? AND signalisation_id = ? AND stat_type = ?\",\n\t\t\t\tnew SQLParameter(likesStat.getUserID()),\n\t\t\t\tnew SQLParameter(likesStat.getSignalingId()),\n\t\t\t\tnew SQLParameter(likesStat.getStatType())\n\t\t\t);\n\t\t} catch (SQLException exception) {\n\t\t\tSystem.err.println(\"Unexpected error in LikeStatDao delete : \" + exception);\n\t\t\treturn -1;\n\t\t}\n\t}", "@Override\n\tpublic void delete(Account a) throws SQLException, InvalidAccountException {\n\t\tif (!isValidAccount(a))\n\t\t\tthrow new InvalidAccountException();\n\n\t\t// Receive account variable\n\t\tint id = a.getId();\n\n\t\t// Prepare SQL\n\t\tString sqlQuery = \"DELETE FROM account \"\n\t\t\t\t+ \"WHERE id = ?\";\n\t\tPreparedStatement statement = dbConnection.prepareStatement(sqlQuery);\n\t\tstatement.setInt(1, id);\n\n\t\t// Execute, throws error if failed\n\t\tstatement.executeUpdate();\n\t\tstatement.close();\n\t}", "public boolean delete(String username, int menuId);", "public int DelCompany(Long cid, String compname, Long shareamt, Long getnoShare) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"delete from company where comp_id=\"+cid+\"\");\r\n\treturn i;\r\n}", "public abstract boolean delete(long arg, Connection conn) throws DeleteException;", "public void deleteSelectionRowTable(boolean status) {\n tableList.deleteSelectionItem(status);\n }", "private CommandResult deleteLesson() throws KolinuxException {\n timetable.executeDelete(parsedArguments);\n logger.log(Level.INFO, \"User has deleted\" + parsedArguments[0].toUpperCase()\n +\n \" from the timetable.\");\n return new CommandResult(parsedArguments[0].toUpperCase()\n +\n \" \" + parsedArguments[1].toUpperCase() + \" \" + parsedArguments[3] + \" \"\n +\n parsedArguments[2].toLowerCase()\n +\n \" has been deleted from timetable\");\n }", "public boolean deleteAccount(String accountNumber) {\r\n\t\t// check whether this account has no money left or due ( balance=0 )\r\n\t\t// only when balance =0 can delete\r\n\r\n\t\tif (!DaoUtility.isAccountNumberValid(accountNumber))\r\n\t\t\treturn false;\r\n\r\n\t\tConnection conn = null;\r\n\t\ttry {\r\n\t\t\tconn = dbConnector.getConnection();\r\n\t\t\tif (conn == null) // cannot connect to DB\r\n\t\t\t\treturn false;\r\n\r\n\t\t\tPreparedStatement pst;\r\n\t\t\tString sql;\r\n\t\t\tResultSet rs;\r\n\r\n\t\t\t// Search is this account has balance !=0 ?\r\n\t\t\tsql = \"select * from tbAccount where \" + \" acnumber= ? \"\r\n\t\t\t\t\t+ \" and balance <> 0\";\r\n\r\n\t\t\tpst = conn.prepareStatement(sql);\r\n\t\t\tpst.setString(1, accountNumber);\r\n\r\n\t\t\trs = pst.executeQuery();\r\n\t\t\t// if exist non-emply account, then REFUSE to delete client\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// ---------------- Batch Transaction\r\n\t\t\tint nRs = 0;\r\n\t\t\tconn.setAutoCommit(false); // begin Transaction\r\n\t\t\tSavepoint savepnt = conn.setSavepoint();\r\n\t\t\ttry {\r\n\t\t\t\t// remove(from table Transaction where username = 'userName');\r\n\t\t\t\tsql = \"delete from tbTransaction where aid = \"\r\n\t\t\t\t\t\t+ \"(select aid from tbAccount where \"\r\n\t\t\t\t\t\t+ \" acnumber = ? )\";\r\n\r\n\t\t\t\tpst = conn.prepareStatement(sql);\r\n\t\t\t\tpst.setString(1, accountNumber);\r\n\t\t\t\tpst.executeUpdate();\r\n\r\n\t\t\t\t// remove(from table Account where acnumber= 'acnumber');\r\n\t\t\t\tsql = \"delete from tbAccount where acnumber = ? \";\r\n\t\t\t\tpst = conn.prepareStatement(sql);\r\n\t\t\t\tpst.setString(1, accountNumber);\r\n\t\t\t\tnRs = pst.executeUpdate(); // nRs: number of account row deleted\r\n\r\n\t\t\t\tconn.commit(); // commit and end Transaction\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t} finally {\r\n\t\t\t\tconn.setAutoCommit(true);\r\n\t\t\t}\r\n\t\t\t// ---------------- Execute batch\r\n\r\n\t\t\treturn (nRs == 1); // 1 account deleted.\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public void delete(String username);", "int deleteByExample(StatusByUserExample example);", "@Delete({\n \"delete from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int deleteByPrimaryKey(String username);", "void deleteById(String accountNumber) throws AccountException;", "public static synchronized int resetCred(int userID, String password){\n\t\t\tint status=0;\t\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"Update credential Set Pass = ? Where User_ID = ?\";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\n\t\t\t\tstatement.setString(1, password);\n\t\t\t\tstatement.setInt(2, userID);\n\t\t\t\tstatus = statement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn status;\n\t}", "public boolean delUser(int id) throws Exception {\n\t\treturn false;\n\t}", "public int deleteExistingUser(String uname){\n\t\tif(this.connHndlr == null)\n\t\t\tthis.connHndlr = new ConnectionHandler();\n\t\tConnection conn = this.connHndlr.getConnection();\n\t\tint returnvalue = 0;\n\t\t\n\t\tuname = uname.toLowerCase();\t\t\n\t\ttry{\n\t\t\tString vfnQuery = \"select * from LoginDetails l where l.username = '\" + uname + \"'\";\n\t\t\tthis.stmt = conn.createStatement();\n\t\t\tthis.resultSet = this.stmt.executeQuery(vfnQuery);\n\t\t\tif(this.resultSet.next()){\n\t\t\t\tString delQuery = \"delete from LoginDetails where username = '\" + uname + \"'\" ;\n\t\t\t\tthis.preparedStatement = conn.prepareStatement(delQuery);\n\t\t\t\tthis.preparedStatement.executeUpdate();\n\t\t\t\treturnvalue = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturnvalue = 0;\n\t\t\t}\t\t\t\n\t\t}\n\t\tcatch(SQLException se){\n\t\t\tSystem.out.println(\"SQL Exception \" + se.getMessage());\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Exception \" + e.getMessage());\n\t\t}\n\t\treturn returnvalue;\n\t}", "public void delete(int roleId) throws QuestionBankSystemException,\n\t\t\tQuestionBankException;", "int deleteByExample(StatusRepliesExample example);", "int deleteByPrimaryKey(Long catalogId);", "public static int delete(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection(); \n //melakukan query database untuk menghapus data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement(\"delete from periode where id=?\"); \n ps.setInt(1,p.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n\n return status; \n }", "public SlingHttpResponse deleteLaunch(String path, int... expectedStatus) throws ClientException {\n\n FormEntityBuilder feb = FormEntityBuilder.create();\n\n // the command\n feb.addParameter(\"cmd\", CMD_DELETE_LAUNCH);\n\n // title of new launch section\n feb.addParameter(\"path\", path);\n\n return executeWCMCommand(CMD_CREATE_LAUNCH, feb, expectedStatus);\n }", "@DELETE\n @Path(\"bank/account/{account_id}\")\n public void deleteBankAccunt(@PathParam(\"account_id\") \n String accountId) {\n int id = Integer.parseInt(accountId);\n System.out.println(id);\n }", "int deleteByPrimaryKey(Long id_access);", "private static ErrorType handleDelUser(String username) {\n\t\tUser user = VersionControlDb.findUser(username); \n\t\tif (user == null) {\n\t\t\treturn ErrorType.USER_NOT_FOUND;\n\t\t}\n\t\telse {\n\t\t\tVersionControlDb.delUser(user);\n\t\t\treturn ErrorType.SUCCESS;\n\t\t}\n\t}", "public boolean eliminarCliente(int codigo){\n\t\ttry{\n\t\t\tString insert = \"DELETE FROM clientes WHERE codigo = ? ;\";\n\t\t\tPreparedStatement ps = con.prepareStatement(insert);\n\t\t\tps.setInt(1, codigo);\n\t\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\t\t\t\n\t\t\tps.executeUpdate();\t\n\t\t\tcon.commit();\n\t\t\treturn true;\n\t\t}catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n public void deleteAccount() {\n Account accountToBeDeleted = new Account(\"deleteMe\", \"deleteMe\", false,\n \"Fontys Stappegoor\", \"deleteme@trackandtrace.com\");\n accountQueries.addAccount(accountToBeDeleted);\n\n // Get ID of recently inserted Account to be able to test deletion\n Account toDelete = accountQueries.getAccountByUserName(\"deleteMe\");\n boolean succeeded = accountQueries.deleteAccount(toDelete.getID());\n\n assertEquals(succeeded, true);\n }", "int delete(Long id) throws SQLException, DAOException;", "@Override\r\n public boolean deleteActiveStatus(ActiveStatusModel pStatusModel) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }", "void delete(Accessprofile accessprofile);", "@When(\"^the admin deletes the owner with a specified id$\")\n\tpublic void the_admin_deletes_the_owner_with_a_specified_id() throws Throwable {\n\t throw new PendingException();\n\t}", "@Override\n public void delete(int id) throws DAOException {\n doDataManipulation(dataSource, DELETE_PASSPORT_BY_ID_QUERY, \"DAO layer: cannot delete passport\",\n preparedStatement -> preparedStatement.setInt(1, id)\n );\n }", "public void deleteTarjetaDeCredito(Long id,Long numero)\n {\n TarjetaDeCreditoEntity tarjeta= persistence.findByNumber(id,numero);\n if (tarjeta == null) \n {\n LOGGER.log(Level.SEVERE, \"tarjeta con el id {0} no existe\",numero);\n }\n else\n {\n LOGGER.log(Level.INFO, \"Inicia proceso de Eliminar Tarjeta con numero\", numero);\n List<FacturaEntity> factura =facturaLogica.getFacturaTarjeta(tarjeta.getId());\n if (factura.size() != 0)\n {\n for (FacturaEntity facturaEntity : factura) \n {\n facturaEntity.setTarjetadecredito(null);\n }\n \n persistence.delete(tarjeta.getId());\n LOGGER.log(Level.INFO, \"Termina proceso de Eliminar tarjeta con numero\", numero);\n }\n else\n { \n persistence.delete(tarjeta.getId());\n LOGGER.log(Level.INFO, \"Termina proceso de Eliminar tarjeta con numero\", numero);\n } \n }\n }", "@Path (\"project/{repositoryId}/{groupId}/{projectId}\")\n @DELETE\n @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })\n @RedbackAuthorization (noPermission = true)\n ActionStatus deleteProject( @PathParam (\"groupId\") String groupId, @PathParam (\"projectId\") String projectId,\n @PathParam (\"repositoryId\") String repositoryId )\n throws ArchivaRestServiceException;", "String deleteClientAccount(Integer clientAccountId) throws ServiceException;" ]
[ "0.6450053", "0.63697594", "0.61428446", "0.5999235", "0.5917837", "0.58662486", "0.5753313", "0.57138765", "0.5690198", "0.56662655", "0.56555796", "0.56477123", "0.55893284", "0.557115", "0.55524623", "0.55467474", "0.5528245", "0.55223197", "0.5518465", "0.54976404", "0.54811394", "0.5467112", "0.54650724", "0.5462994", "0.54315495", "0.5431104", "0.5430678", "0.54159087", "0.5413074", "0.5413074", "0.5409457", "0.53967655", "0.5394436", "0.53937757", "0.5392859", "0.5385048", "0.5374011", "0.5370941", "0.535687", "0.53298384", "0.53260887", "0.5314172", "0.5310387", "0.5306328", "0.5305339", "0.52949095", "0.527837", "0.52563894", "0.5254005", "0.5251674", "0.52483433", "0.5237251", "0.5226881", "0.5225424", "0.5219105", "0.5211122", "0.52071166", "0.5205453", "0.5199777", "0.51889336", "0.51888204", "0.51867944", "0.5181816", "0.5180954", "0.5180726", "0.51795864", "0.5179013", "0.51755995", "0.5175104", "0.51711804", "0.5166447", "0.51645386", "0.5158657", "0.5155247", "0.51487035", "0.514861", "0.51481825", "0.51440567", "0.5142193", "0.51401526", "0.5132661", "0.51311797", "0.5129345", "0.5128363", "0.5122372", "0.5122031", "0.5120056", "0.51196486", "0.5114798", "0.51138055", "0.510563", "0.51040685", "0.5099452", "0.50923765", "0.50916207", "0.50881374", "0.508554", "0.50802094", "0.507844", "0.50781727" ]
0.8470999
0
Method................................................validated Author......................................................JLH This method changes the validated int from 1 to 0 signifying that the user has validated their email address Return Value (int) status: Returns an int that indicates the success or failure of the updated validated int
public static synchronized int validated(int userID, String key){ int status=0; Connection connection; String preparedSQL = "Update credential Set Validated = ? Where User_ID = ? And RegKey = ?"; PreparedStatement statement=null; try{ connection=DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setInt(1, 0); statement.setInt(2, userID); statement.setString(3, key); status = statement.executeUpdate(); statement.close(); connection.close(); }catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } return status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validate(){\n if (validated){\n validated = false;\n } else {\n validated = true;\n }\n }", "ValidationResponse validate();", "private void updatestatuscode() {\r\n String error = null;\r\n if (inValidStatus()) {\r\n error = getJson(\"msg\");\r\n }\r\n if (error != null) {\r\n if (error.equals(\"Cannot login Check your username or pass\")) {\r\n statuscode = 1;\r\n } else if (error.equals(\"Your account is not premium\")) {\r\n statuscode = 2;\r\n } else {\r\n /* TODO: Enable code below once all known errors are correctly handled */\r\n // statuscode = 666;\r\n }\r\n } else {\r\n if (inValidStatus() && \"null\".equalsIgnoreCase(getJson(\"link\"))) {\r\n statuscode = 3;\r\n } else {\r\n /* Everything should be ok */\r\n statuscode = 0;\r\n }\r\n }\r\n }", "@Override\r\n\tpublic int emailcheck(String email) {\n\t\treturn dao.idcheck(email);\r\n\t}", "@Test\n\tpublic void testValidate()\n\t{\n\t\tSystem.out.println(\"validate\");\n\t\tUserTypeCode userTypeCode = new UserTypeCode();\n\t\tuserTypeCode.setCode(\"Test\");\n\t\tuserTypeCode.setDescription(\"Test\");\n\n\t\tValidationModel validateModel = new ValidationModel(userTypeCode);\n\t\tvalidateModel.setConsumeFieldsOnly(true);\n\n\t\tValidationResult result = ValidationUtil.validate(validateModel);\n\t\tSystem.out.println(\"Any Valid consume: \" + result.toString());\n\t\tif (result.valid() == false) {\n\t\t\tAssert.fail(\"Failed validation when it was expected to pass.\");\n\t\t}\n\t\tSystem.out.println(\"---------------------------\");\n\n\t\tvalidateModel = new ValidationModel(userTypeCode);\n\t\tresult = ValidationUtil.validate(validateModel);\n\t\tSystem.out.println(\"Faild: \" + result.toString());\n\t}", "public User validate(String emailID , String password);", "void validate(String email);", "@Test\n public void testGetIsAccountVerified() {\n System.out.println(\"getIsAccountVerified Test (Passing value)\");\n Boolean expResult = Boolean.TRUE;\n Boolean result = user.getIsAccountVerified();\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertEquals(expResult, result);\n }", "public int getValidUserEmail(Validation v) {\r\n\r\n\t\t\r\n\t\tint a=0;\r\n\t\tString query=\"select * from user_registration where user_name='\"+v.getUsername() +\"' and email='\"+v.getEmail()+\"'\";\r\n\t\t\r\n\t\tRowMapper<Validation> rowMapper=new RowMapper<Validation>() {\r\n\r\n\t\t\tpublic Validation mapRow(ResultSet rs, int row) throws SQLException {\r\n\t\t\t\t Validation v=new Validation();\r\n\t\t\t\t v.setUsername(rs.getString(\"user_name\"));\r\n\t\t\t\t v.setPassword(rs.getString(\"email\"));\r\n\t\t\treturn v;\r\n\t\t\t}\r\n\t\t};\r\n\t\tList<Validation> list=jdbctemplate.query(query, rowMapper);\r\n\t\t a=list.size()>0?1:0; \r\n\t\treturn a;\r\n\t}", "@Test\n public void testSetIsAccountVerified() {\n System.out.println(\"setIsAccountVerified Test (Passing value)\");\n Boolean isAccountVerified = Boolean.TRUE;\n user.setIsAccountVerified(isAccountVerified);\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertTrue(violations.isEmpty());\n }", "protected void validateEmail(){\n\n //Creating Boolean Value And checking More Accurate Email Validator Added\n\n Boolean email = Pattern.matches(\"^[A-Za-z]+([.+-]?[a-z A-z0-9]+)?@[a-zA-z0-9]{1,6}\\\\.[a-zA-Z]{2,6},?([.][a-zA-z+,]{2,6})?$\",getEmail());\n System.out.println(emailResult(email));\n }", "public EPPNameVerificationStatus getStatus() {\n\t\treturn this.status;\n\t}", "public void validate() {}", "@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t\t// if (resultCode == RESULT_OK) {\r\n\t\t// if (requestCode == editRequest) { //修改成功后的状态一定是审核状态\r\n\t\t// m_nstatus = HeadhunterPublic.TASK_STATUS_AUDIT;\r\n\t\t// rewardInfo.setTask_status(String.valueOf(m_nstatus));\r\n\t\t// refresh();\r\n\t\t// setResult(RESULT_OK);\r\n\t\t// }\r\n\t\t// }\r\n\t}", "@Test\n\t\tvoid givenEmail_CheckForValidationForEmail_RetrunTrue() {\n\t\t\tboolean result = ValidateUserDetails.validateEmails(\"abc.xyz@bl.com\");\n\t\t\tAssertions.assertTrue(result);\n\t\t}", "public boolean isValidated(){\n return getValidatedFlag();\n }", "@Override\n\tpublic boolean validateRequest(String userEmail, String senderEmail) {\n\t\tconn = ConnectionFactory.getConnection();\n\n\t\ttry {\n\t\t\tString sql = \"select count(*) as rowcount from friendship where user_id_1=? and user_id_2=? and status='N'\";\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t\tpstmt.setString(1, senderEmail);\n\t\t\tpstmt.setString(2, userEmail);\n\n\t\t\tset = pstmt.executeQuery();\n\n\t\t\tset.next();\n\t\t\t\n\t\t\tint rowcount = set.getInt(\"rowcount\");\n\t\t\t\n\t\t\tif(rowcount > 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t} catch(SQLException sqlex) {\n\t\t\tsqlex.printStackTrace();\n\t\t} catch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionFactory.closeResources(set, pstmt, conn);\n\t\t}\n\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean isValid(String email, ConstraintValidatorContext context) {\n\t\t\r\n\t\tif(service==null){\r\n\t\t\t return true;\r\n\t\t}\r\n\t\treturn service.getUser(email)==null;\r\n\t\t\t\t\r\n\t}", "public void setStatus(EPPNameVerificationStatus aStatus) {\n\t\tthis.status = aStatus;\n\t}", "@Test\n\t\tvoid givenEmail_CheckForValidationForMobile_RetrunTrue() {\n\t\t\tboolean result = ValidateUserDetails.validateMobile(\"98 9808229348\");\n\t\t\tAssertions.assertTrue(result);\n\t\t}", "@Override\n\tpublic ChangeReferralStatusResponse setReferralStatus(ReferralStatusRequestModel referralStatusRequestModel)\n\t\t\tthrows CustomException {\n\n\t\tif (referralStatusRequestModel.getReferal_id() == 0) {\n\t\t\tthrow new CustomException(413, \"Invalid referral id\");\n\t\t}\n\t\t/*\n\t\t * if(referralStatusRequestModel.getApplicant_email().isEmpty()){ throw\n\t\t * new CustomException(413, \"Please enter email id\"); }\n\t\t */\n\t\tif (referralStatusRequestModel.getReferral_status().isEmpty()) {\n\t\t\tthrow new CustomException(413, \"Status entered is invalid\");\n\t\t}\n\n\t\tEmployeeReferal employeeReferal = employeeReferalRepository.findOne(referralStatusRequestModel.getReferal_id());\n\t\tif (Objects.isNull(employeeReferal)) {\n\t\t\tthrow new CustomException(204, \"Referal id does not exists\");\n\t\t}\n\n\t\t/*\n\t\t * if\n\t\t * (referralStatusRequestModel.getReferral_status().compareTo(\"Joined\")\n\t\t * == 0) { if\n\t\t * (referralStatusRequestModel.getApplicant_email().isEmpty()) { throw\n\t\t * new CustomException(204, \" Email is Mandatory\"); } User user =\n\t\t * userRepo.findByEmail(referralStatusRequestModel.getApplicant_email())\n\t\t * ; if (Objects.isNull(user)) { throw new CustomException(204,\n\t\t * \" User Not yet Registered\"); } if (!user.isActive()) { throw new\n\t\t * CustomException(403, \" User is not Active\"); }\n\t\t * employeeReferal.setApplicant_email(user.getEmail()); }\n\t\t */\n\n\t\temployeeReferal.setApplication_status(referralStatusRequestModel.getReferral_status());\n\t\tDate date = new Date();\n\t\temployeeReferal.setDate(date);\n\t\temployeeReferalRepository.save(employeeReferal);\n\t\tChangeReferralStatusResponse changeReferralResponse = new ChangeReferralStatusResponse();\n\t\tchangeReferralResponse.setDate(employeeReferal.getDate());\n\t\tchangeReferralResponse.setApplicant_name(employeeReferal.getApplicant_name());\n\t\treturn changeReferralResponse;\n\t}", "@Test\n\tpublic void testIsValid()\n\t{\n\t\tSystem.out.println(\"isValid\");\n\n\t\tUserTypeCode userTypeCode = new UserTypeCode();\n\t\tuserTypeCode.setCode(\"Test\");\n\t\tuserTypeCode.setDescription(\"Test\");\n\n\t\tValidationModel validateModel = new ValidationModel(userTypeCode);\n\t\tvalidateModel.setConsumeFieldsOnly(true);\n\n\t\tboolean expResult = true;\n\t\tboolean result = ValidationUtil.isValid(validateModel);\n\t\tassertEquals(expResult, result);\n\n\t\tvalidateModel = new ValidationModel(userTypeCode);\n\n\t\texpResult = false;\n\t\tresult = ValidationUtil.isValid(validateModel);\n\t\tassertEquals(expResult, result);\n\t}", "@Override\r\n\tpublic void processActivate(String username, String validateCode) throws ParseException, ServiceException {\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\t\tUser user=userDao.findUserByLoginName(username); \r\n //验证用户是否存在 \r\n if(user!=null) { \r\n //验证用户激活状态 \r\n if(user.getStatus()==0) { \r\n ///没激活 \r\n Date currentTime = new Date();//获取当前时间 \r\n Date registerTime = user.getRegisterTime();\r\n Date d1 =dateFormat.parse(dateFormat.format(currentTime));\r\n Date d2 =dateFormat.parse(dateFormat.format(registerTime));\r\n long diff = d1.getTime() - d2.getTime();\r\n long days = diff / (1000 * 60 * 60 * 24); \r\n long hours = (diff-days*(1000 * 60 * 60 * 24))/(1000* 60 * 60); \r\n long minutes = (diff-days*(1000 * 60 * 60 * 24)-hours*(1000* 60 * 60))/(1000* 60); \r\n //验证链接是否过期 \r\n if(minutes < 15) { \r\n //验证激活码是否正确 \r\n if(validateCode.equals(user.getValidateCode())) { \r\n //激活成功, //并更新用户的激活状态,为已激活 \r\n \tlogger.info(\"==sq===\"+user.getStatus()); \r\n user.setStatus(1);//把状态改为激活 \r\n logger.info(\"==sh===\"+user.getStatus()); \r\n userDao.updateByPrimaryKey(user);\r\n } else { \r\n throw new ServiceException(\"激活码不正确\"); \r\n } \r\n } else { throw new ServiceException(\"激活码已过期!\"); \r\n } \r\n } else { \r\n throw new ServiceException(\"邮箱已激活,请登录!\"); \r\n } \r\n } else { \r\n throw new ServiceException(\"该邮箱未注册(邮箱地址不存在)!\"); \r\n } \r\n\t}", "boolean isValidStatus();", "@Then(\"user validates status code {string}\")\r\n\tpublic void user_validates_status_code(String arg1) throws Throwable {\n\t\tAssert.assertTrue(StripeCustomer.response.getStatusCode()==Integer.parseInt(arg1));\r\n\t}", "public void validate_the_Preferred_Contact_Method_in_Contact_Details_of_Customer_Tab_Email(boolean status)throws Exception {\n\t\t\t\n\t\t\tboolean checked=VerifyElementPresentAndGetCheckBoxStatus(Desktop_XPATH_Verify_Customer_Page_MarketingPreferences.replaceAll(\"M_Header\", \"Contact Details\").replaceAll(\"M_Category\", \"Preferred Contact Method\").replaceAll(\"M_InnerText\", \"Email\"), \"Preferred Contact Method on Email \");\n\t\t\t\n\t\t\tif(checked==status)\n\t\t\t\tReport.fnReportPass(\"Preferred Contact Method - Email : Checked status = \"+status+\"Display Status\"+checked, driver);\n\t\t\t\telse\n\t\t\t\tReport.fnReportFail(\"Preferred Contact Method - Email : Checked status = \"+status+\"Display Status\"+checked, driver);\n\t\t\t\n\t\t\n\t}", "@Override\n protected Result validate() {\n return successful(this);\n }", "public void setStatus(String status) throws ValidateException {\n\n this.status = status;\n }", "public int getValid() {\n return valid;\n }", "public void setVerificationToSuccessful() {\n verificationSuccessful = true;\n }", "private void checkEmail(UserResource target, Errors errors) {\n final String proc = PACKAGE_NAME + \".checkEmail.\";\n final String userId = target.getId();\n final String email = target.getEmail();\n int found = 0;\n boolean doValidation = false;\n\n logger.debug(\"Entering: \" + proc + \"10\");\n\n final boolean isUpdating = apiUpdating(userId);\n logger.debug(proc + \"20\");\n\n if (isUpdating) {\n final UserEntry user = userRepository.findOne(userId);\n logger.debug(proc + \"30\");\n\n if (!user.getEmail()\n .equals(email)) {\n logger.debug(proc + \"40\");\n\n found = userRepository.updateEmail(email, userId);\n if (found > 0) {\n errors.rejectValue(\"email\", \"user.email.duplicate\");\n }\n else {\n doValidation = true;\n }\n }\n }\n else {\n logger.debug(proc + \"50\");\n\n found = userRepository.uniqueEmail(email);\n if (found > 0) {\n errors.rejectValue(\"email\", \"user.email.duplicate\");\n }\n else {\n doValidation = true;\n }\n }\n\n if (doValidation) {\n logger.debug(proc + \"60\");\n\n final laxstats.web.validators.Validator emailValidator = EmailValidator.getInstance();\n if (!emailValidator.isValid(email)) {\n errors.rejectValue(\"email\", \"user.email.invalidEmail\");\n }\n }\n logger.debug(\"Leaving: \" + proc + \"70\");\n }", "public String getEmailStatus() {\n return emailStatus;\n }", "private int completionCheck() {\n if (nameTB.getText().trim().isEmpty()) {\n AlertMessage.addCustomerError(1);\n return -1;\n }\n if (addressTB.getText().trim().isEmpty()) {\n AlertMessage.addCustomerError(2);\n return -1;\n }\n if (postCodeTB.getText().trim().isEmpty()){\n AlertMessage.addCustomerError(3);\n return -1;\n }\n if (countryCB.getSelectionModel().getSelectedItem() == null) {\n AlertMessage.addCustomerError(4);\n return -1;\n }\n if (stateProvinceCB.getSelectionModel().getSelectedItem() == null) {\n AlertMessage.addCustomerError(5);\n return -1;\n }\n if (phone.getText().trim().isEmpty()) {\n AlertMessage.addCustomerError(6);\n return -1;\n }\n return 1;\n }", "void validate();", "void validate();", "private void validateEmail() {\n myEmailValidator.processResult(\n myEmailValidator.apply(myBinding.editResetEmail.getText().toString().trim()),\n this::verifyAuthWithServer,\n result -> myBinding.editResetEmail.setError(\"Please enter a valid Email address.\"));\n }", "@RequestMapping(value = \"/signup/validateEmail\", method = RequestMethod.POST)\n @ResponseBody\n public SPResponse validateEmail(@RequestParam String email) {\n SPResponse spResponse = new SPResponse();\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"The email to validate :\" + email);\n }\n // validate the email\n User user = userRepository.findByEmail(email); // signupForm.getEmail()\n if (user != null) {\n spResponse.addError(\"Duplicate_Email\",\n MessagesHelper.getMessage(\"exception.duplicateEmail.signup\"));\n } else {\n spResponse.isSuccess();\n }\n return spResponse;\n }", "UserStatus getStatus();", "@Test\n\t\tpublic static void givenFirstName_WhenProper_ShouldReturnTrue() {\n\t\t\tboolean result= ValidateUserDetails.validateFirstName(\"Priyanka\");\n\t\t\tAssertions.assertTrue(result);\n\n\t\t}", "public boolean ApproveReimbursement(int employeeID, int reimburseID, String reason, int status);", "@Test(priority=1)\r\n\tpublic void validateStatusCode()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then()\r\n\t\t.statusCode(200);\r\n\t\t\r\n\t}", "public int getIsVerified() {\r\n return isVerified;\r\n }", "public int getValidSpEmailUname(Validation v) {\r\n\t\tint a=0;\r\nString query=\"select * from sp_final where user_name='\"+v.getUsername() +\"' and email='\"+v.getEmail()+\"'\";\r\n\t\t\r\n\t\tRowMapper<Validation> rowMapper=new RowMapper<Validation>() {\r\n\r\n\t\t\tpublic Validation mapRow(ResultSet rs, int row) throws SQLException {\r\n\t\t\t\t Validation v=new Validation();\r\n\t\t\t\t v.setUsername(rs.getString(\"user_name\"));\r\n\t\t\t\t v.setEmail(rs.getString(\"email\"));\r\n\t\t\treturn v;\r\n\t\t\t}\r\n\t\t};\r\n\t\tList<Validation> list=jdbctemplate.query(query, rowMapper);\r\n\t\t a=list.size()>0?1:0; \r\n\t\treturn a;\r\n\t}", "@Test\n public void testSetEmail() {\n System.out.println(\"setEmail Test (Passing value)\");\n String email = \"jdoe@vlol.com\";\n user.setEmail(email);\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertTrue(violations.isEmpty());\n }", "private boolean validate() {\n\n EditText fnameET = findViewById(R.id.fnameET);\n EditText lnameET = findViewById(R.id.lnameET);\n EditText perNoET = findViewById(R.id.perNoET);\n EditText lecEmailET = findViewById(R.id.lecEmailET);\n EditText adminCodeET = findViewById(R.id.adminCodeET);\n EditText passwET = findViewById(R.id.passwET);\n EditText cpasswET = findViewById(R.id.cpasswET);\n\n String fname = fnameET.getText().toString().trim();\n String lname = lnameET.getText().toString().trim();\n String personNo = perNoET.getText().toString().trim();\n String lectEmail = lecEmailET.getText().toString().trim();\n String adminCode = adminCodeET.getText().toString().trim();\n String password = passwET.getText().toString().trim();\n String cpassword = cpasswET.getText().toString().trim();\n\n //boolean flag;\n\n if(fname.isEmpty()) {\n fnameET.setError(\"Field can't be empty!\");\n fnameET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(lname.isEmpty()) {\n lnameET.setError(\"Field can't be empty!\");\n lnameET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(personNo.isEmpty()) {\n perNoET.setError(\"Field can't be empty!\");\n perNoET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(lectEmail.isEmpty()) {\n lecEmailET.setError(\"Field can't be empty!\");\n lecEmailET.requestFocus();\n return false;\n } else if (!Patterns.EMAIL_ADDRESS.matcher(lectEmail).matches()) {\n lecEmailET.setError(\"check that your email is entered correctly!\");\n lecEmailET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(adminCode.isEmpty()) {\n adminCodeET.setError(\"Field can't be empty!\");\n adminCodeET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(password.isEmpty()) {\n passwET.setError(\"Field can't be empty!\");\n passwET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(cpassword.isEmpty()) {\n cpasswET.setError(\"Field can't be empty!\");\n cpasswET.requestFocus();\n return false;\n } else if (!cpassword.equals(password)) {\n cpasswET.setError(\"password doesn't match the above entered password!\");\n cpasswET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n return true;\n }", "@Override\n\tpublic boolean verifyEmailAddress(EmailAddress address)\n\t{\n\t\treturn false;\n\t}", "@Test\n\tpublic void testValidate() {\n\t\tSystem.out.println(\"starting testValidate()\");\n\t\tPersonalData personalData = new PersonalData(\"Kelvin\", \"Huynh\", \"4081234567\", \"Kelvin_Huynh@email.com\");\n\t\tassertTrue (\"address validates\", personalData.validatePersonalData());\n\t System.out.println(\"testValidate PASSED\");\n\t}", "@PutMapping(\"/update/status\")\n public ResponseEntity updateStatus(@RequestParam String numberAsString) throws UserNotFoundException,NotUpdatedException {\n return new ResponseEntity<>(userService.updateStatus(BigInteger.valueOf(Long.parseLong(numberAsString))), HttpStatus.OK);\n }", "@Override\r\n\tpublic Vendor validateUser(String email, String pass) {\n\t\treturn dao.validateUser(email, pass);\r\n\t}", "@Override\n\tpublic void validate() {\n\t\tif(name==null||name.trim().equals(\"\")){\n\t\t\taddActionError(\"用户必须填写!\");\n\t\t}\n\t\t\n\t\tList l=new ArrayList();\n\t\tl=userService.QueryByTabId(\"Xxuser\", \"id\", id);\n\t\t//判断是否修改\n\t\tif(l.size()!=0){\n\t\t\t\n\t\t\tfor(int i=0;i<l.size();i++){\n\t\t\t\tXxuser xxuser=new Xxuser();\n\t\t\t\txxuser=(Xxuser)l.get(i);\n\t\t\t\tif(xxuser.getName().equals(name.trim())){\n\t\t\t\t\tSystem.out.println(\"mei gai\");\n\t\t\t\t}else{\n\t\t\t\t\tList n=new ArrayList();\n\t\t\t\t\tn=userService.QueryByTab(\"Xxuser\", \"name\", name);\n\t\t\t\t\tif(n.size()!=0){\n\t\t\t\t\t\taddActionError(\"该用户已经存在!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\n\t\t\t\n\t\t}\n\t}", "public void validate() {\n\t\terrors.clear();\n\t\t\n\t\tif(!this.id.isEmpty()) {\n\t\t\ttry {\n\t\t\t\tLong.parseLong(this.id);\n\t\t\t} catch(NumberFormatException ex) {\n\t\t\t\terrors.put(\"id\", \"Id is not valid.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this.firstName.isEmpty()) {\n\t\t\terrors.put(\"firstName\", \"First name is obligatory!\");\n\t\t}\n\t\t\n\t\tif(this.lastName.isEmpty()) {\n\t\t\terrors.put(\"lastName\", \"Last name is obligatory!\");\n\t\t}\n\t\t\n\t\tif(this.nick.isEmpty()) {\n\t\t\terrors.put(\"nick\", \"Nick is obligatory!\");\n\t\t}\n\t\t\n\t\tif(DAOProvider.getDAO().doesNickAlreadyExist(nick)) {\n\t\t\terrors.put(\"nick\", \"Nick already exist!\");\n\t\t}\n\n\t\tif(this.email.isEmpty()) {\n\t\t\terrors.put(\"email\", \"EMail is obligatory!\");\n\t\t} else {\n\t\t\tint l = email.length();\n\t\t\tint p = email.indexOf('@');\n\t\t\tif(l<3 || p==-1 || p==0 || p==l-1) {\n\t\t\t\terrors.put(\"email\", \"EMail is not valid.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this.password.isEmpty()) {\n\t\t\terrors.put(\"password\", \"Password is obligatory!\");\n\t\t}\n\t}", "boolean emailExistant(String email, int id) throws BusinessException;", "public ErrorMessage verifyCode(String code, Integer year, Long exception);", "public String getStatus()\r\n {\n return (\"1\".equals(getField(\"ApprovalStatus\")) && \"100\".equals(getField(\"HostRespCode\")) ? \"Approved\" : \"Declined\");\r\n }", "@PostMapping(value = \"/getValidExtUser\")\n\tpublic RestResponse<StgExtUserInfo> getValidExtUser(@RequestParam String email) {\t\n\t\tlogInfo(LOG, true, \"Ext user email : {} \", email);\t\t\n\t\tRestResponse<StgExtUserInfo> restResponse = new RestResponse<>(SUCCESS);\n\t\ttry {\n\t\t\tStgExtUserInfo extUser = userRegistrationService.getValidExtUser(email);\n\t\t\trestResponse.setResult(extUser);\n\t\t}catch(Exception e) {\n\t\t\tLOG.error(\"Exception : \", e);\n\t\t}\n\t\treturn restResponse;\t\t\n\t}", "User getUserUnderValidation();", "@Override\n public void validate(FacesContext context, UIComponent component,\n Object value) throws ValidatorException {\n\n String uname = value.toString();\n\n if (!isValidEmail(uname)) {\n\n FacesMessage facesMsg = new FacesMessage(\n AccountStatusErrorMessages.INVALID_EMAIL_FORMAT);\n facesMsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n throw new ValidatorException(facesMsg);\n\n }\n\n if (mgr.isUsernameTaken(uname)) {\n FacesMessage facesMsg = new FacesMessage(\n AccountStatusErrorMessages.EMAIL_TAKEN);\n facesMsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n throw new ValidatorException(facesMsg);\n }\n\n }", "public int updatePerson(String username, String firstName, String lastName, String password, char type,\r\n\t\t\tchar status)\r\n\t{\r\n\t\tif(type != 'u' && type != 'a') \r\n\t\t\tthrow new IllegalArgumentException(\"Invalid Type\");\r\n\t\tif(status != 'Y' && status != 'N') \r\n\t\t\tthrow new IllegalArgumentException(\"Invalid Status\");\r\n\t\treturn db.user_editUser(username, firstName, lastName, password, type, status);\r\n\t}", "private void setvalidation(String msg, int validateflag, char validateresult) {\r\n\t\tmAlertMsg = msg;\r\n\t\tmValidateFlag = validateflag;\r\n\t\tmValidateResult = validateresult;\r\n\t}", "public fbStatusPostingValidation() {\n\t\tsuper();\t\n\t}", "@Override\n\tpublic IStatus validate(Builder builder) {\n\t\treturn Status.OK_STATUS;\n\t}", "public int approve_reject_Request(int approval_status, String approvedBy, String approverComment, Timestamp time_approved,String social_Email)\r\n\t{\r\n\t\tConnection conn=getConnection();\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tint result=0;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString query = \"update SOCIAL_EAI_APPROVAL set (APPROVAL_STATUS,APPROVED_BY,APPROVER_COMMENT,TIME_APPROVED)=(?,?,?,?) where REQ_SOCIAL_EMAIL=?\";\r\n\t\t\tpstmt = conn.prepareStatement(query); \r\n\t\t\tpstmt.setInt(1,approval_status); \r\n\t\t\tpstmt.setString(2,approvedBy); \r\n\t\t\tpstmt.setString(3,approverComment);\r\n\t\t\tpstmt.setTimestamp(4,time_approved);\r\n\t\t\tpstmt.setString(5,social_Email);\r\n\r\n\t\t\tresult=pstmt.executeUpdate(); \r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\r\n\t\t\tSystem.out.println(\"EXception:\");\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\r\n\r\n\t\treturn result;\r\n\t}", "public void setValidUser(boolean valid) {\n\t\t_isValid = valid;\n\t}", "@Modifying\n\t@Query(\"\tSELECT \tstatus \t\t\" + \"\tFROM \tUser \t\t\" + \" WHERE \temail = :email\")\n\n\tpublic UserStatus findStatusByEmail(String email);", "public boolean isAccountValidated(GuruModel model) {\n\t\tquery = \"select id from guru where email=? and pwd=? and validate_email=?\";\n\t\tList<GuruModel> list = this.jdbcTemplate.query(query,new Object[]{model.getEmail(),this.edutility.getSHA256(model.getPwd()),true},\n\t\t\t\tBeanPropertyRowMapper.newInstance(GuruModel.class));\n\t\t\n\t\tif(list.size() == 0)\n\t\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t\t\n\t}", "private void validateUser(user theUserOfThisAccount2) {\n\t\tboolean ok=false;\n\n\t\t\t\n\t\tif(passwordOfRegisteration.equals(passwordConfirm)&&!passwordOfRegisteration.equals(\"\")&&passwordOfRegisteration!=null){\n\t\t\tok=true;\n\t\t}\n\t\t\n\t\t\n\t\tif(ok){\n\t\t\t\n\t\t\t\ttheUserOfThisAccount2.setPassword(new Md5PasswordEncoder().encodePassword(passwordOfRegisteration,theUserOfThisAccount2.getUserName()));\n\t\t\t\tuserDataFacede.adduser(theUserOfThisAccount2);\n\t\t\t\tPrimeFaces.current().executeScript(\"new PNotify({\\r\\n\" + \n\t\t\t\t\t\t\"\t\t\ttitle: 'Success',\\r\\n\" + \n\t\t\t\t\t\t\"\t\t\ttext: 'Your data has been changed.',\\r\\n\" + \n\t\t\t\t\t\t\"\t\t\ttype: 'success'\\r\\n\" + \n\t\t\t\t\t\t\"\t\t});\");\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\tpleaseCheck();\n\t\t\t\n\t\t}\n\t}", "public void validateEditedUserValues(String mName, String lName, String mDOB, String mEmail)\n\t{\n\t\tString actlName = lastName.getText().toString();\n\t\tString actDOB = startDate.getText().toString();\n\t\tString actEmail = email.getText().toString();\n\t\t//System.out.println(actfName.equals(mName));\n\t\tSystem.out.println(actlName.equals(lName));\n\t\tSystem.out.println(actDOB.equals(mDOB));\n\t\tSystem.out.println(actEmail.equals(mEmail));\n\t\t//Assert.assertEquals(actfName, mName);\n\t\t//Assert.assertEquals(actlName, lName);\n\t\t//Assert.assertEquals(actDOB, mDOB);\n\t\t//Assert.assertEquals(actEmail, mEmail);\n\t\tbackBtn.click();\n\t\t\n\t}", "@Test\n\t\tpublic void givenFirstLetterSmall_CheckForValidation_ReturnFalse() {\n\t\t\tboolean result = ValidateUserDetails.validateFirstName(\"priya\");\n\t\t\tAssertions.assertFalse(result);\n\t\t}", "int getUnapprovedUserNumber();", "@Override\n public int getStatus() {\n return this.SUCCESS;\n }", "public boolean validPayPalAccount(String firstName, String lastName, String email) \n\t throws InputValidationException\n\t{\n\t\tSystem.out.println(\"Checking valid PayPal account: \" + firstName + \" \" + lastName + \" \" + email);\n\t\tGetVerifiedStatusRequest getStatusRequest=new GetVerifiedStatusRequest();\n\t\tgetStatusRequest.setRequestEnvelope(ClientInfoUtil.getMyAppRequestEnvelope());\n\t\tgetStatusRequest.setEmailAddress(email);\n\t\tgetStatusRequest.setFirstName(firstName);\n\t\tgetStatusRequest.setLastName(lastName);\n\t\tgetStatusRequest.setMatchCriteria(\"NAME\");\n\t\t \n\t\ttry\n\t\t{\n\t\t\tAdaptiveAccounts aa = getAdaptiveAccounts();\n\t\t\tGetVerifiedStatusResponse getVerifiedStatusResponse = aa.getVerifiedStatus(getStatusRequest);\n String status=getVerifiedStatusResponse.getAccountStatus();\n if( status.equalsIgnoreCase(ACCOUNT_STATUS_UNVERIFIED) || \n status.equalsIgnoreCase(ACCOUNT_STATUS_VERIFIED) ) \n {\n return true;\n }\n else return false;\n\t\t}\n\t\tcatch(PPFaultMessage e)\n\t\t{\n\t\t\tif( e.getFaultInfo() != null )\n\t\t\t{\n\t\t\t\tfor( ErrorData error : e.getFaultInfo().getError() )\n\t\t\t\t{\n\t\t\t\t\tlog.info(error.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} \n\t\tcatch (FatalException e) \n\t\t{\n\t\t\tlog.error(e);\n\t\t\tthrow new InputValidationException(\"Unable to check PayPal account status\");\n\t\t} \n\t\tcatch (SSLConnectionException e) \n\t\t{\n\t\t\tlog.error(e);\n\t\t\tthrow new InputValidationException(\"Unable to check PayPal account status\");\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\tlog.error(e);\n\t\t\tthrow new InputValidationException(\"Unable to check PayPal account status\");\n\t\t}\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void ValidateAdduserEmailidField() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Email address 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.validateEmailidField(userProfile);\t\t\t\t \t \t\t\t\t\t\t\n\t}", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser firebaseUser = firebaseOps.getCurrentFirebaseUser();\n if (firebaseUser.isEmailVerified()) {\n createUserObjectInDatabase(firebaseUser.getUid());\n\n } else {\n Toast.makeText(MainActivity.this, \"Please verify your email first\", Toast.LENGTH_SHORT).show();\n }\n }\n }", "@Test\n public void testSetUserId() {\n System.out.println(\"setUserId Test (Passing value)\");\n Long userId = 1l;\n user.setUserId(userId);\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertTrue(violations.isEmpty());\n }", "@Then(\"Validate status code is {string}\")\r\n\tpublic void validate_status_code_is(String arg1) throws Throwable {\n\t\tAssert.assertTrue(StripeCustomer.response.getStatusCode()==Integer.parseInt(arg1));\r\n\t}", "public static void main(String[] args) {\n\n\t\tString emailID = \"sudalai@mail.com\";\n\t\tboolean isValidEmailID = true;\n\n\t\t//get index(position) value of '@' and '.'\n\t\tint at_index = emailID.indexOf('@');\n\t\tint dot_index = emailID.indexOf('.');\n\t\t\t\t\n\t\t// Check all rules one by one, if any one of the rule is not satisfied then it returns false immediately,\n\t\t// it returns true only after all the rules are satisfied\n\t\tisValidEmailID = (at_index < 0 || dot_index < 0) ? false\n\t\t\t\t: (at_index != emailID.lastIndexOf('@') || dot_index != emailID.lastIndexOf('.')) ? false\n\t\t\t\t\t\t: (emailID.substring(at_index + 1, dot_index).length() != 4) ? false\n\t\t\t\t\t\t\t\t: (emailID.substring(0, at_index).length() < 3) ? false\n\t\t\t\t\t\t\t\t\t\t: (emailID.toLowerCase().endsWith(\".com\") == false) ? false : true;\n\t\t\n\t\tSystem.out.println(\"Email ID : \" + emailID);\n\t\t\n\t\t\t\t\t\t\n\t\tif (isValidEmailID) {\n\t\t\tSystem.out.println(\"Email Validation Result : True (ie given maild is in vaild format)\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Email Validation Result : False (ie given maild is not in vaild format)\");\n\t\t}\n\n\t}", "protected void validate_return(User[] param){\r\n \r\n }", "@Given(\"^valid fields and making a GET request to account_ID then it should return a (\\\\d+) and a body of customer ID details$\")\n\tpublic void valid_fields_and_making_a_GET_request_to_account_ID_then_it_should_return_a_and_a_body_of_customer_ID_details(int StatusCode) throws Throwable {\n\t\tGetId.GET_account_id_ValidFieldsProvided();\n\t\ttry{}catch(Exception e){}\n\t}", "public boolean validate(){\n return true;\n }", "@Override\n public void process() {\n if (this.mail.isEmpty() || this.password == null) {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", false);\n } else {\n //Get all users with the given e-mail address (size of list is 1 if successful)\n DBFilter mailFilter = new DBFilter();\n mailFilter.addConstraint(User.CLMN_MAIL, SQLConstraintOperator.LIKE, this.mail);\n ArrayList<User> users = User.findAll(mailFilter);\n\n //We expect to find exactly one user. If we find more or less than one user, the verification failed.\n if (users != null && users.size() == 1) {\n User user = users.get(0);\n //Check password:\n if (Arrays.equals(user.getPassword(), this.password)) {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", true);\n ScopeHandler.getInstance().store(this.request, \"user\", user);\n } else {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", false);\n //Probably there is a user in the session. Remove him!\n ScopeHandler.getInstance().remove(this.request, \"user\", \"session\");\n }\n } else {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", false);\n //Probably there is a user in the session. Remove him!\n ScopeHandler.getInstance().remove(this.request, \"user\", \"session\");\n }\n }\n }", "@Then(\"validate status code is {string}\")\r\n\tpublic void validate_status_code_is_(String arg1) throws Throwable {\n\t\tresponse.prettyPrint();\r\n\t\t//System.out.println(response.getStatusCode()+\"*****\"+arg1);\r\n\t\tAssert.assertTrue(response.getStatusCode()==Integer.parseInt(arg1));\r\n\t}", "protected boolean save() {\r\n\t\tboolean saved=true;\r\n\t\tif(validated()){\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tsaved=false;\r\n\t\t}\r\n\t\treturn saved;\r\n\t}", "@Override\n\tpublic int checkUserCode(String userCode) {\n\t\treturn userDao.checkUserCode(userCode);\n\t}", "private void validateAndSave() {\n try {\n binder.writeBean(user);\n fireEvent(new SaveEvent(this, user));\n } catch (ValidationException e) {\n e.printStackTrace();\n }catch (DataIntegrityViolationException e){\n e.printStackTrace();\n Notification.show(\" Användarnamn används redan, försök med en ny.\",\n 2000, Notification.Position.MIDDLE ).addThemeVariants(NotificationVariant.LUMO_ERROR);\n }\n }", "protected boolean isValid()\r\n {\r\n \treturn true;\r\n }", "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}", "public boolean returnStatus(){\n return status;\r\n }", "@RequestMapping(value = \"/approve\", method = RequestMethod.POST)\n\tpublic ResponseEntity<User> approveRegistration(@RequestBody String id) {\n\t\tboolean b = this.userService.setStatus(id.substring(0, id.length()-1), \"ACTIVATED\");\n\t\tif (b) return new ResponseEntity<>(HttpStatus.OK);\n\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t}", "public static ResultInfo<EmptyResultObj> updUserInfo(Controller controller) {\n\t\tString idNum = controller.getPara(TAlipayUser.COL_ID);\n\t\tint flag = Db.update(\"update alipay_user set required_type=? where id_num=?\", \"1\", idNum);\n\t\tif (flag >= 1) {\n\t\t\treturn new ResultInfo<EmptyResultObj>(ResultCodes.RET_SUCCESS, \"auth success\");\n\t\t} else {\n\t\t\treturn new ResultInfo<EmptyResultObj>(ResultCodes.RET_FAILED, \"auth failed\");\n\t\t}\n\t}", "public void setEmailStatus(String status) {\n if (EMAIL_STATUS_ENUM.contains(status)) {\n this.emailStatus = status;\n } else {\n throw new IllegalArgumentException(\"Invalid EmailStatus value: \" + status);\n }\n }", "@Test\n public void testSetIsAccountVerifiedNull() {\n System.out.println(\"setIsAccountVerified Test (Null value)\");\n Boolean isAccountVerified = null;\n user.setIsAccountVerified(isAccountVerified);\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertFalse(violations.isEmpty());\n }", "public void validate_the_Preferred_Contact_Method_in_Contact_Details_of_Customer_Tab_Mail(boolean status)throws Exception {\n\t\t\t\n\t\t\tboolean checked=VerifyElementPresentAndGetCheckBoxStatus(Desktop_XPATH_Verify_Customer_Page_MarketingPreferences.replaceAll(\"M_Header\", \"Contact Details\").replaceAll(\"M_Category\", \"Preferred Contact Method\").replaceAll(\"M_InnerText\", \"Mail\"), \"Preferred Contact Method on Mail \");\n\t\t\t\n\t\t\tif(checked==status)\n\t\t\t\tReport.fnReportPass(\"Preferred Contact Method - Mail : Checked status = \"+status+\"Display Status\"+checked, driver);\n\t\t\t\telse\n\t\t\t\tReport.fnReportFail(\"Preferred Contact Method - Mail : Checked status = \"+status+\"Display Status\"+checked, driver);\n\t\t\t\n\t\t\n\t}", "long invalidations();", "public String getValidityStatus() {\n\t\treturn validityStatus;\n\t}", "public static boolean isAccountVerified(String email){\n Connection connect = null;\n ResultSet set = null;\n String isAccountVerifiedSQL = \"SELECT verified FROM users WHERE email = ?\";\n\n // Check If Account is Verified Try Block:\n try {\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare Statement:\n PreparedStatement statement = connect.prepareStatement(isAccountVerifiedSQL);\n // Set Parameters:\n statement.setString(1, email);\n // Execute Statement:\n set = statement.executeQuery();\n // Check For Result Set:\n while (set.next()){\n // Check Value:\n if(set.getInt(\"verified\") == 1) {\n return true;\n }\n // End Of Check Value.\n }\n // End Of Check For Result Set.\n\n }catch(SQLException e){\n e.printStackTrace();\n }\n // End Of Check If Account is Verified Try Block:\n\n return false;\n }", "public boolean checkComplete(){\n return Status;\n }", "public void verifyMarkAsCompleteBackend(String engagementField, String engagementValue, String todoName,\n String status) throws SyncFactoryException {\n try {\n getLogger().info(\"Verify Completed field updated on database.\");\n // JSONObject jsonObject = MongoDB.getToDoObject(getEngagementCollection(), engagementField, engagementValue, todoName);\n JSONObject jsonObject = MongoDBService.getToDoObject(getEngagementCollection(), engagementField, engagementValue, todoName);\n if (jsonObject.get(\"completed\").toString().equals(status)) {\n NXGReports.addStep(\"Verify Completed field updated on database.\", LogAs.PASSED, null);\n } else {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Verify Completed field updated on database.\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n } catch (Exception ex) {\n NXGReports\n .addStep(\"Verify Completed field updated on database.\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n ex.printStackTrace();\n }\n }", "@Test\n public void testGetUserId() {\n System.out.println(\"getUserId Test (Passing value)\");\n Long expResult = 1l;\n Long result = user.getUserId();\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertEquals(expResult, result);\n }", "public abstract boolean validate();", "void validateActivoUpdate(Activo activo);", "@Test\n public void testSetFirstName() {\n System.out.println(\"setFirstName Test (Passing value)\");\n String firstName = \"John\";\n user.setFirstName(firstName);\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertTrue(violations.isEmpty());\n }" ]
[ "0.583804", "0.5764468", "0.57589054", "0.5676436", "0.5557662", "0.5531953", "0.55309397", "0.5527438", "0.54970604", "0.54673994", "0.54667056", "0.5459128", "0.54489607", "0.54255503", "0.5423033", "0.54139805", "0.5407312", "0.5402014", "0.5397899", "0.53888583", "0.5380331", "0.5371665", "0.5369543", "0.53652114", "0.5357238", "0.5354509", "0.5351642", "0.5350048", "0.5330482", "0.5323811", "0.52776855", "0.5271554", "0.5268574", "0.5256631", "0.5256631", "0.52460074", "0.52459705", "0.52366126", "0.52317154", "0.52203304", "0.52111906", "0.52088004", "0.5201074", "0.52004844", "0.51993364", "0.5198058", "0.5179029", "0.5168574", "0.5156883", "0.51546663", "0.5150221", "0.51495016", "0.51454544", "0.5137864", "0.51312786", "0.51304716", "0.51229113", "0.5116923", "0.5110448", "0.5101637", "0.50879055", "0.5085924", "0.50852156", "0.507749", "0.5073571", "0.5072131", "0.50716573", "0.50711834", "0.50683427", "0.5057712", "0.50462174", "0.50448483", "0.50433695", "0.50433385", "0.5039615", "0.5039427", "0.50307643", "0.50246775", "0.5023757", "0.5022689", "0.50193393", "0.5017692", "0.5017631", "0.50119424", "0.50111073", "0.5010248", "0.50050974", "0.49998587", "0.49961025", "0.49766555", "0.49728695", "0.49704188", "0.49650568", "0.4960947", "0.49607924", "0.49602082", "0.49592412", "0.49558142", "0.49551782", "0.49538052", "0.4953209" ]
0.0
-1
Method...................................................setKey Author......................................................JLH This method sets an alphanumeric string, key, in the credential table. This is the key users need in order to validate their email Return Value (int) status: Returns an int that indicates the success or failure of the updated key
public static synchronized int setKey(int userID, String key){ int status=0; Connection connection; String preparedSQL = "Update credential Set RegKey = ? Where User_ID = ?"; PreparedStatement statement=null; try{ connection=DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setString(1, key); statement.setInt(2, userID); status = statement.executeUpdate(); statement.close(); connection.close(); }catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } return status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setKey(String key);", "void setKey(final String key);", "void setKey(java.lang.String key);", "String setKey(String newKey);", "public void _setKey(String e)\n {\n _key = e;\n }", "public void setKey(java.lang.String param){\n localKeyTracker = true;\n \n this.localKey=param;\n \n\n }", "String setKey(String keyName, String value, KeyOptions opts)\n throws P4JavaException;", "public void setKey(final String key);", "public void setKey(final String key);", "private void setKey(String key){\n\t\tthis.key=key;\n\t}", "void setKey(int key);", "public void setKey(int key);", "public void setKey(int key);", "private void setKey(String key) {\n this.key = key;\n }", "public void setKey(String key) throws ClientException {\n Pattern pattern = Pattern.compile(KEY_REGEX);\n Matcher matcher = pattern.matcher(key);\n\n if (matcher.matches()) {\n this.key = key;\n } else {\n throw new ClientException(\"your key is invalid\", OSSErrorCode.INVALID_ARGUMENT, null);\n }\n }", "protected void setKey(String key) {\r\n this.key = key;\r\n }", "public void setKey(int key){\r\n this.key = key; \r\n }", "public void set(String newKey)\n\t{\n\t\tthis.Key = newKey;\n\t}", "public void setKey(String s){\n this.key = s;\n this.blockLen = s.length();\n }", "public void setKey(String aKey) {\n\t\tthis.key = aKey;\n\t}", "public void setKey(String key) {\r\n this.key = key;\r\n }", "public void setKey(String key) {\n\t\tthis.key = key;\n\t}", "private void setKey() {\n\t\t \n\t}", "public void setKey(String key) {\n this.key = key;\n }", "public static synchronized int validated(int userID, String key){\n\t\t\tint status=0;\t\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"Update credential Set Validated = ? Where User_ID = ? And RegKey = ?\";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\n\t\t\t\tstatement.setInt(1, 0);\n\t\t\t\tstatement.setInt(2, userID);\n\t\t\t\tstatement.setString(3, key);\n\t\t\t\tstatus = statement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn status;\n\t}", "public void setKey(String key) {\r\n\t\tthis.key = key;\r\n\t}", "public void setKey(String key) {\n\n this.key = key;\n }", "void setKey(K key);", "public void setKey(String key) {\n this.key = key;\n }", "public void setKey(String key) {\n this.key = key;\n }", "public void setKey(String key) {\n this.key = key;\n }", "void privateSetTechStuffKey(com.hps.july.persistence.WorkerKey inKey) throws java.rmi.RemoteException;", "public void saveMasterKeyAndEmail(String masterKey, String resetCode) {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n \r\n ContentValues values = new ContentValues();\r\n values.put(COL_MASTER_KEY, masterKey);\r\n values.put(COL_RESET_CODE, resetCode);\r\n \r\n db.insert(TABLE_MAIN, null, values);\r\n db.close(); \r\n }", "public void setKey(String key)\r\n {\r\n m_key = key;\r\n }", "public void setKey(String key) {\n\t\tthis.key = key;\n\t}", "public void setKey(String key) {\n\t\tthis.key = key;\n\t}", "@Test\n public void setPrimaryKey_length_good_case_min()\n {\n // Arrange\n String key = \"0123456789012345\";\n SymmetricKey symmetricKey = new SymmetricKey();\n // Act\n symmetricKey.setPrimaryKeyFinal(key);\n // Assert\n assertEquals(key, Deencapsulation.getField(symmetricKey, \"primaryKey\"));\n }", "public void setKey(char key){ this.key = key;}", "void privateSetAgregateKey(com.hps.july.persistence.StorageCardKey inKey) throws java.rmi.RemoteException;", "public abstract void setRefKey(String paramString);", "public final void setKey(String key) {\n this.key = key;\n }", "abstract protected boolean validateKey(String key);", "public void setKey(java.lang.String key) {\n\t\tthis.key = key;\n\t}", "public Builder setKey(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n key_ = value;\n onChanged();\n return this;\n }", "com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key addNewKey();", "void privateSetOrganizationKey(com.hps.july.persistence.OrganizationKey inKey) throws java.rmi.RemoteException;", "void setKeyNumber(int number)\r\n {\r\n number_of_key = number;\r\n }", "boolean setValue(String type, String key, String value);", "@Test\n public void setPrimaryKey_length_good_case_max()\n {\n // Arrange\n String key = \"0123456789012345678901234567890123456789012345678901234567890123\";\n SymmetricKey symmetricKey = new SymmetricKey();\n // Act\n symmetricKey.setPrimaryKeyFinal(key);\n // Assert\n assertEquals(key, Deencapsulation.getField(symmetricKey, \"primaryKey\"));\n }", "public void setKey(com.coda.www.efinance.schemas.elementmaster.ElmFullKey key) {\r\n this.key = key;\r\n }", "public void setKey(final String key) {\n this.key = key;\n }", "@Override\r\n public Boolean setField(String strTable, String strKeyName, String strKeyContents, String strFieldName, String strFieldContents)\r\n { boolean blnSet = false;\r\n try\r\n {\r\n dbCmdText = dbConn.createStatement();\r\n// goal is = UPDATE customer SET city='SAN DIEGO' WHERE customerID='2100'\r\n\r\n String strSQL = \"UPDATE \" + strTable + \" SET \" + strFieldName + \"='\" + strFieldContents + \"' \" +\r\n \" WHERE \" + strKeyName + \"='\" + strKeyContents + \"' \";\r\n dbCmdText.executeUpdate(strSQL);\r\n status(\"setField set\");\r\n blnSet=true;\r\n } catch (SQLException e)\r\n {\r\n e.printStackTrace();\r\nstatus(\"fieldset fail 9999999999\");\r\n }\r\n return blnSet;\r\n }", "@Generated\n @Selector(\"setKeyData:\")\n public native void setKeyData(@NotNull NSData value);", "public void setKeyData(String keyData)\n\t{\n\t\tthis.keyData = keyData;\n\t}", "String process_key () throws BaseException;", "public void setIdkey(String pIdkey){\n this.idkey = pIdkey;\n }", "public boolean isValidKey(String key) throws Exception;", "void setAuthInfoKey(Object key);", "public void setKey(Key key) {\n this.key = key;\n }", "@Override\n public void setKey(byte[] key) {\n }", "void setKey(int i, int key);", "void privateSetExpeditorKey(com.hps.july.persistence.WorkerKey inKey) throws java.rmi.RemoteException;", "public void setKmsSecretKey(String key) {this.databaseConfig.setProperty(\"kmsSecretKey\", key);}", "public void setKey( Long key ) {\n this.key = key ;\n }", "void xsetKey(org.apache.xmlbeans.XmlNMTOKEN key);", "public void setItskey(String newItskey) {\n keyTextField.setText(newItskey);\n itskey = newItskey;\n }", "public Builder setKey(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n key_ = value;\n onChanged();\n return this;\n }", "public void setKey(byte[] argKey) {\n this.key = argKey;\n }", "public com.opentext.bn.converters.avro.entity.ContentKey.Builder setKeyType(java.lang.String value) {\n validate(fields()[2], value);\n this.keyType = value;\n fieldSetFlags()[2] = true;\n return this;\n }", "protected boolean sendSet(char[] key, byte[] msg, final int len, byte[] val) {\n return (Comm.getResult(pool, key, msg, len, val))[0] == 'S';\n }", "Set getLocalKeySet();", "public void setKey(Boolean key) {\n this.key = key;\n }", "public Constraint setKey( String theId) {\n\t\tmyKey = new IdDt(theId); \n\t\treturn this; \n\t}", "public void setKey(TableKey key) {\n\tthis.key = key;\n }", "public void setKey(MessageKey key) {\n\tthis.key = key;\n }", "void setKey(int key) {\n if (key < 0) {\n throw new IllegalArgumentException(String.format(\"Error: key (%d) < 0\\n\", key));\n } else {\n this.key = key;\n }\n }", "public static void setAPIkey(String key) {\n\t\tkey1 = key;\r\n\r\n\r\n\t}", "public void setKey(KeyField key)\n\tthrows SdpException {\n\tif (key == null)\n\t throw new SdpException(\"The key is null\");\n\tsetKeyField(key);\n }", "@Override\n\t\t\tpublic Boolean call() throws Exception {\n\t\t\t\treturn PublicKeyDBService.getInstance().storePublicKey(username, publicKeyClient);\n\t\t\t}", "public void setPrimaryKey(ObjectKey key) throws TorqueException\n {\n SimpleKey[] keys = (SimpleKey[]) key.getValue();\n SimpleKey tmpKey = null;\n setMailId(((NumberKey)keys[0]).intValue());\n setReceiverId(((NumberKey)keys[1]).intValue());\n }", "boolean canSet(String key);", "public void setKey(String key) {\n this.key = key == null ? null : key.trim();\n }", "public void setKey(String key) {\n this.key = key == null ? null : key.trim();\n }", "public void setEncryptionKey(LVValue encryptKey) throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tmyData.encryptKey=encryptKey;\n\t}", "public Constraint setKey(IdDt theValue) {\n\t\tmyKey = theValue;\n\t\treturn this;\n\t}", "public void setKeyBytes(byte[] key){\n\t\t\n\t\tsetKey(new String(key));\n\t}", "public Builder setCdkey(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n cdkey_ = value;\n onChanged();\n return this;\n }", "public void setKmsAccessKey(String key) {this.databaseConfig.setProperty(\"kmsAccessKey\", key);}", "String newKey();", "OpenSSLKey mo134201a();", "java.lang.String getClientKey();", "public K setKey(K key);", "public com.opentext.bn.converters.avro.entity.ContentKey.Builder setKeyName(java.lang.String value) {\n validate(fields()[0], value);\n this.keyName = value;\n fieldSetFlags()[0] = true;\n return this;\n }", "@Test\n public void setSecondaryKey_length_good_case_min()\n {\n // Arrange\n String key = \"0123456789012345\";\n SymmetricKey symmetricKey = new SymmetricKey();\n // Act\n symmetricKey.setSecondaryKeyFinal(key);\n // Assert\n assertEquals(key, Deencapsulation.getField(symmetricKey, \"secondaryKey\"));\n }", "private void setKeys(APDU apdu) {\r\n\t\tcheckState(STATE_PERSONALIZED);\r\n\t\t// Can't set keys while in active state\r\n\t\tif (image.isActive())\r\n\t\t\tISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);\r\n\t\tapdu.setIncomingAndReceive();\r\n\t\t// must be secured\r\n\t\tif (!apdu.isSecureMessagingCLA())\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t// Secured\r\n\t\tprocessSecureMessage(apdu);\r\n\t\t// buffer contains unwrapped and decrypted data\r\n\t\tbyte buffer[] = apdu.getBuffer();\r\n\t\t// Data field should contain number of sector (1 byte), type of key (1\r\n\t\t// byte)\r\n\t\t// and key itself (KEY_LENGTH)\r\n\t\tif (apdu.getIncomingLength() < (byte) (MiFareImage.KEY_LENGTH + 0x02))\r\n\t\t\tISOException.throwIt(ISO7816.SW_DATA_INVALID);\r\n\t\toffset = apdu.getOffsetCdata();\r\n\t\t// Setting key\r\n\t\timage.setKey(buffer, (short) (offset + 0x02), buffer[offset],\r\n\t\t\t\tbuffer[(byte) (offset + 0x01)]);\r\n\t}", "public Builder setSubjectKeyID(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n subjectKeyID_ = value;\n onChanged();\n return this;\n }", "public Builder setSubjectKeyID(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n subjectKeyID_ = value;\n onChanged();\n return this;\n }", "public void setKey(K newKey) {\r\n\t\tkey = newKey;\r\n\t}", "public void setPersistentString(String key, String value);", "void setDevkey(String devkey);" ]
[ "0.62540066", "0.61571866", "0.615106", "0.6142858", "0.61065316", "0.6057328", "0.5970738", "0.5955401", "0.5955401", "0.59259546", "0.5752331", "0.5717731", "0.5717731", "0.5716747", "0.57022834", "0.56839", "0.56703675", "0.56578076", "0.56492436", "0.56443006", "0.561415", "0.56117797", "0.5579238", "0.55750906", "0.5539374", "0.5514423", "0.55060536", "0.5500326", "0.54968673", "0.54968673", "0.54968673", "0.5473239", "0.54731023", "0.54471564", "0.5445568", "0.5445568", "0.5435473", "0.5425444", "0.542451", "0.54238343", "0.5422353", "0.54111195", "0.5399166", "0.539433", "0.53896946", "0.53682023", "0.5361298", "0.5345416", "0.5342722", "0.5342112", "0.53290987", "0.5321332", "0.5313173", "0.53038824", "0.5303782", "0.53037804", "0.52909505", "0.5289284", "0.52862656", "0.52842325", "0.52808636", "0.5272201", "0.52609617", "0.52421206", "0.52413225", "0.52397263", "0.5236752", "0.5235168", "0.52266943", "0.5204952", "0.5185541", "0.51815116", "0.5172185", "0.51661265", "0.5163543", "0.5149163", "0.51224065", "0.5118575", "0.5117848", "0.5115008", "0.51014215", "0.50965124", "0.50965124", "0.5093966", "0.50909966", "0.5088081", "0.5072719", "0.5069736", "0.5067942", "0.5066054", "0.50525934", "0.504972", "0.5046832", "0.5039598", "0.50363576", "0.5031721", "0.5031721", "0.5031392", "0.5025659", "0.5021831" ]
0.655315
0
Method................................................resetCred Author......................................................JLH This method changes the users password Return Value (int) status: Returns an int that indicates the success or failure of the updated password
public static synchronized int resetCred(int userID, String password){ int status=0; Connection connection; String preparedSQL = "Update credential Set Pass = ? Where User_ID = ?"; PreparedStatement statement=null; try{ connection=DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setString(1, password); statement.setInt(2, userID); status = statement.executeUpdate(); statement.close(); connection.close(); }catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } return status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean resetPassword(Context ctx) {\n\t\tString username = ctx.sessionAttribute(\"access\"); \n\t\tString password = ctx.formParam(\"password\");\n\t\tboolean result = authService.resetPassword(username, password);//check if username works\n\t\treturn result;\n\t}", "public synchronized void resetPassword(RemoteWebDriver driver, String env) throws InterruptedException, IOException, AWTException {\n\t\t\t\n\t\t// Enter Email\n\t\tperform.type(driver, SLogin.email_txtbx(driver), \"automation\" + env + user + \"@dntest.net\");\n\t\t\n\t\t// Enter Password\n\t\tperform.type(driver, SLogin.password_txtbx(driver), password);\n\t\t\n\t\t// Click Sign In\n\t\tperform.click(driver, SLogin.signIn_btn(driver));\n\t\t\n\t\t// Wait for Find textbox\n\t\tperform.waitForElementToBeClickable(driver, SOrders.find_txtbx(driver));\n\t\t\n\t\t// Go to Users\n\t\tsecure.goToUsers(driver);\n\t\t\n\t\t// Change the password 5 times\n\t\tfor (int a = 1; a <=5; a++)\n\t\t{\n\t\t\t\n\t\t\tString pw = perform.randomLetters(driver, 10);\n\t\t\n\t\t\t// Wait for the Password Gear Icon\n\t\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordGear_icon(driver));\n\t\t\t\n\t\t\t// Click the Password Gear icon\n\t\t\tperform.click(driver, SUsers.passwordGear_icon(driver));\n\t\t\t\n\t\t\t// Wait for overlay to be visible\n\t\t\tperform.waitForOverlayToBeVisible(driver);\n\t\t\t\n\t\t\t// Wait for New\n\t\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordSecurityOptions_txtbx(driver));\n\t\t\t\n\t\t\t// Enter New PW\n\t\t\tperform.type(driver, SUsers.passwordSecurityOptions_txtbx(driver), pw);\n\t\t\t\n\t\t\t// Confirm New PW\n\t\t\tperform.type(driver, SUsers.confirmPasswordSecurityOptions_txtbx(driver), pw);\n\t\t\t\n\t\t\t// Click Save\n\t\t\tperform.click(driver, SUsers.saveSecurityOptions_btn(driver));\n\t\t\t\n\t\t\t// Wait for overlay to be hidden\n\t\t\tperform.waitForOverlayToBeHidden(driver);\n\t\t\n\t\t} // end for loop\n\t\t\n\t\t// Change the password to T3sting1\n\t\t// Wait for the Password Gear Icon\n\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordGear_icon(driver));\n\t\t\n\t\t// Click the Password Gear icon\n\t\tperform.click(driver, SUsers.passwordGear_icon(driver));\n\t\t\n\t\t// Wait for overlay to be visible\n\t\tperform.waitForOverlayToBeVisible(driver);\n\t\t\n\t\t// Wait for New\n\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordSecurityOptions_txtbx(driver));\n\t\t\n\t\t// Enter New PW\n\t\tperform.type(driver, SUsers.passwordSecurityOptions_txtbx(driver), \"T3sting1\");\n\t\t\n\t\t// Confirm New PW\n\t\tperform.type(driver, SUsers.confirmPasswordSecurityOptions_txtbx(driver), \"T3sting1\");\n\t\t\n\t\t// Click Save\n\t\tperform.click(driver, SUsers.saveSecurityOptions_btn(driver));\n\t\t\n\t\t// Wait for overlay to be hidden\n\t\tperform.waitForOverlayToBeHidden(driver);\n\t\t\n\t\t// Save the settings\n\t\tsecure.saveUsersSettings(driver);\n\t\t\n\t}", "public void resetPassword()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tboolean admin=a.checkAdmin();\r\n\t\tif(admin)\r\n\t\t{\r\n\t\t\tboolean passwordmatch=false;\r\n\t\t\twhile(!passwordmatch)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter the password of administrator: \");\r\n\t\t\t\tString upass=sc.nextLine();\r\n\t\t\t\tString uhash=a.hashfunction(upass);\r\n\t\t\t\tpasswordmatch=checkpassword(\"administrator\",uhash);\r\n\t\t\t\tif(!passwordmatch)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Incorrect administrator password!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tint userindex=-1;\r\n\t\t\tboolean userfound=false;\r\n\t\t\twhile(!userfound)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter the user account need to reset: \");\r\n\t\t\t\tString useraccount=sc.nextLine();\r\n\t\t\t\tuseraccount=useraccount.trim();\r\n\t\t\t\tuserindex=a.user_index(useraccount);\r\n\t\t\t\tif(userindex==-1)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"user account not found!\");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tuserfound=true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tString password=\"\",repassword=\"\";\r\n\t\t\tboolean flag=false;\r\n\t\t\twhile(!flag)\r\n\t\t\t{\r\n\t\t\t\tboolean validpassword=false;\r\n\t\t\t\twhile(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Please enter the new password: \");\r\n\t\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\t\tif(!validpassword)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"Please re-enter the new password: \");\r\n\t\t\t\trepassword=sc.nextLine();\r\n\t\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\t\tif(!flag)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tString hash_password=hashfunction(password); \r\n\t\t\t((User)user_records.get(userindex)).set_hash_password(hash_password);\r\n\t\t\t((User)user_records.get(userindex)).set_fail_count(0);\r\n\t\t\t((User)user_records.get(userindex)).set_account_locked(false);\r\n\t\t\tSystem.out.println(\"Password update successfully!\");\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\ta.createAdmin();\r\n\t\t}\r\n\t}", "private void resetPassword()\n {\n password = null;\n currentPasswdField.setText(\"\");\n currentPasswdField.requestFocusInWindow();\n okButton.setEnabled(false);\n }", "private Boolean changePassword() {\r\n //capture return value from SQL query to check if pass was updated\r\n int updatedRow = 0;\r\n \r\n try {\r\n // load and register JDBC driver for MySQL - \r\n // This tells the Java Class where to find the driver to connect to \r\n // The MySQL Database\r\n Class.forName(\"com.mysql.jdbc.Driver\"); \r\n Connection conn = DriverManager.getConnection(CONN_STRING,USERNAME,PASSWORD);\r\n \r\n //set password to newly generated string and reset failed attempts on account\r\n String updatePassword = \"UPDATE \" + TABLE_NAME + \" SET password = '\" + \r\n newPassword + \"', failed_attempts = 0 WHERE id = \" + user_id;\r\n System.out.println(updatePassword);\r\n PreparedStatement setNewPassword = conn.prepareStatement(updatePassword);\r\n updatedRow = setNewPassword.executeUpdate();\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n return (updatedRow > 0);\r\n }", "public boolean resetPassword(int u_id) {\n User user = userDao.getUserFromId(u_id);\n if (user==null){\n return false;\n }\n user.setU_Pw(\"0000\");\n userDao.dbUpdate(user);\n return true;\n }", "public void resetPass(String userID, String oldPassword, String newPassword) throws InvalidPassword, InvalidUserID\r\n\t{\r\n\t\tboolean status = signIn(userID, oldPassword);\r\n\t\tif (status == true)\r\n\t\t{\r\n\t\t\tdao.updatePass(userID, newPassword);\r\n\t\t\tSystem.out.println(\"Password Reset Succesful\");\r\n\t\t}\r\n\t}", "@Test (priority=1)\n\tpublic synchronized void resetPasswordOnBeta() throws InterruptedException, IOException, AWTException {\n\t\t\n\t\tif (resetBeta == true)\n\t\t{\n\t\t\n\t\t\tRemoteWebDriver driver = DriverFactory.getInstance().getDriver();\n\t\t\t\n\t\t\t/********************************************************************************\n\t\t\t * \n\t\t\t * CREATE USER ON BETA\n\t\t\t * \n\t\t\t ********************************************************************************/\n\t\t\t\n\t\t\t// Environment\n\t\t\tString env = \"Beta\";\n\t\t\t\n\t\t\t// Go to Beta Secure site\n\t\t\tdriver.get(\"https://secure.mercuryvmpbeta.com/\");\n\t\t\t\n\t\t\t// Create the user\n\t\t\tresetPassword(driver, env);\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\n\t\telse\n\t\t{\n\t\t\tExtentTest test = ExtentTestManager.getTest();\n\t\t\t// Skip test\n\t\t\tSystem.out.println(\"Skipped resetting the password for the user on Beta becuase the boolean was set to false\");\n\t\t\t// Log a skip in the extent report\n\t\t\ttest.log(LogStatus.SKIP, \"<span class='label info'>SKIPPED</span>\", \"<pre>Skipped resetting the password for the user on Beta becuase the boolean was set to false</pre>\");\n\t\t} // end else\n\t\t\n\t}", "public void updatePassword(String account, String password);", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n String newpass = resetpass.getText().toString();\n user.updatePassword(newpass).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Profile.this, \"Password reset successfully\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Profile.this, \"Password reset failed\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void changePassword() {\n showProgressDialog();\n IApiClient client = ApiClient.getApiClient();\n ReqChangePassword reqChangePassword = new ReqChangePassword();\n reqChangePassword.setServiceKey(mAppSharedPreference.getString(PreferenceKeys.KEY_SERVICE_KEY, ServiceConstants.SERVICE_KEY));\n reqChangePassword.setMethod(MethodFactory.CHANGE_PASSWORD.getMethod());\n reqChangePassword.setUserID(mAppSharedPreference.getString(PreferenceKeys.KEY_USER_ID, \"\"));\n reqChangePassword.setOldPassword(mOldPassword);\n reqChangePassword.setNewPassword(mNewPassword);\n Call<ResBase> resChangePasswordCall = client.changePassword(reqChangePassword);\n resChangePasswordCall.enqueue(new Callback<ResBase>() {\n @Override\n public void onResponse(Call<ResBase> call, Response<ResBase> response) {\n dismissProgressDialog();\n ResBase resBase = response.body();\n if (resBase != null) {\n if (resBase.getSuccess() == ServiceConstants.SUCCESS) {\n ToastUtils.showShortToast(SettingsActivity.this, resBase.getErrstr());\n etNewPassword.setText(\"\");\n etOldPassword.setText(\"\");\n tvChangePassword.setSelected(false);\n llChangePassword.setVisibility(View.GONE);\n SocialNetworkUtils.getInstance(SettingsActivity.this).logoutFromFb(SettingsActivity.this, SimpleFacebook.getInstance(SettingsActivity.this));\n mAppSharedPreference.clearEditor();\n Intent intent = new Intent(SettingsActivity.this, TutorialActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n finish();\n } else {\n ToastUtils.showShortToast(SettingsActivity.this, resBase.getErrstr());\n }\n } else {\n ToastUtils.showShortToast(SettingsActivity.this, R.string.err_network_connection);\n }\n }\n\n @Override\n public void onFailure(Call<ResBase> call, Throwable t) {\n dismissProgressDialog();\n ToastUtils.showShortToast(SettingsActivity.this, R.string.err_network_connection);\n }\n });\n }", "public void clearPassword() throws RemoteException;", "void setErrorPassword();", "public void setPassword(java.lang.String newPassword);", "public String resetPassword(String userName, String password) {\n\t\tString adminToken = this.loginAAA(this.adminUsername,\n\t\t\t\tthis.adminPassword);\n\n\t\tString errorCode = this.sendResetPasswordCommand(adminToken, userName,\n\t\t\t\tpassword);\n\n\t\tif (adminToken != null) {\n\t\t\tthis.logoutAAA(adminToken);\n\t\t}\n\n\t\treturn errorCode;\n\t}", "public void clearStatus(){\r\n\t\tmsgActionResult=null;\r\n\t\tcurrentPasswordConfirmed = false;\r\n\t\tpassword = \"\";\r\n\t}", "void changePassword(String userName, @Nullable String oldPassword, @Nullable String newPassword) throws PasswordNotMatchException;", "@Override\r\n\tpublic void modifyPassword(String username, String password, String confirmPassword, String oldPassword) {\n\t}", "void resetPassword(HttpServletRequest request, String userId, String password) ;", "private void modifyPwd(String oldpwdtxt, final String newpwdettxt,\r\n\t\t\tfinal String oldpwdettxt) {\n\t\tString uid = SharepreferenceUtil.readString(ModifyPwdActivity.this,\r\n\t\t\t\tSharepreferenceUtil.fileName, \"uid\");\r\n\t\tCellComAjaxParams cellComAjaxParams = new CellComAjaxParams();\r\n\t\tcellComAjaxParams.put(\"uid\", uid);\r\n\t\tcellComAjaxParams.put(\"oldpwd\", ContextUtil.encodeMD5(oldpwdettxt));\r\n\t\tcellComAjaxParams.put(\"newpwd\", ContextUtil.encodeMD5(newpwdettxt));\r\n\t\tHttpHelper.getInstances(ModifyPwdActivity.this).send(\r\n\t\t\t\tFlowConsts.YYW_MODIFYPWD, cellComAjaxParams,\r\n\t\t\t\tCellComAjaxHttp.HttpWayMode.POST,\r\n\t\t\t\tnew CellComHttpInterface.NetCallBack<CellComAjaxResult>() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onStart() {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tsuper.onStart();\r\n\t\t\t\t\t\tShowProgressDialog(R.string.hsc_progress);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onFailure(Throwable t, String strMsg) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tsuper.onFailure(t, strMsg);\r\n\t\t\t\t\t\tDismissProgressDialog();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onSuccess(CellComAjaxResult arg0) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tDismissProgressDialog();\r\n\t\t\t\t\t\tLoginComm modifyPwdComm = arg0.read(LoginComm.class,\r\n\t\t\t\t\t\t\t\tCellComAjaxResult.ParseType.GSON);\r\n\t\t\t\t\t\tString state = modifyPwdComm.getReturnCode();\r\n\t\t\t\t\t\tString msg = modifyPwdComm.getReturnMessage();\r\n\t\t\t\t\t\tif (!FlowConsts.STATUE_1.equals(state)) {\r\n\t\t\t\t\t\t\tShowMsg(msg);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tSharepreferenceUtil.write(ModifyPwdActivity.this,\r\n\t\t\t\t\t\t\t\t\tSharepreferenceUtil.fileName, \"pwd\",\r\n\t\t\t\t\t\t\t\t\tAESEncoding.Encrypt(newpwdettxt,\r\n\t\t\t\t\t\t\t\t\t\t\tFlowConsts.key));\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsetResult(RESULT_OK, intent);\r\n\t\t\t\t\t\tModifyPwdActivity.this.finish();\r\n\t\t\t\t\t\tShowMsg(\"密码修改成功\");\r\n//\t\t\t\t\t\tstartTask(oldpwdettxt, newpwdettxt, newpwdettxt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t}", "public boolean changePassword(HttpServletRequest request, HttpServletResponse response);", "public void changPass(String acc) throws AccountException {\n boolean checker = true;\n while (checker) {\n System.out.print(\"Old password: \");\n // Check old password is empty or not\n String old = this.checkEmpty(\"Old password\");\n // Check old password is cerrect or not\n if (this.login(acc, old)) {\n // Get newpass, repass and check empty\n System.out.print(\"New password: \");\n String newPass = this.checkEmpty(\"New password\");\n System.out.print(\"Renew password: \");\n String rePass = this.checkEmpty(\"Renew password\");\n\n // If newPass = rePass, then change password and print out success\n if (newPass.equals(rePass)) {\n this.changePass(acc, newPass);\n System.out.println(\"Password change successful!\");\n checker = false;\n } else {\n // Print error if password not match\n System.out.println(\"Password not match!\");\n }\n } else {\n // Print error if old password incorrect\n System.out.println(\"Old password incorrect!\");\n }\n }\n }", "@Test (priority=2)\n\tpublic synchronized void resetPasswordOnLive() throws InterruptedException, IOException, AWTException {\n\t\t\n\t\tif (resetLive == true)\n\t\t{\n\t\t\n\t\t\tRemoteWebDriver driver = DriverFactory.getInstance().getDriver();\n\t\t\t\n\t\t\t/********************************************************************************\n\t\t\t * \n\t\t\t * CREATE USER ON LIVE\n\t\t\t * \n\t\t\t ********************************************************************************/\n\t\t\t\n\t\t\t// Environment\n\t\t\tString env = \"Live\";\n\t\t\t\n\t\t\t// Go to Live Secure site\n\t\t\tdriver.get(\"https://secure.mercuryvmp.com/\");\n\t\t\t\n\t\t\t// Create the user\n\t\t\tresetPassword(driver, env);\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\n\t\telse\n\t\t{\n\t\t\tExtentTest test = ExtentTestManager.getTest();\n\t\t\t// Skip test\n\t\t\tSystem.out.println(\"Skipped resetting the password for the user on Live becuase the boolean was set to false\");\n\t\t\t// Log a skip in the extent report\n\t\t\ttest.log(LogStatus.SKIP, \"<span class='label info'>SKIPPED</span>\", \"<pre>Skipped resetting the password for the user on Live becuase the boolean was set to false</pre>\");\n\t\t} // end else\n\t\t\n\t}", "public void setPassword(String pass);", "@Override\n\tpublic void modPasswd(String tenantId, String serverId, String userName,\n\t\t\tString passwd, String type) throws Exception {\n\t\t\n\t}", "public void resetpassword(){\n resetpasswordlocal.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n final EditText resetpass = new EditText(view.getContext());\n AlertDialog.Builder passwordResetDialog = new AlertDialog.Builder(view.getContext());\n passwordResetDialog.setTitle(\"Reset Password ?\");\n passwordResetDialog.setMessage(\"Enter the new password\");\n passwordResetDialog.setView(resetpass);\n\n passwordResetDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Extract the email and set reset link\n String newpass = resetpass.getText().toString();\n user.updatePassword(newpass).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Profile.this, \"Password reset successfully\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Profile.this, \"Password reset failed\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n });\n\n passwordResetDialog.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Close the dialog box\n dialogInterface.cancel();\n }\n });\n passwordResetDialog.create().show();\n\n }\n });\n }", "@Override\n public void onClick(View v) {\n String newPass=et_newPassword.getText().toString().trim();\n String oldPass=et_oldPassword.getText().toString().trim();\n String prefpass=SharedPrefManager.getInstance(getApplicationContext()).getPass();\n if(newPass.equals(\"\")||oldPass.equals(\"\"))\n {\n Toast.makeText(AdminHomeActivity.this, \"Enter All Fields\", Toast.LENGTH_SHORT).show();\n }\n else if(!prefpass.equals(oldPass))\n {\n Toast.makeText(AdminHomeActivity.this, \"Incorrect Old Password\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n repo.updatePass(oldPass,newPass,\"Admin\");\n Toast.makeText(AdminHomeActivity.this, \"Password Successfully Changed\", Toast.LENGTH_SHORT).show();\n logout();\n dialog.dismiss();\n }\n }", "void setPassword(Password newPassword, String plainPassword) throws NoUserSelectedException;", "@Override\r\n\tpublic AuthZResponseDto resetPassword(PasswordDto passwordDto) throws Exception {\n\t\treturn null;\r\n\t}", "@Override\n public void onClick(View v) {\n String newPass=et_newPassword.getText().toString().trim();\n String oldPass=et_oldPassword.getText().toString().trim();\n String prefpass=SharedPrefManager.getInstance(getApplicationContext()).getPass();\n if(newPass.equals(\"\")||oldPass.equals(\"\"))\n {\n Toast.makeText(MainActivity.this, \"Enter All Fields\", Toast.LENGTH_SHORT).show();\n }\n else if(!prefpass.equals(oldPass))\n {\n Toast.makeText(MainActivity.this, \"Incorrect Old Password\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n repo.updatePass(oldPass,newPass,\"User\");\n Toast.makeText(MainActivity.this, \"Password Successfully Changed\", Toast.LENGTH_SHORT).show();\n logout();\n dialog.dismiss();\n }\n }", "public void receiveResultChangeUserPassword(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.v1_0.ChangeUserPasswordResponse result) {\r\n\t}", "HttpStatus resetPassword(final UserRepresentation userRepresentation, final String password);", "public int Update_User(String name, String oldPassword, String newPassword) {\n\t\treturn 0;\r\n\t}", "public void update() {\n user.setNewPassword(newPassword.getText().toString());\n user.setPassword(password.getText().toString());\n reauthenticate();\n }", "@Override\n\tpublic boolean setNewPassword(BigInteger tUserFId,String password) {\n\t\tint res = accountManageDao.updateApplyPwdWithMainUser(tUserFId,password);\n\t\treturn res>0?true:false;\n\t}", "private void resetPattenIfNeeded() {\n if (KeyguardCfg.isBackupPinEnabled() && getSecurityMode() == SecurityMode.PIN && this.mLockPatternUtils.isLockPatternEnabled(KeyguardUpdateMonitor.getCurrentUser())) {\n Intent ai = new Intent(\"com.android.settings.action.HW_RESET_NEW_PASSWORD\");\n ai.setFlags(268435456);\n OsUtils.startUserActivity(this.mContext, ai);\n }\n }", "private void changePassword() throws EditUserException {\n String userIDInput = userID.getText();\n String passwordInput = passwordChange.getText();\n try {\n Admin.changeUserPassword(userIDInput, passwordInput);\n JOptionPane.showMessageDialog(null, \"Change Password Success: \" + userIDInput + \" password successfully changed\");\n // Reset Values\n userID.setText(\"\");\n passwordChange.setText(\"\");\n } catch (EditUserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n throw new EditUserException(e.getMessage());\n } catch (SQLException throwables) {\n throw new EditUserException(\"Change Password Error: Cannot Change\" + userIDInput + \" password\");\n } catch (NullPointerException e) {\n String msg = \"Change Password Error: User ID \" + userIDInput + \" is an invalid userID.\";\n JOptionPane.showMessageDialog(null, msg);\n throw new EditUserException(\"Change Password Error: User ID \" + userIDInput + \" is an invalid userID.\");\n }\n }", "private void getResetPassword() {\n\t\t// TODO Auto-generated method stub\n\t\tdialog = new ZProgressHUD(ChangePasswordActivity.this);\n\t\tdialog.setMessage(\"Pls wait ...\");\n\t\tdialog.show();\n\t\t\n\t\tNetworkEngine.setIP(\"starticketmyanmar.com\");\n\t\tNetworkEngine.getInstance().GetResetPassword(email, code, new_password, new Callback<ForgotPassword>() {\n\t\t\t\n\t\t\tpublic void success(ForgotPassword arg0, Response arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (arg0 != null) {\n\t\t\t\t\t\n\t\t\t\t\tif (arg0.getStatus() == 400) {\n\t\t\t\t\t\tSKToastMessage.showMessage(ChangePasswordActivity.this, \"Your account has already been reset password\", SKToastMessage.ERROR);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (arg0.getStatus() == 200) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tSKToastMessage.showMessage(ChangePasswordActivity.this, \"Change Password Success\", SKToastMessage.SUCCESS);\n\t\t\t\t\t\tcloseAllActivities();\n\t\t\t\t\t\tstartActivity(new Intent(ChangePasswordActivity.this, SaleTicketActivity.class));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t\t\n\t\t\tpublic void failure(RetrofitError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tdialog.dismissWithFailure();\n\t\t\t}\n\t\t});\n\t}", "User resetPassword(User user);", "void onChangePasswordSuccess(ConformationRes data);", "@Test\n public void testAccountSetPassword() {\n try {\n Account newAcc = new Account(1, \"holder\", \"holder\", Credential.ADMIN);\n newAcc.setPassword(\"newPasswordForHolder\");\n Assert.assertEquals(\"Incorrect updated password for account after changing\",\n \"newPasswordForHolder\", newAcc.getPassword());\n } catch (Exception e) {\n Assert.fail(\"Set account password should not have failed here\");\n e.printStackTrace();\n }\n }", "private String sendResetPasswordCommand(String adminToken, String userName,\n\t\t\tString password) {\n\t\tString errorCode = Integer.toString(0);\n\t\tHttpURLConnection httpConn = null;\n\n\t\ttry {\n\t\t\thttpConn = this.setHttpConnection(openAMLocation + \"/json/users/\"\n\t\t\t\t\t+ userName);\n\t\t\tthis.setHttpTokenInCookie(httpConn, adminToken);\n\n\t\t\tOutputStreamWriter owriter = this.setPutHttpConnection(httpConn,\n\t\t\t\t\t\"application/json\");\n\t\t\tJSONObject passwordJsonObj = new JSONObject();\n\t\t\tpasswordJsonObj.put(\"userPassword\", password);\n\t\t\tlogger.info(\"JSON: {}\", passwordJsonObj.toString());\n\t\t\towriter.write(passwordJsonObj.toString());\n\t\t\towriter.flush();\n\t\t\towriter.close();\n\n\t\t\tBufferedReader bufReader = this.getHttpInputReader(httpConn);\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tString str = null;\n\n\t\t\twhile ((str = bufReader.readLine()) != null) {\n\t\t\t\tlogger.info(\"{}\", str);\n\t\t\t\tsb.append(str);\n\t\t\t}\n\n\t\t\tif (httpConn.getResponseCode() == 200) {\n\t\t\t\tInteger.toString(0);\n\t\t\t} else {\n\t\t\t\tif (sb.toString().contains(\"ldap exception 19\")) {\n\t\t\t\t\terrorCode = Integer\n\t\t\t\t\t\t\t.toString(13101);\n\t\t\t\t}\n\t\t\t\terrorCode = Integer.toString(11111);\n\t\t\t}\n\n\t\t\tbufReader.close();\n\t\t} catch (Exception e) {\n\t\t\terrorCode = Integer.toString(11111);\n\t\t\tlogger.error(\"Exception: \", e);\n\t\t}\n\n\t\treturn errorCode;\n\t}", "public void ModPwd(Administrator ad){\n\t\t//修改密码\n\t\tAdministratorManage admin=new AdministratorManage();\n\t\tScanner input=new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter your new password.\");\n\t\tString pwd=input.next();\n\t\tadmin.setPwd(ad, pwd);\n\t\tSystem.out.println(\"Modify new password succeed.\");\n\t\tMenu(ad);\n\t}", "@Override\n\tpublic String resetPassword(int userId) {\n\t\tString pass = PassPhrase.getSmallCasePassword();\n\t\tPasswordEncoder encoder = new BCryptPasswordEncoder();\n\t\tString hashPass = encoder.encode(pass);\n\t\tString sqlString = \"UPDATE `user` SET user.`PASSWORD`=?, user.`EXPIRES_ON`=? WHERE user.`USER_ID`=?\";\n\t\tif (this.jdbcTemplate.update(sqlString, hashPass, \"2001-01-01\", userId) == 1) {\n\t\t\treturn pass;\n\t\t} else {\n\t\t\treturn \"Could not reset password\";\n\t\t}\n\n\t}", "private void resetPassword() {\n AdminKeyFile keyFile = new AdminKeyFile(instance);\n keyFile.read();\n if (keyFile.isReset()) {\n String password = AdminKeyFile.randomPassword(\n AdminKeyFile.RANDOM_PASSWORD_LENGTH); \n instance.setAdminPassword(password);\n keyFile.setPassword(password);\n try {\n PayaraInstance.writeInstanceToFile(instance);\n } catch(IOException ex) {\n LOGGER.log(Level.INFO,\n \"Could not store Payara server attributes\", ex);\n }\n keyFile.write();\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String newPassword = resetPassword.getText().toString();\n user.updatePassword(newPassword).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void unused) {\n Toast.makeText(profile.this, \"Password Reset Successfully\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(profile.this, \"Password Reset Failed.\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void login_pw() {\n\t\tIntent intent = new Intent(this, ResetPasswordActivity.class);\n\t\tstartActivity(intent);\n\t}", "@Override\r\n\tpublic int updatePwd(HashMap<String, String> map) {\n\t\treturn mDAO.updatePwd(sqlSession, map);\r\n\t}", "@Test (priority=0)\n\tpublic synchronized void resetPasswordOnQA() throws InterruptedException, IOException, AWTException {\n\t\n\t\tif (resetQA == true)\n\t\t{\n\t\t\n\t\t\tRemoteWebDriver driver = DriverFactory.getInstance().getDriver();\n\t\t\t\n\t\t\t/********************************************************************************\n\t\t\t * \n\t\t\t * CREATE USER ON QA\n\t\t\t * \n\t\t\t ********************************************************************************/\n\t\t\t\n\t\t\t// Environment\n\t\t\tString env = \"QA\";\n\t\t\t\n\t\t\t// Go to QA Secure site\n\t\t\tdriver.get(\"https://secure.mercuryvmpqa.com/\");\n\t\t\t\n\t\t\t// Create the user\n\t\t\tresetPassword(driver, env);\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\n\t\telse\n\t\t{\n\t\t\tExtentTest test = ExtentTestManager.getTest();\n\t\t\t// Skip test\n\t\t\tSystem.out.println(\"Skipped resetting the password for the user on QA becuase the boolean was set to false\");\n\t\t\t// Log a skip in the extent report\n\t\t\ttest.log(LogStatus.SKIP, \"<span class='label info'>SKIPPED</span>\", \"<pre>Skipped resetting the password for the user on QA becuase the boolean was set to false</pre>\");\n\t\t} // end else\n\t\t\n\t}", "public ResetPasswordResponse ResetPassword(ResetPasswordRequest req) throws TencentCloudSDKException{\n JsonResponseModel<ResetPasswordResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<ResetPasswordResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"ResetPassword\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }", "@Test\n public void testResetPassword() {\n System.out.println(\"resetPassword\");\n School instance = new School();\n LocalDate dob = new LocalDate(1960, 9, 6);\n Manager m1 = new Manager(\"admin\", \"Lamasia2*\", \"quang\", \"\", \"tran\",\n \"quangtran@hotmail.com\", \"0909941192\", dob, \"hcmc\", null, true);\n instance.addUser(m1);\n instance.resetPassword(m1);\n\n assertEquals(Constants.DEFAULT_PASSWORD, m1.getPassword());\n\n System.out.println(\"PASS ALL\");\n }", "@NeedAuthorize(value = \"user:pwreset\")\n @PostMapping(\"/user/reset/password\")\n @ResponseBody\n public XfaceCmsAdminUserResetPasswordResponseDTO userModifyPassword(XfaceCmsAdminUserResetPasswordRequestDTO requestDTO,\n HttpServletRequest request)\n {\n XfaceCmsAdminUserResetPasswordResponseDTO responseDTO = cmsAdminUserMicroService.userResetPassword(requestDTO);\n return responseDTO;\n }", "@Override\r\n\tpublic int updatepassword(Account account) {\n\t\taccountMapper.updatepassword(account);\r\n\t\treturn 0;\r\n\t}", "@Test(priority=1)\n public void resetPasswordTest() throws InterruptedException {\n\t teacherPOM.clickLostPassword(); \n\t teacherPOM.enterUsername(\"swapna18\");\n\t teacherPOM.clickSendMsgBtn();\n\t teacherPOM.checkMsg();\n\t try {\n\t\tscreenShot.captureScreenShot(\"Fourth\");\n\t} catch (Exception e) {\n\t \te.printStackTrace();\n\t}\n\t Thread.sleep(10000);\n\t driver.get(\"https://gmail.com\");\n\t teacherPOM.loginMyGmailid(\"testpurpose774\");\n\t teacherPOM.clickNext1();\n\t teacherPOM.loginMyGmail(\"Gautham@143\");\n\t teacherPOM.clickNext2();\n\t teacherPOM.checkMailForPassword();\n\t teacherPOM.checkPasswordLink();\n\t Thread.sleep(10000);\n\t driver.navigate().to(\"https://gmail.com\");\n\t teacherPOM.checkMailForPassword();\n\t teacherPOM.getPassword();\n\t \n\t }", "void updateUserPassword(User user);", "@Override\r\n\t\t\t\t\tpublic void onPostExecute(ModifyLoginPasswordResult result) {\n\t\t\t\t\t\tswitch (Integer.parseInt(result.error_code)) {\r\n\t\t\t\t\t\tcase NetManager.SESSION_ID_ERROR:\r\n\t\t\t\t\t\t\tIntent i = new Intent();\r\n\t\t\t\t\t\t\ti.setAction(Constants.Action.SESSION_ID_ERROR);\r\n\t\t\t\t\t\t\tMyApp.app.sendBroadcast(i);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase NetManager.CONNECT_CHANGE:\r\n\t\t\t\t\t\t\tstartTask(oldPwd, newPwd, rePwd);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\tcase NetManager.MODIFY_LOGIN_PWD_SUCCESS:\r\n\t\t\t\t\t\t\tAccount account = AccountPersist.getInstance()\r\n\t\t\t\t\t\t\t\t\t.getActiveAccountInfo(\r\n\t\t\t\t\t\t\t\t\t\t\tModifyPwdActivity.this);\r\n\t\t\t\t\t\t\tif (null == account) {\r\n\t\t\t\t\t\t\t\taccount = new Account();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\taccount.sessionId = result.sessionId;\r\n\t\t\t\t\t\t\tAccountPersist.getInstance().setActiveAccount(\r\n\t\t\t\t\t\t\t\t\tModifyPwdActivity.this, account);\r\n\t\t\t\t\t\t\tLogMgr.showLog(\"ModifyLoginPasswordVideo==>\"\r\n\t\t\t\t\t\t\t\t\t+ ModifyPwdActivity.this\r\n\t\t\t\t\t\t\t\t\t\t\t.getResources()\r\n\t\t\t\t\t\t\t\t\t\t\t.getString(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.os_modify_pwd_success));\r\n\t\t\t\t\t\t\tIntent canel = new Intent();\r\n\t\t\t\t\t\t\tcanel.setAction(Constants.Action.ACTION_SWITCH_USER);\r\n\t\t\t\t\t\t\tModifyPwdActivity.this.sendBroadcast(canel);\r\n\t\t\t\t\t\t\tsetResult(RESULT_OK, intent);\r\n\t\t\t\t\t\t\tModifyPwdActivity.this.finish();\r\n\t\t\t\t\t\t\tShowMsg(\"密码修改成功\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase NetManager.MODIFY_LOGIN_PWD_INCONSISTENCE:\r\n\t\t\t\t\t\t\tLogMgr.showLog(\"ModifyLoginPasswordVideo==>\"\r\n\t\t\t\t\t\t\t\t\t+ ModifyPwdActivity.this\r\n\t\t\t\t\t\t\t\t\t\t\t.getResources()\r\n\t\t\t\t\t\t\t\t\t\t\t.getString(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.os_pwd_inconsistence));\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase NetManager.MODIFY_LOGIN_PWD_OLD_PWD_ERROR:\r\n\t\t\t\t\t\t\tLogMgr.showLog(\"ModifyLoginPasswordVideo==>\"\r\n\t\t\t\t\t\t\t\t\t+ ModifyPwdActivity.this.getResources()\r\n\t\t\t\t\t\t\t\t\t\t\t.getString(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.os_old_pwd_error));\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tLogMgr.showLog(\"ModifyLoginPasswordVideo==>\"\r\n\t\t\t\t\t\t\t\t\t+ ModifyPwdActivity.this.getResources()\r\n\t\t\t\t\t\t\t\t\t\t\t.getString(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.os_operator_error));\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "private boolean setPasswordPrivileged(@NonNull String password, int flags,\n CallerIdentity caller) {\n if (isLockScreenSecureUnchecked(caller.getUserId())) {\n throw new SecurityException(\"Cannot change current password\");\n }\n return resetPasswordInternal(password, 0, null, flags, caller);\n }", "private void resetPassAction(){\n edtResetPassword = (EditText) findViewById(R.id.edtResetPassword);\n edtResetConfirmPassword = (EditText) findViewById(R.id.edtResetConfirmPassword);\n\n strResetPassword = edtResetPassword.getText().toString().trim();\n strResetConfirmPassword = edtResetConfirmPassword.getText().toString().trim();\n if(resetValidate()){\n CommonUtils.clearErrorFromView(resetForm);\n if(InternetConnect.isConnected(ResetPasswordActivity.this)) {\n mProgressDialog.show();\n resetWebService();\n }else{\n CommonUtils.showAlertMessage(ResetPasswordActivity.this,getString(R.string.error),getString(R.string.net_connection_error_title),getString(R.string.net_connection_error_msg),getString(R.string.net_connection_error_btn));\n }\n }\n }", "@POST(\"/Reset\")\n\tint resetUser();", "public String changePassword()\n \t{\n \t\tUser u = getSessionUser();\n \n \t\ttry {\n \t\t\tu.changePassword(getParam(\"oldPassword\"), getParam(\"newPassword\"));\n \t\t\treturn Action.SUCCESS;\n \t\t}\n \t\tcatch (InvalidPasswordException e) {\n \t\t\taddActionError(getText(\"error.invalid.password\"));\n \t\t\treturn Action.ERROR;\n \t\t}\n \t\tcatch (Exception e) {\n \t\t\taddActionError(getText(\"internal.app.error\"));\n \t\t\t_log.error(\"Exception changing password!\", e);\n \t\t\treturn \"internal.app.error\";\n \t\t}\n \t}", "private void changePassword(){\n\t\tif (changeCancelButton.getText().equals(\"Anuluj\")){\n\t\t\thidePassword();\n\t\t\tchangeCancelButton.setText(\"Zmień hasło\");\n\t\t\tchangePassword = false;\n\t\t}\t\n\t\telse {\n\t\t\tif (usersTable.getSelectionModel().getSelectedIndex() > -1) {\n\t\t\t\tchangePassword = true;\n\t\t\t\tchangeCancelButton.setText(\"Anuluj\");\n\t\t\t\tuserPasswordField.setText(\"\");\n\t\t\t\tuserConfirmPasswordField.setText(\"\");\n\t\t\t\tlackUserPasswordLabel.setVisible(false);\n\t\t\t\tlackUserConfirmPasswordLabel.setVisible(false);\t\t\t\t\n\t\t\t\tshowPassword();\n\t\t\t}\n\t\t}\n\t}", "private void ensureChangePasswd(String userid, String rslMsg)\n/* */ {\n/* 252 */ WebContext webContext = LfwRuntimeEnvironment.getWebContext();\n/* 253 */ HttpSession session = null;\n/* 254 */ String challlid = UUID.randomUUID().toString();\n/* 255 */ if (webContext != null) {\n/* 256 */ HttpServletRequest httpServRequest = webContext.getRequest();\n/* 257 */ if (httpServRequest != null) {\n/* 258 */ session = httpServRequest.getSession();\n/* 259 */ if (session != null) {\n/* 260 */ session.setAttribute(\"USER_SESSION_ID\", userid);\n/* */ }\n/* */ }\n/* */ }\n/* 264 */ StringBuffer urlBuf = new StringBuffer();\n/* 265 */ urlBuf.append(\"/portal/app/mockapp/passwordmng?model=nc.uap.portal.mng.pwdmng.PasswordManagerModel\");\n/* 266 */ urlBuf.append(\"&otherPageUniqueId=\" + LfwRuntimeEnvironment.getWebContext().getWebSession().getWebSessionId());\n/* 267 */ AppLifeCycleContext.current().getApplicationContext().popOuterWindow(urlBuf.toString(), rslMsg, \"480\", \"280\", \"TYPE_DIALOG\");\n/* */ }", "public int updatePassword(String uname,String pswd,String newpaswd){\n\t\tif(this.connHndlr == null)\n\t\t\tthis.connHndlr = new ConnectionHandler();\n\t\tConnection conn = this.connHndlr.getConnection();\n\t\tint returnvalue = 0;\n\t\t\n\t\tuname = uname.toLowerCase();\t\t\n\t\ttry{\n\t\t\tString vfnQuery = \"select * from LoginDetails l where l.username = '\" + uname + \"' AND l.password = '\" + pswd + \"'\";\n\t\t\tthis.stmt = conn.createStatement();\n\t\t\tthis.resultSet = this.stmt.executeQuery(vfnQuery);\n\t\t\tif(this.resultSet.next()){\n\t\t\t\tString updtQuery = \"update LoginDetails set password = ? where username = ?\";\n\t\t\t\tthis.preparedStatement = conn.prepareStatement(updtQuery);\n\t\t\t\tthis.preparedStatement.setString(1,pswd);\n\t\t\t\tthis.preparedStatement.setString(2,uname);\n\t\t\t\tthis.preparedStatement.executeUpdate();\n\t\t\t\treturnvalue = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturnvalue = 0;\n\t\t\t}\t\t\t\n\t\t}\n\t\tcatch(SQLException se){\n\t\t\tSystem.out.println(\"SQL Exception \" + se.getMessage());\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Exception \" + e.getMessage());\n\t\t}\n\t\treturn returnvalue;\n\t}", "void setPassword(String password);", "void setPassword(String password);", "void setPassword(String password);", "public void success(ForgotPassword arg0, Response arg1) {\n\t\t\t\tif (arg0 != null) {\n\t\t\t\t\t\n\t\t\t\t\tif (arg0.getStatus() == 400) {\n\t\t\t\t\t\tSKToastMessage.showMessage(ChangePasswordActivity.this, \"Your account has already been reset password\", SKToastMessage.ERROR);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (arg0.getStatus() == 200) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tSKToastMessage.showMessage(ChangePasswordActivity.this, \"Change Password Success\", SKToastMessage.SUCCESS);\n\t\t\t\t\t\tcloseAllActivities();\n\t\t\t\t\t\tstartActivity(new Intent(ChangePasswordActivity.this, SaleTicketActivity.class));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "ChangePassword.Rsp getChangePasswordRsp();", "String getNewPassword();", "@PATCH\n @Path(\"/{uuid}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response resetPassword(@PathParam(\"uuid\") String uuid) throws Exception {\n\n return this.authorize(\"standard\", () -> {\n\n try (UserManager manager = new UserManager()) {\n\n ResponseData res = manager.resetPassword(uuid, \"123456\");\n\n if (res.getStatus() == Status.OK.getStatusCode()) {\n return ok(res);\n } else {\n return badRequest(res);\n }\n }\n });\n }", "public void changingPassword(String un, String pw, String secureQ, String secureA) {\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n\n // get SHA value of given password\n SHAEncryption sha = new SHAEncryption();\n String shaPW = sha.getSHA(pw);\n\n // updating user database\n collRU.findOneAndUpdate(\n and(\n eq(\"username\", un),\n eq(\"secureQ\", secureQ),\n eq(\"secureA\", secureA)\n ),\n Updates.set(\"password\", shaPW)\n );\n\n // test (print out user after update)\n //getUser(un);\n }", "public void setPassword(String paramPasswd) {\n\tstrPasswd = paramPasswd;\n }", "@Override\r\n\tpublic AuthZResponseDto changePassword(PasswordDto passwordDto) throws Exception {\n\t\treturn null;\r\n\t}", "@When(\"^I logout and login with updated password$\")\n public void i_logout_and_login_with_updated_password() throws Throwable {\n\n if(Device.isAndroid())\n {\n settings.clickMenu();\n dashboard.logout();\n login.isAndroidLoginFlow(PropertyReader.testDataOf(\"change_username\"), PropertyReader.testDataOf(\"new_Password\"));\n\n //login.isAndroidLoginFlow(PropertyReader.dynamicReadTestDataOf(\"change_username\"), PropertyReader.dynamicReadTestDataOf(\"change_password\"));\n }\n else {\n dashboard.clickMenu();\n dashboard.logout();\n login.iOSLoginFlow(PropertyReader.testDataOf(\"change_username\"), PropertyReader.testDataOf(\"new_Password\"));\n\n //login.iOSLoginFlow(PropertyReader.dynamicReadTestDataOf(\"change_username\"), PropertyReader.dynamicReadTestDataOf(\"change_password\"));\n }\n }", "@Override\r\n\tpublic void changePassword() throws NoSuchAlgorithmException\r\n\t{\r\n\t\tSystem.out.print(\"Enter user ID you wish to change: \");\r\n\t\tString idInput = scan.next();\r\n\t\tboolean isUnique = isUniqueID(idInput);\r\n\t\tif (isUnique == false)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Enter password for \" + idInput + \": \");\r\n\t\t\tString oldPassInput = scan.next();\r\n\t\t\tString oldHash = hashFunction(oldPassInput + database.get(idInput));\r\n\t\t\tboolean isValidated = validatePassword(oldHash);\r\n\t\t\tif (isValidated == true)\r\n\t\t\t{\r\n\t\t\t\thm.remove(oldHash);\r\n\t\t\t\tSystem.out.print(\"Enter new password for \" + idInput + \": \");\r\n\t\t\t\tmakePassword(idInput, scan.next());\r\n\t\t\t\tSystem.out.println(\"The password for \" + idInput + \" was successfully changed.\");\r\n\t\t\t}\r\n\t\t\telse if (isValidated == false)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"The ID or password you entered does not exist in the database.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (isUnique == true)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Enter password for \" + idInput + \": \");\r\n\t\t\tscan.next();\r\n\t\t\tSystem.out.println(\"Authentication fail\");\r\n\t\t\tSystem.out.println(\"The ID or password you entered does not exist in the database.\");\r\n\t\t}\r\n\t}", "public ChangePassword() {\n initComponents();\n SQLConnect sqlcon = new SQLConnect();\n con=sqlcon.sqlCon(con);\n jPasswordField2.setEnabled(false);\n jPasswordField3.setEnabled(false);\n }", "public void callChangePasswordApi() {\n if (Utils.isNetworkConnected(mContext)) {\n\n Utils.showDialog(mContext);\n ApiHandler.getApiService().get_Change_Password(getChangePasswordDetail(), new retrofit.Callback<TeacherInfoModel>() {\n @Override\n public void success(TeacherInfoModel forgotInfoModel, Response response) {\n Utils.dismissDialog();\n if (forgotInfoModel == null) {\n Utils.ping(mContext, getString(R.string.something_wrong));\n return;\n }\n if (forgotInfoModel.getSuccess() == null) {\n Utils.ping(mContext, getString(R.string.something_wrong));\n return;\n }\n if (forgotInfoModel.getSuccess().equalsIgnoreCase(\"false\")) {\n Utils.ping(mContext, \"Please enter valid password\");\n return;\n }\n if (forgotInfoModel.getSuccess().equalsIgnoreCase(\"True\")) {\n Utils.ping(mContext, getResources().getString(R.string.changPassword));\n Utils.setPref(mContext, \"Password\", passWordStr);\n changeDialog.dismiss();\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n Utils.dismissDialog();\n error.printStackTrace();\n error.getMessage();\n Utils.ping(mContext, getString(R.string.something_wrong));\n }\n });\n } else {\n Utils.ping(mContext, getString(R.string.internet_connection_error));\n }\n }", "public void resetAccountSettings()\n {\n getSaveFeedbackLabel().setText(\"\");\n getChangeUsernameErrorLabel().setText(\"\");\n updateProfilePictures();\n updateProfileLabels();\n setBufferImage(null);\n getImagePathLabel().setText(IMAGE_PATH_DEFAULT);\n changePasswordController.resetPasswordFields();\n passwordFeedbackLabel.setText(\"\");\n\n changeUsernameField.setText(\"\");\n changeUsernameField.setPromptText(controllerComponents.getAccount().getUsername());\n emailField.setPromptText(controllerComponents.getAccount().getEmail());\n currentUsernameLabel.setText(controllerComponents.getAccount().getUsername());\n }", "public static String updateUserPassword(String newPass, String account){\n return \"update users set u_pass = '\"+newPass+\"' where u_accountnum = '\"+account+\"'\";\n }", "@RequestMapping(value = \"resetPasswdComplete\", method = RequestMethod.POST)\r\n\tpublic String resetPasswdComplete(HttpServletRequest request, \r\n\t @RequestParam(value=\"email\", required=false) String email, \r\n\t @RequestParam(value=\"pass1\", required=false) String password1, \r\n\t @RequestParam(value=\"pass2\", required=false) String password2, \r\n\t @RequestParam(value=\"token\", required=false) String token, ModelMap model) throws Exception {\n\t\tif (!password1.equals(password2)) {\r\n\t\t\tmodel.addAttribute(\"error\", \"true\");\r\n\t\t\tmodel.addAttribute(\"exceptionMessage\", \"Password does not match with the confirm password field!!\");\r\n\t\t\treturn \"landing/resetPwdLastStep\";\r\n\t\t} \r\n\t\t\r\n\t\ttry {\r\n\t\t\tlogger.debug(\"Details: \" + email + \":\" + password1 + \":\" + password2 + \":\" + token);\r\n\t\t\tuserService.activateAndUpdateUser(email, password1, token, true);\r\n\t\t} catch (Exception e) {\r\n\t\t\tmodel.addAttribute(\"error\", \"true\");\r\n\t\t\tmodel.addAttribute(\"exceptionMessage\", e.getMessage());\r\n\t\t\treturn \"landing/resetPwdLastStep\";\r\n\t\t}\r\n\t\tlogger.debug(\"User Activated and password updated.\");\r\n\t\treturn \"landing/login\";\r\n\t}", "@Test\n public void testUpdateOwnPassword() throws Exception\n {\n authenticate(\"user1\");\n\n // As user1, change his own password.\n actorService.updateOwnPassword(\"user1\", \"user1newpassword\");\n\n flushTransaction();\n\n // Test that user1's password was changed.\n userAccountService.passwordMatchesAccount(getPrincipal().getUserAccount(), \"user1newpassword\");\n\n authenticate(\"admin\");\n\n // As admin, change his own password.\n actorService.updateOwnPassword(\"admin\", \"adminnewpassword\");\n\n flushTransaction();\n\n // Test that admin's password was changed.\n userAccountService.passwordMatchesAccount(getPrincipal().getUserAccount(), \"adminnewpassword\");\n }", "@Override\r\n\tpublic int changePw(HashMap<String, String> map) {\n\t\treturn mDAO.changePw(sqlSession, map);\r\n\t}", "public void setPassword(boolean password) {\n/* 983 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "com.google.protobuf.ByteString\n getNewPasswordBytes();", "public String changePass(Password pass) {\n\t \tString status=\"error\";\n\t \tString newpassword=pass.getNewpassword();\n\t\tValidate validation=new Validate();\n\t\tboolean validPassword=validation.passwordValidation(newpassword);\n\t\tSystem.out.println(validPassword);\n\t\tif(validPassword == true) {\n\t\t\ttry {\n\t \tentityManager.getTransaction().begin();\n\t \tUser_Auth u = entityManager.find(User_Auth.class,pass.getId());\n\t \tif(u.getId()==pass.getId()) \n\t \t{\n\t \t\tif (u.getPassword().equals(pass.getPassword())) {\n\t \t\t\tu.setPassword(pass.getNewpassword());\n\t \t\t entityManager.persist(u);\n\t \t entityManager.getTransaction().commit();\n\t \t status=\"success\";\n\t \t\t}\n\t \t else {\n\t \t \t status=\"fail\";\n\t}\n\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(status);\n\t \tentityManager.close();\n\t\tentityManagerFactory.close();\n\t \treturn status;\n}", "public String resetPassword(){\n\t\twrongDetails=true;\r\n\t\treturn \"login?faces-redirect=true\";\r\n\t}", "@Then(\"^Password should be updated$\")\n public void password_should_be_updated() throws Throwable {\n changepassword.verifyPasswordIsSuccessfull(\"Success\",\"Congratulations!\",\"You have successfully updated your password.\");\n changepassword.closeSuccessPwdUpdate();\n\n /* long numeric=Test.faker.number().randomNumber(2,true);\n PropertyReader.dynamicWriteTestDataOf(\"change_password\",PropertyReader.dynamicReadTestDataOf(\"new_Password\"));\n PropertyReader.dynamicWriteTestDataOf(email,PropertyReader.dynamicReadTestDataOf(\"new_Password\"));\n\n PropertyReader.dynamicWriteTestDataOf(\"new_Password\",\"update\"+numeric+\"@123\");\n PropertyReader.dynamicWriteTestDataOf(\"confirm_new_Password\",\"update\"+numeric+\"@123\");\n */\n }", "@Override\n\tpublic void alterpassword(User user) throws Exception {\n\n\t}", "@Override\n\tpublic void changePassword(String old, String newpswd)\n\t\t\tthrows HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"changePassword\");\n\t\tif (!this.isCloudChannelLive()) {\n\t\t\tthrow new HFModuleException(HFModuleException.ERR_USER_OFFLINE,\n\t\t\t\t\t\"User is not online\");\n\t\t}\n\n\t\ttry {\n\t\t\tJSONObject joReq = new JSONObject();\n\t\t\tJSONObject pl = new JSONObject();\n\t\t\tjoReq.put(\"CID\", 10241);\n\t\t\tjoReq.put(\"SID\", getsid());\n\t\t\tpl.put(\"oldPwd\", old);\n\t\t\tpl.put(\"newPwd\", newpswd);\n\t\t\tjoReq.put(\"PL\", pl);\n\n\t\t\tString req = joReq.toString();\n\n\t\t\tString rsp = HttpProxy.reqByHttpPost(req);\n\t\t\tJSONObject jo = new JSONObject(rsp);\n\n\t\t\tif (jo.isNull(\"RC\")) {\n\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_CHANGE_PSWD,\n\t\t\t\t\t\t\"can not change passwd\");\n\t\t\t}\n\t\t\tif (jo.getInt(\"RC\") != 1) {\n\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_CHANGE_PSWD,\n\t\t\t\t\t\t\"can not change passwd\");\n\t\t\t}\n\t\t} catch (JSONException e) {\n\t\t\tthrow new HFModuleException(HFModuleException.ERR_CHANGE_PSWD,\n\t\t\t\t\t\"can not change passwd\");\n\t\t}\n\t}", "int changePassword(String userName, String homeLocation, String newPassword) {\n try {\n //Get values from passed in User\n String qText = \"SELECT salt, homeLocation FROM users WHERE userName = ?\";\n PreparedStatement stmt = db.getStatement(qText);\n stmt.setString(1, userName);\n ResultSet results = db.query(stmt);\n results.next();\n String salt = results.getString(\"salt\");\n String homeLoc = results.getString(\"homeLocation\");\n results.close();\n //Here is where we \"Authenticate\" the user. If they correctly answer the homeLocation,\n //they can change the password\n if (homeLocation.equals(homeLoc)) {\n //Update the password\n String newPass = hasher.getSecurePassword(salt, newPassword);\n String qText2 = \"UPDATE users SET password = ? WHERE userName = ?\";\n PreparedStatement stmt2 = db.getStatement(qText2);\n stmt2.setString(1, newPass);\n stmt2.setString(2, userName);\n Log.d(\"Change Password\", \"Attempting...\");\n db.update(stmt2);\n Log.d(\"Change Password\", \"Success!\");\n return 0;\n } else {\n Log.d(\"Change Password\", \"Failed attempt\");\n return 1;\n }\n\n } catch (SQLException e) {\n Log.e(\"Change Password\", e.getMessage(), e);\n return 2;\n }\n }", "public void setPassword2(String password2);", "public int editPassword(User user) {\n User currentUser = userRepository.findByUsername(user.getUsername());\n if (currentUser == null)\n return 0;\n currentUser.setPassword(user.getPassword());\n userRepository.save(currentUser);\n return 1;\n }", "public void validateResetPassword()\r\n {\r\n boolean flag = this.hasErrors();\r\n if (userProfile == null || userProfile.getLoginId() == null\r\n || \"\".equals(userProfile.getLoginId().trim()))\r\n {\r\n this.setErrorMsg(this.getText(\"B2BPC0809\"));\r\n }\r\n else\r\n {\r\n try\r\n {\r\n log.info(this.getText(\"B2BPC0802\", new String[] {\r\n userProfile.getLoginId(),\r\n this.getRequest().getRemoteAddr() }));\r\n String loginId = userProfile.getLoginId();\r\n userProfile = userProfileService\r\n .getUserProfileByLoginId(userProfile.getLoginId());\r\n if (userProfile == null)\r\n {\r\n log.info(this.getText(\"B2BPC0810\", new String[] { loginId,\r\n this.getRequest().getRemoteAddr() }));\r\n this.setErrorMsg(this.getText(\"B2BPC0811\",\r\n new String[] { loginId }));\r\n flag = true;\r\n }\r\n if (!flag)\r\n {\r\n if (!flag && !userProfile.getActive())\r\n {\r\n this.setErrorMsg(this.getText(\"B2BPC0824\",\r\n new String[] { userProfile.getLoginId() }));\r\n flag = true;\r\n }\r\n if (!flag && userProfile.getBlocked())\r\n {\r\n this.setErrorMsg(this.getText(\"B2BPC0825\",\r\n new String[] { userProfile.getLoginId() }));\r\n flag = true;\r\n }\r\n }\r\n if (!flag)\r\n {\r\n previousResetPwdRecord = new ResetPasswordRequestHistoryHolder();\r\n previousResetPwdRecord.setLoginId(userProfile.getLoginId());\r\n previousResetPwdRecord.setValid(Boolean.TRUE);\r\n List<? extends Object> resetPasswordRequestHistorys = resetPasswordRequestHistoryService\r\n .select(previousResetPwdRecord);\r\n if (resetPasswordRequestHistorys == null\r\n || resetPasswordRequestHistorys.isEmpty())\r\n {\r\n previousResetPwdRecord = null;\r\n }\r\n else\r\n {\r\n previousResetPwdRecord = (ResetPasswordRequestHistoryHolder) resetPasswordRequestHistorys\r\n .get(0);\r\n int reqInvl = controlParameterService\r\n .selectCacheControlParameterBySectIdAndParamId(\r\n SECT_ID_CTRL, \"REQ_INVL\").getNumValue();\r\n Date canResetDate = new Date(previousResetPwdRecord\r\n .getRequestTime().getTime()\r\n + reqInvl * 60L * 1000);\r\n if ((new Date()).before(canResetDate))\r\n {\r\n log.info(this.getText(\"B2BPC0812\", new String[] {\r\n String.valueOf(reqInvl),\r\n DateUtil.getInstance().convertDateToString(\r\n previousResetPwdRecord\r\n .getRequestTime(),\r\n DATA_FORMAT),\r\n DateUtil.getInstance().convertDateToString(\r\n new Date(), DATA_FORMAT) }));\r\n this\r\n .setErrorMsg(this\r\n .getText(\r\n \"B2BPC0812\",\r\n new String[] {\r\n String\r\n .valueOf(reqInvl),\r\n DateUtil\r\n .getInstance()\r\n .convertDateToString(\r\n previousResetPwdRecord\r\n .getRequestTime(),\r\n DATA_FORMAT),\r\n DateUtil\r\n .getInstance()\r\n .convertDateToString(\r\n new Date(),\r\n DATA_FORMAT) }));\r\n flag = true;\r\n }\r\n }\r\n\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e);\r\n try\r\n {\r\n this\r\n .setErrorMsg(this\r\n .getText(\r\n \"B2BPC0814\",\r\n new String[] { controlParameterService\r\n .selectCacheControlParameterBySectIdAndParamId(\r\n SECT_ID_CTRL,\r\n PARAM_ID_HELPDESK_NO)\r\n .getStringValue() }));\r\n }\r\n catch (Exception e1)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e1);\r\n }\r\n }\r\n }\r\n }", "@Test\r\n public void testSetPassword() {\r\n\r\n }", "@Override\n\tpublic ResultBean updatePassword(String username, String password,String oldpassword) throws Exception {\n\t\tResultBean result= new ResultBean();\n\t\tUser user=new User(null,username,password,null,null);\n\t\tUser olduser=usermapper.findUser(user).get(0);\n\t\tif(!olduser.getPassword().equals(oldpassword)){\n\t\tresult.setMsg(\"旧密码不正确,修改失败\");\n\t\tresult.setStatus(500);\n\t return result;\n\t\t}\n\t\tusermapper.updatePasswordByAccount(user);\n\t\tresult.setMsg(\"修改成功\");\n\t\treturn result;\n\t}", "@Test\n\tpublic void resetAllUserPasswordTest() {\t\n\t\tString ids = \"1,2,3,4\";\n\t\tfor(int id : StringUtil.instance.parseIds(ids)) {\n\t\t\ttry {\n\t\t\t\tsrv.resetUserPassord(id, \"222\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tsrv.printUsers();\n\t}", "@Override\r\n\t\t\t\t\tpublic void onSuccess(CellComAjaxResult arg0) {\n\t\t\t\t\t\tDismissProgressDialog();\r\n\t\t\t\t\t\tLoginComm modifyPwdComm = arg0.read(LoginComm.class,\r\n\t\t\t\t\t\t\t\tCellComAjaxResult.ParseType.GSON);\r\n\t\t\t\t\t\tString state = modifyPwdComm.getReturnCode();\r\n\t\t\t\t\t\tString msg = modifyPwdComm.getReturnMessage();\r\n\t\t\t\t\t\tif (!FlowConsts.STATUE_1.equals(state)) {\r\n\t\t\t\t\t\t\tShowMsg(msg);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tSharepreferenceUtil.write(ModifyPwdActivity.this,\r\n\t\t\t\t\t\t\t\t\tSharepreferenceUtil.fileName, \"pwd\",\r\n\t\t\t\t\t\t\t\t\tAESEncoding.Encrypt(newpwdettxt,\r\n\t\t\t\t\t\t\t\t\t\t\tFlowConsts.key));\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsetResult(RESULT_OK, intent);\r\n\t\t\t\t\t\tModifyPwdActivity.this.finish();\r\n\t\t\t\t\t\tShowMsg(\"密码修改成功\");\r\n//\t\t\t\t\t\tstartTask(oldpwdettxt, newpwdettxt, newpwdettxt);\r\n\t\t\t\t\t}", "public String modifyPassword(ActionEvent evt) {\r\n\r\n\t\tString v$navigation = null;\r\n\r\n\t\tString v$oldPwd = getDefaultVue().getOldPassword();\r\n\t\tString v$newPwd = getDefaultVue().getNewPassword();\r\n\t\tString v$confirmPwd = getDefaultVue().getConfirmNewPassword();\r\n\t\t\r\n\t\tif(v$newPwd == null || v$newPwd.isEmpty()){\r\n\t\t\tFacesUtil.addInfoMessage(\"\", \"Nouveau mot de passe vide\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif(v$newPwd.length()>30){\r\n\t\t\tFacesUtil.addInfoMessage(\"\", \"Taille du nouveau mot de passe trés longue, moins de 30 caractéres\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif(v$oldPwd.equals(v$newPwd)){\r\n\t\t\tFacesUtil.addInfoMessage(\"\", \"Ancien mot de passe identique au nouveau\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\tif (v$newPwd.equals(v$confirmPwd)) {\r\n\t\t\ttry {\r\n\r\n\t\t\t\tAdminSvcoDeleguate.getSvcoUsr().modifierPwd(getDefaultVue().getLogin(), v$oldPwd, v$newPwd, SysGehoToolBox.getInfoUser());\r\n\r\n\t\t\t\t getDefaultVue().setModified(true);\r\n\t\t\t\t FacesUtil.addInfoMessage(\"\", \"Modification de mot de passe réussie\");\r\n\t\t\t}\r\n\r\n\t\t\tcatch (SysGehoAppException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (ServiceLocatorException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tFacesUtil.addWarnMessage(\"\", \"Confirmation différente du nouveau mot de passe\");\r\n\t\t}\r\n\r\n\t\treturn v$navigation;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n renewPass = new javax.swing.JPasswordField();\n newpass = new javax.swing.JPasswordField();\n pass = new javax.swing.JPasswordField();\n txtUsername = new javax.swing.JTextField();\n confirm = new javax.swing.JButton();\n cancel = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel1.setText(\"CHANGE PASSWORD\");\n\n jLabel2.setText(\"Enter Username :\");\n\n jLabel3.setText(\"Password :\");\n\n jLabel4.setText(\"New Password :\");\n\n jLabel5.setText(\"Re-Enter New Password :\");\n\n confirm.setText(\"CONFIRM\");\n confirm.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n confirmActionPerformed(evt);\n }\n });\n\n cancel.setText(\"CANCEL\");\n cancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(144, 144, 144)\n .addComponent(jLabel1))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGap(119, 119, 119)\n .addComponent(confirm, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGap(68, 68, 68)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel2))))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtUsername, javax.swing.GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE)\n .addComponent(pass)\n .addComponent(newpass)\n .addComponent(renewPass)))\n .addGroup(layout.createSequentialGroup()\n .addGap(66, 66, 66)\n .addComponent(cancel, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addContainerGap(109, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(49, 49, 49)\n .addComponent(jLabel1)\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2)\n .addComponent(txtUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(20, 20, 20)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3)\n .addComponent(pass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(newpass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(20, 20, 20)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(renewPass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(61, 61, 61)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(confirm)\n .addComponent(cancel))\n .addContainerGap(44, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void setPassword(String pw) {\n password = pw.toCharArray();\n cleared = false;\n }" ]
[ "0.7061639", "0.674854", "0.66894406", "0.66815555", "0.6552288", "0.6530421", "0.6447186", "0.63392204", "0.63231903", "0.6320078", "0.6315311", "0.63147146", "0.62908715", "0.6285519", "0.62338364", "0.6220069", "0.6204495", "0.6202224", "0.6191149", "0.61806923", "0.6172168", "0.6169233", "0.61680335", "0.61672425", "0.61184096", "0.61119884", "0.60956633", "0.6091121", "0.6086211", "0.60731006", "0.6065702", "0.60639864", "0.60543466", "0.60411197", "0.6032925", "0.6028539", "0.6019904", "0.6017394", "0.6016488", "0.6012453", "0.5996963", "0.5996739", "0.59813124", "0.59807074", "0.5979332", "0.5963701", "0.5960713", "0.5958539", "0.59393865", "0.59373534", "0.5924917", "0.5920486", "0.59182215", "0.59131145", "0.59119713", "0.590163", "0.5891982", "0.58892953", "0.588518", "0.5877191", "0.5870289", "0.586362", "0.58616114", "0.5857853", "0.5857853", "0.5857853", "0.5812337", "0.58013624", "0.5799405", "0.5798482", "0.5796004", "0.57917553", "0.57913715", "0.5775616", "0.57727665", "0.575867", "0.5753347", "0.574718", "0.5738372", "0.5736949", "0.5718991", "0.57114834", "0.5705783", "0.56978565", "0.56963843", "0.5696328", "0.5691707", "0.56915504", "0.56724286", "0.5669835", "0.5659657", "0.56552154", "0.565363", "0.5638572", "0.5631435", "0.5629951", "0.56290126", "0.5627806", "0.5622894", "0.5620052" ]
0.72997755
0
Method..................................getCrdentialByUserIDKey Author......................................................JLH This method retieves a Credential Bean based on the userID and key Return Value (Credentials) credentials: Returns a credentials bean
public static synchronized Credentials getCredentialByUserIDKey(int userID, String key){ Connection connection; Credentials cred = null; PreparedStatement statement = null; String preparedSQL = "Select * From credential Where User_ID = ? And RegKey =?"; try{ connection = DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setInt(1,userID); statement.setString(2,key); ResultSet rs = statement.executeQuery(); while(rs.next()){ cred = new Credentials(); cred.setCredID(rs.getInt(1)); cred.setEmail(rs.getString(2)); cred.setPass(rs.getString(3)); cred.setUserID(rs.getInt(4)); cred.setRole(rs.getString(5)); cred.setValid(rs.getInt(6)); cred.setRegKey(rs.getString(7)); } rs.close(); statement.close(); connection.close(); } catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } return cred; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static synchronized Credentials getCedentialByUser_ID(int userID){\n\t\t\tConnection connection;\n\t\t\tCredentials cred = null;\n\t\t \tPreparedStatement statement = null;\n\t\t\tString preparedSQL = \"Select * From credential Where User_ID = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection = DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setInt(1,userID);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tcred = new Credentials();\n\t\t\t\t\tcred.setCredID(rs.getInt(1));\n\t\t\t\t\tcred.setUserID(rs.getInt(2));\n\t\t\t\t\tcred.setEmail(rs.getString(3));\n\t\t\t\t\tcred.setPass(rs.getString(4));\n\t\t\t\t\tcred.setRole(rs.getString(5));\n\t\t\t\t\tcred.setValid(rs.getInt(6));\n\t\t\t\t\tcred.setRegKey(rs.getString(7));\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}\n\t\t catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn cred;\n\t}", "public List<Credential> getCredentials(Integer userId){\n\n List<Credential> allCredentials = credentialMapper.getAllCredentials(userId);\n\n// for(Credential credential : allCredentials){\n// credential.setPassword(encryptionService.decryptValue(credential.getPassword(),salt));\n// }\n\n return allCredentials;\n }", "private String getRigorCredentials(String credentialsId) {\n List<RigorCredentials> rigorCredentialsList = CredentialsProvider.lookupCredentials(RigorCredentials.class,\n Jenkins.getInstance(), ACL.SYSTEM);\n RigorCredentials rigorCredentials = CredentialsMatchers.firstOrNull(rigorCredentialsList,\n CredentialsMatchers.allOf(CredentialsMatchers.withId(credentialsId)));\n\n return rigorCredentials == null ? null : rigorCredentials.getApiKey().getPlainText();\n }", "public List<UserCredential> getAllCredentials() {\n\t\t List<UserCredential> userCredentials = new ArrayList<>();\n\t\t \n\t\t credentialRepo.findAll().forEach(userCredential -> userCredentials.add(userCredential));\n\t\t \n\t\treturn userCredentials;\n\t}", "private GoogleCredential getGoogleCredential(String userId) {\t\t\n\t\t\n\t\ttry { \n\t\t\t// get the service account e-mail address and service account private key from property file\n\t\t\t// this email account and key file are specific for your environment\n\t\t\tif (SERVICE_ACCOUNT_EMAIL == null) {\n\t\t\t\tSERVICE_ACCOUNT_EMAIL = m_serverConfigurationService.getString(\"google.service.account.email\", \"\");\n\t\t\t}\n\t\t\tif (PRIVATE_KEY == null) {\n\t\t\t\tPRIVATE_KEY = m_serverConfigurationService.getString(\"google.private.key\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\tGoogleCredential credential = getCredentialFromCredentialCache(userId);\n\t\t\treturn credential;\n\n\t\t} catch (Exception e) {\n\t\t\t// return null if an exception occurs while communicating with Google.\n\t\t\tM_log.error(\"Error creating a GoogleCredential object or requesting access token: \" + userId + \" \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "public static synchronized Credentials authenticate(String userName, String password){\n\t\t\tConnection connection;\n\t\t \tCredentials credentials=null;\n\t\t \t\n\t\t \tPreparedStatement statement=null;\n\t\t\tString preparedSQL = \"SELECT * FROM Credential WHERE Email = ? and Pass = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection=DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setString(1, userName);\n\t\t \tstatement.setString(2, password);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\tif(rs.next()){\n\t\t\t\t\tcredentials = new Credentials();\n\t\t\t\t\tcredentials.setCredID(rs.getInt(1));\n\t\t\t\t\tcredentials.setUserID(rs.getInt(2));\n\t\t\t\t\tcredentials.setEmail(rs.getString(3));\n\t\t\t\t\tcredentials.setPass(rs.getString(4));\n\t\t\t\t\tcredentials.setRole(rs.getString(5));\n\t\t\t\t\tcredentials.setValid(rs.getInt(6));\n\t\t\t\t\tcredentials.setRegKey(rs.getString(7));\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}catch (SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t\t\tcredentials = null;\n\t\t\t\t}\t\n\t\t\treturn credentials;\n\t}", "private GoogleCredential getCredentialFromCredentialCache(final String userId) throws IOException{\n\t\tGoogleCredential credential = (GoogleCredential)cache.get(userId);\n\t\tif (credential != null){\n\t\t\tM_log.debug(\"Fetching credential from cache for user: \" + userId);\n\t\t\treturn credential;\n\t\t}\n\t\telse{ // Need to create credential and create access token.\n\t\t\tcredential = SakaiGoogleAuthServiceImpl.authorize(userId, SERVICE_ACCOUNT_EMAIL, PRIVATE_KEY, CalendarScopes.CALENDAR);\n\t\t\tif (credential != null){\n\t\t\t\tcredential.refreshToken(); // Populates credential with access token\n\t\t\t\taddCredentialToCache(userId, credential);\n\t\t\t}\n\t\t\treturn credential;\n\t\t}\n\t}", "@Override\n\tpublic Object getCredentials() {\n\t\treturn credentials;\n\t}", "public Object credentials() {\n return cred;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Credentials getCredentials(AuthScope authscope)\n {\n return credentials;\n }", "public Credentials getCredentials() {\n return mCredentials;\n }", "static String getAuth(String key) {\r\n try {\r\n Properties properties = new Properties();\r\n properties.load(new FileInputStream(new File(Run.CREDENTIALS_FILE_NAME)));\r\n\r\n return properties.getProperty(key);\r\n }\r\n catch(IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n return null;\r\n }", "public Credential getCredential() {\n return this.credential;\n }", "public static synchronized String getKeyBYUserID(int user_ID){\n\t\t\n\t\t\tString key = \"\";\n\t\t\tConnection connection;\n\t\t \tPreparedStatement statement = null;\n\t\t\tString preparedSQL = \"Select RegKey From credential Where User_ID = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection = DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setInt(1, user_ID);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tkey = rs.getString(1);\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}\n\t\t catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn key;\n\t\t\t\n\t}", "public String getCredentials();", "public String getCredentialsId() {\n return settings.CredentialsId;\n }", "private CompletableFuture<LinkedList<JsonObject>> searchCredentials(final io.enmasse.iot.infinispan.device.CredentialKey key) {\n\n final QueryFactory queryFactory = Search.getQueryFactory(this.managementCache);\n\n final Query query = queryFactory\n .create(String.format(\"from %s d where d.tenantId=:tenantId and d.credentials.authId=:authId and d.credentials.type=:type\", DeviceInformation.class.getName()),\n IndexedQueryMode.BROADCAST)\n .setParameter(\"tenantId\", key.getTenantId())\n .setParameter(\"authId\", key.getAuthId())\n .setParameter(\"type\", key.getType());\n\n return CompletableFuture\n .supplyAsync(query::<DeviceInformation>list, this.executor)\n .thenApply(result -> mapCredentials(key, result));\n\n }", "@Override\n public Optional<BasicCredentials> getCredentialsFor(String query) {\n for (CredentialsSupplier s : ss) {\n Optional<BasicCredentials> b = s.getCredentialsFor(query);\n if (b.isPresent())\n return b;\n }\n return empty();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic Collection<Object> getVerifiableCredentials() {\n\t\tObject list = jsonObject.get(JSONLD_KEY_VERIFIABLE_CREDENTIAL);\n\t\tif (list != null) {\n\t\t\treturn Collections.unmodifiableCollection((Collection<Object>)list);\n\t\t}\n\t\treturn null;\n\t}", "public CredentialsModel find(int id) {\n Statement stmt = null;\n Connection connection = null;\n try {\n try {\n connection = ds.getConnection();\n try {\n stmt = connection.createStatement();\n ResultSet result = stmt\n .executeQuery(\"SELECT * FROM Credentials \"\n + \"where EmpNum = '\" + id + \"'\");\n if (result.next()) {\n CredentialsModel cred = new CredentialsModel();\n cred.setPassword(result.getString(\"EmpPassword\"));\n cred.setUserName(result.getString(\"EmpUsername\"));\n return cred;\n } else {\n return null;\n }\n } finally {\n if (stmt != null) {\n stmt.close();\n }\n\n }\n } finally {\n if (connection != null) {\n connection.close();\n }\n }\n } catch (SQLException ex) {\n System.out.println(\"Error in find \" + id);\n ex.printStackTrace();\n return null;\n }\n }", "public java.lang.String getCredentialId() {\r\n return credentialId;\r\n }", "public String getCredentialId() {\n return this.CredentialId;\n }", "public void getCredentials() throws IOException, GeneralSecurityException {\n\n KeyPairGenerator keyGenerator = KeyPairGenerator.getInstance(keyAlg);\n keyGenerator.initialize(keySize);\n keypair = keyGenerator.genKeyPair();\n Security.addProvider(new BouncyCastleProvider());\n \n PKCS10CertificationRequest pkcs10 = null;\n try{\n \tpkcs10 = generateCertificationRequest(DN, keypair);\n }\n catch(Exception ex){\n \tthrow new GeneralSecurityException(ex);\n }\n getCredentials(pkcs10.getEncoded());\n }", "@Override\n\tpublic User getUserByCredentials(String userName, String password) {\n\t\tList<User> userList = new ArrayList<User>();\n\t\tString query = \"SELECT u FROM User u\";\n\t\tuserList = em.createQuery(query, User.class).getResultList();\n\t\tUser returnUser = null;\n\t\tfor (User user : userList) {\n\t\t\tif (user.getUserName().equals(userName) && user.getPassword().equals(password)) {\n\t\t\t\tSystem.out.println(user);\n\t\t\t\treturnUser = user;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Not found\");\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn returnUser;\n\t}", "@DataProvider(name = \"Authentication\")\n\t public static Object[][] credentials() {\n\t return new Object[][] { { \"testuser_1\", \"Test@123\" }, { \"testuser_2\", \"Test@1234\" }}; \n\t }", "Credentials getKrb5Credentials() {\n/* 325 */ return this.krb5Credentials;\n/* */ }", "public Set<Credentials> getCredentials() {\n return credentials;\n }", "GoogleAuthenticatorKey createCredentials(String userName);", "@ApiModelProperty(value = \"The credentials to be used for the issuer.\")\n public IssuerCredentials getCredentials() {\n return credentials;\n }", "public String getSecret(String key) throws ClassicDatabaseException,ClassicNotFoundException;", "@Override\n\t\tpublic Object getCredentials() {\n\t\t\treturn null;\n\t\t}", "java.lang.String getCred();", "private static GSSCredential getClientCredential(final Subject subject,\n final GSSManager MANAGER,\n final Oid kerboid) throws PrivilegedActionException {\n final PrivilegedExceptionAction<GSSCredential> action = new PrivilegedExceptionAction<GSSCredential>() {\n public GSSCredential run() throws GSSException {\n return MANAGER.createCredential(null // use the default principal\n , GSSCredential.DEFAULT_LIFETIME, kerboid, GSSCredential.INITIATE_ONLY);\n }\n };\n // TO support java 5, 6 we have to do this\n // The signature for Java 5 returns an object 6 returns GSSCredential, immediate casting throws \n // warning in Java 6.\n Object credential = Subject.doAs(subject, action);\n return (GSSCredential) credential;\n }", "public AuthenticationCredentials getAuthenticationCredentials() {\n return authenticationCredentials;\n }", "@Override\n @SuppressWarnings(\"unchecked\")\n public String getPassword(int userID) throws DAOException{\n \n try{\n Session session = HibernateConnectionUtil.getSession();\n \n Criteria crit = session.createCriteria(UserPassword.class);\n //UserProfile user = getUserProfile(userID);\n crit.add(Restrictions.eq(\"user.ID\", userID));\n List<UserPassword> passList = crit.list();\n \n if (passList.isEmpty()){\n session.close();\n throw new DAOException( \n \"getPassword: No password for account with ID \" + userID);\n } \n \n UserPassword uPass = passList.get(0);\n session.evict(uPass);\n session.close();\n return uPass.getPass();\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n }", "List<ExposedOAuthCredentialModel> readExposedOAuthCredentials();", "public QCloudLifecycleCredentials onGetCredentialFromLocal(String secretId2, String secretKey2) throws QCloudClientException {\n long current = System.currentTimeMillis() / 1000;\n String keyTime = current + \";\" + (current + this.duration);\n return new BasicQCloudCredentials(secretId2, secretKey2SignKey(secretKey2, keyTime), keyTime);\n }", "public SelfManagedKafkaAccessConfigurationCredentials getCredentials() {\n return this.credentials;\n }", "public static interface Credentials extends Serializable {\n\t\tpublic String getUserName();\n\t\t/**\n\t\t* The password is encrypted.\n\t\t*/\n\t\tpublic String getPassword();\n\t}", "@Override\r\n\tpublic Credentials fetchUserByUsername(String username) {\n\t\treturn dao.findByUserName(username);\r\n\t}", "public interface X509Credential\n{\n\t/**\n\t * Returns the credential in a keystore.\n\t * @return the KeyStore\n\t */\n\tpublic KeyStore getKeyStore();\n\t\n\t/**\n\t * Returns a KeyManager which accompanies the KeyStore. \n\t * @return the KeyManager\n\t */\n\tpublic X509ExtendedKeyManager getKeyManager();\n\t\n\t/**\n\t * Returns a password which can be used to obtain PrivateKey entry\n\t * from the KeyStore returned by the {@link #getKeyStore()} method, \n\t * with the alias returned by the {@link #getKeyAlias()} method.\n\t * @return key password\n\t */\n\tpublic char[] getKeyPassword();\n\t\n\t/**\n\t * Returns an alias which can be used to obtain the PrivateKey entry\n\t * from the KeyStore returned by the {@link #getKeyStore()} method.\n\t * @return key alias\n\t */\n\tpublic String getKeyAlias();\n\t\n\t/**\n\t * Helper method to get private key from the underlying keystore\n\t * @return private key\n\t */\n\tpublic PrivateKey getKey();\n\n\t/**\n\t * Helper method to get certificate from the underlying keystore\n\t * @return certificate\n\t */\n\tpublic X509Certificate getCertificate();\n\n\t/**\n \t * Helper method to get certificate chain from the underlying keystore\n\t * @return certificate chain\n\t */\n\tpublic X509Certificate[] getCertificateChain();\n\t\n\t/**\n\t * @return RFC 2253 distinguished name of the certificate subject\n\t * @since 1.1.0\n\t */\n\tpublic String getSubjectName();\n}", "@Override\r\n\tpublic UserDTO findUser(String key)\r\n\t{\n\t\tString url=THIRD_PART_URL+\"/login/\"+key;\r\n\t\tUserDTO userDTO = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tuserDTO = restTemplate.postForObject(url, null, UserDTO.class);\r\n\t\t\treturn userDTO;\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t}\r\n\t\treturn userDTO;\r\n\t}", "public Person authenticateAndGetUser(String numCc, String password) throws RemoteException;", "private HashMap<String, String> getclientCredentials(String strRequestXML) {\r\n\t\tlogger.info(\"Entering RequestValidator.getclientCredentials()\");\r\n\t\tHashMap<String, String> clientCredentialMap = new HashMap<String, String>();\r\n\t\ttry {\r\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory\r\n\t\t\t\t\t.newInstance();\r\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\r\n\t\t\tfactory.setNamespaceAware(true);\r\n\t\t\tDocument document = null;\r\n\t\t\tXPath xpath = XPathFactory.newInstance().newXPath();\r\n\t\t\tXPathExpression expression;\r\n\r\n\t\t\tdocument = builder.parse(new InputSource(new StringReader(\r\n\t\t\t\t\tstrRequestXML)));\r\n\t\t\tObject result;\r\n\t\t\tNodeList nodes;\r\n\r\n\t\t\texpression = xpath.compile(\"//\"\r\n\t\t\t\t\t+ PublicAPIConstant.IDENTIFICATION_USERNAME + \"/text()\");\r\n\t\t\tresult = expression.evaluate(document, XPathConstants.NODESET);\r\n\t\t\tnodes = (NodeList) result;\r\n\t\t\tclientCredentialMap.put(PublicAPIConstant.LOGIN_USERNAME, nodes\r\n\t\t\t\t\t.item(0).getNodeValue());\r\n\t\t\texpression = xpath.compile(\"//\"\r\n\t\t\t\t\t+ PublicAPIConstant.IDENTIFICATION_APPLICATIONKEY\r\n\t\t\t\t\t+ \"/text()\");\r\n\t\t\tresult = expression.evaluate(document, XPathConstants.NODESET);\r\n\t\t\tnodes = (NodeList) result;\r\n\t\t\tclientCredentialMap.put(PublicAPIConstant.API_KEY, nodes.item(0)\r\n\t\t\t\t\t.getNodeValue());\r\n\t\t\texpression = xpath.compile(\"//\"\r\n\t\t\t\t\t+ PublicAPIConstant.IDENTIFICATION_PASSWORD + \"/text()\");\r\n\t\t\tresult = expression.evaluate(document, XPathConstants.NODESET);\r\n\t\t\tnodes = (NodeList) result;\r\n\t\t\tclientCredentialMap.put(PublicAPIConstant.LOGIN_PASSWORD,\r\n\t\t\t\t\tCryptoUtil.generateHash(nodes.item(0).getNodeValue()));\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(e);\r\n\t\t}\r\n\t\tlogger.info(\"Leaving RequestValidator.getclientCredentials()\");\r\n\t\treturn clientCredentialMap;\r\n\t}", "@Override\n public boolean verifyCredentials(int userId, String password){\n logger.info(\"Verifying Credentials...\");\n try{\n return userDaoInterface.verifyCredentials(userId,password);\n }catch (UserNotFoundException ex){\n System.out.println(ConsoleColors.RED+ex.getMessage()+ConsoleColors.RESET);\n return false;\n }\n\n// return DummyDB.userList.containsKey(userId) && DummyDB.userList.get(userId).getPassword().equals(password);\n }", "public Object encryptedCredential() {\n return this.encryptedCredential;\n }", "UserDTO findUserByUseridAndPassword ( String userid , String password);", "void createExposedOAuthCredential(IntegrationClientCredentialsDetailsModel integrationCCD);", "@Nonnull protected List<Credential> getEffectiveKeyTransportCredentials(@Nonnull final CriteriaSet criteria) {\n final ArrayList<Credential> accumulator = new ArrayList<>();\n for (final EncryptionConfiguration config : criteria.get(EncryptionConfigurationCriterion.class)\n .getConfigurations()) {\n \n accumulator.addAll(config.getKeyTransportEncryptionCredentials());\n \n }\n return accumulator;\n }", "public String[] getUserInfo(String usr, String key);", "public static ListBoxModel doFillCredentialsIdItems() {\n\n ListBoxModel boxModel = null;\n final ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();\n boolean changed = false;\n try {\n if (PostBuildScanDescriptor.class.getClassLoader() != originalClassLoader) {\n changed = true;\n Thread.currentThread().setContextClassLoader(PostBuildScanDescriptor.class.getClassLoader());\n }\n // Code copied from\n // https://github.com/jenkinsci/git-plugin/blob/f6d42c4e7edb102d3330af5ca66a7f5809d1a48e/src/main/java/hudson/plugins/git/UserRemoteConfig.java\n final CredentialsMatcher credentialsMatcher = CredentialsMatchers\n .anyOf(CredentialsMatchers.instanceOf(StandardUsernamePasswordCredentials.class));\n final AbstractProject<?, ?> project = null; // Dont want to limit\n // the search to a particular project for the drop\n // down menu\n boxModel = new StandardListBoxModel().withEmptySelection().withMatching(credentialsMatcher,\n CredentialsProvider.lookupCredentials(StandardCredentials.class, project, ACL.SYSTEM,\n Collections.<DomainRequirement> emptyList()));\n } finally {\n if (changed) {\n Thread.currentThread().setContextClassLoader(originalClassLoader);\n }\n }\n return boxModel;\n }", "public static synchronized int getCred_IDByBean(Credentials cred){\n\t\t\tint cred_ID=0;\n\t\t\tConnection connection;\n\t\t \tPreparedStatement statement = null;\n\t\t\tString preparedSQL = \"Select Credentials_ID From credential Where Email = ? \" +\n\t\t\t\t\t\"And Pass= ? And Role= ? And Validated= ? And RegKey= ?\";\n\t\t\ttry{\n\t\t \tconnection = DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setString(1, cred.getEmail());\n\t\t\t\tstatement.setString(2, cred.getPass());\n\t\t\t\tstatement.setString(3, cred.getRole());\n\t\t\t\tstatement.setInt(4, cred.getValid());\n\t\t\t\tstatement.setString(5, cred.getRegKey());\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tcred_ID = rs.getInt(1);\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}\n\t\t catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn cred_ID;\n\t\t\t\n\t}", "@Nonnull\n public Credential getSPCredential() throws IOException {\n\n final ClassPathResource spKeyResource = new ClassPathResource(SP_KEY);\n Assert.assertTrue(spKeyResource.exists());\n final PrivateKey spPrivateKey = KeyPairUtil.readPrivateKey(spKeyResource.getInputStream());\n\n final ClassPathResource spCrtResource = new ClassPathResource(SP_CRT);\n Assert.assertTrue(spCrtResource.exists());\n final X509Certificate spEntityCert = (X509Certificate) CertUtil.readCertificate(spCrtResource.getInputStream());\n\n return new BasicX509Credential(spEntityCert, spPrivateKey);\n }", "@Nullable\n public Credentials getCredentials() {\n return credentials;\n }", "Object getAuthInfoKey();", "public List<User> getUserDetails(int userid) {\r\n List<User> userList = new LinkedList<>();\r\n User theUser = null;\r\n List<UserCredsTbl> existing = crud.findByPrimaryKey(userid, \"FROM UserCredsTbl where roleId =:pk\");\r\n if (existing.size() > 0) {\r\n for (Object userObject : existing) {\r\n UserCredsTbl userProf = (UserCredsTbl) userObject ;\r\n theUser = new User(\r\n userProf.getUserId(),\r\n new Role(userProf.getRoleProfileTable().getBankId(), userProf.getRoleProfileTable().getDelFlg(), userProf.getRoleProfileTable().getEntityCreFlg(), userProf.getRoleProfileTable().getLchgTime(),\r\n userProf.getRoleProfileTable().getLchgUserId(), userProf.getRoleProfileTable().getRcreTime(), userProf.getRoleProfileTable().getRcreUserId(), userProf.getRoleProfileTable().getRoleDesc()), userProf.getAcctExpyDate(), userProf.getAcctInactiveDays(),\r\n userProf.getDisabledFromDate(), userProf.getDisabledUptoDate(), userProf.getRoleProfileTable().getBankId(), userProf.getLastAccessTime(),\r\n userProf.getUserId(), userProf.getNewUserFlg(), userProf.getNumPwdAttempts(), userProf.getNumPwdHistory(), userProf.getPwExpyDate(),\r\n userProf.getPwdHistory(), userProf.getRoleProfileTable().getRoleId(), userProf.getUserName(), userProf.getUserPw()\r\n );\r\n \r\n userList.add(theUser);\r\n\r\n }\r\n }\r\n return userList;\r\n\r\n }", "@Override\n\tpublic PassportUserAccountEntity getUserInfoByUserId(Long userId) {\n\t\tString key = CacheConstants.KEY_PRE_PASSPORT_USERACCOUNT_BY_XLUSERID + userId;\n\t\treturn cache.get(key, PassportUserAccountEntity.class);\n\t}", "public LoginCredentials getGlobalCredentials() {\n return super.getCredentials();\n }", "final public CredentialStore getCredentialStore(CardID cardID, Class clazz)\n {\n if (clazz == null)\n clazz = CredentialStore.class;\n\n CredentialStore store = null;\n int size = credentialBag.size();\n\n for(int i=0; ((store==null)&&(i<size)); i++)\n {\n CredentialStore cs = (CredentialStore) credentialBag.elementAt(i);\n\n if (clazz.isInstance(cs) && cs.supports(cardID))\n store = cs;\n }\n\n return store;\n }", "User findByCredential(Credential credential);", "protected static Credentials getServiceCredentials() throws AnaplanAPIException {\n if (authType == AUTH_TYPE.CERT) {\n try {\n return new Credentials(getCertificate(), getPrivateKey());\n } catch (Exception e) {\n throw new AnaplanAPIException(\"Could not initialise service credentials\", e);\n }\n } else if (authType == AUTH_TYPE.OAUTH) {\n return new Credentials(clientId);\n }\n return new Credentials(getUsername(), getPassphrase());\n }", "public String getCredentials() {\n return serverGroup.getCredentials();\n }", "@Override\n\tpublic User getUserWithCredentials(String username, String password) {\n\t\tUser loginUser=mobileDao.getLoginUser(username);\n\t\t//System.out.println(\"password is -\"+loginBean.getPassword());\n\t\tif(loginUser!=null)\n\t\t{\t\n\t\t\tif(password.equals(loginUser.getPassword()))\n\t\t\t\treturn loginUser;\n\t\t}\n\t\treturn null;\n\t}", "public UserBean getUserByCredentials(String username, String password,\n\t\t\tLoggedInUserBean loggedInUserBean) throws DBException {\n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tconn = factory.getConnection();\n\t\t\tps = conn\n\t\t\t\t\t.prepareStatement(\"SELECT * FROM `users` WHERE `username` = ? AND `password` = ?\");\n\t\t\tps.setString(1, username);\n\t\t\tps.setString(2, password);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tUserBean pat = userLoader.loadSingle(rs, loggedInUserBean);\n\t\t\t\trs.close();\n\t\t\t\tps.close();\n\t\t\t\treturn pat;\n\t\t\t} else {\n\t\t\t\trs.close();\n\t\t\t\tps.close();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (SQLException | NamingException e) {\n\n\t\t\tthrow new DBException(e);\n\t\t} finally {\n\t\t\tDBUtil.closeConnection(conn, ps);\n\t\t}\n\t}", "Boolean checkCredentials(ClientCredentialsData clientData) throws AuthenticationException;", "public Map<String, String>getCPanelResellerCredentials(String ipAddress, String reseller){\n\t\tString cPanelResellerList = getProperties().getProperty(\"cpanel.reseller.list\").trim();\n\t\tString[] cPanelServerList = cPanelResellerList.split(\"#\");\n\t\tMap<String, String> credentials = null;//\n\t\tfor(String cPanelServer: cPanelServerList){\n\t\t\tString[] params = cPanelServer.split(\";\");\n\t\t\tif(params!= null && params.length>1){\n\t\t\t\tString cpanelIP = params[0];\n\t\t\t\tif(ipAddress.equals(cpanelIP)){\n\t\t\t\t\tfor(int i=1; 1<=params.length; i++){\n\t\t\t\t\t\tString[] resellerCredentials = params[i].split(\",\");\n\t\t\t\t\t\tif(resellerCredentials!= null && resellerCredentials.length==2){\n\t\t\t\t\t\t\tString username = resellerCredentials[0].trim();\n\t\t\t\t\t\t\tString password = resellerCredentials[1].trim();\n\t\t\t\t\t\t\tif(username.equals(reseller)){\n\t\t\t\t\t\t\t\tcredentials = new HashMap<String, String>();\n\t\t\t\t\t\t\t\tcredentials.put(\"username\", username);\n\t\t\t\t\t\t\t\tcredentials.put(\"password\", password);\n\t\t\t\t\t\t\t\treturn credentials;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Credentials fetchUserByUsernameAndPassword(String username,String pass) {\n\t\treturn dao.findByUserNameAndPassword(username,pass);\r\n\t}", "@Override\n public Object getCredentials() {\n return token;\n }", "public Credentials getPeerCredentials() throws IOException {\n return getPeerCredentials_native(fd);\n }", "public abstract I_Authenticate getSecurityCtx();", "String getSecretByKey(String key);", "protected abstract char[] getPassword(String id)\n throws KeyStorageException, IOException;", "@Bean\n\t@RefreshScope\n\tCredentials refreshableCredentials() throws Exception {\n\t\tLOGGER.warn(\"***** ASKED FOR NEW CREDENTIALS\");\n\n\t\tList<String> scopes = Collections.singletonList(GcpScope.STORAGE_READ_WRITE.getUrl());\n\n\t\treturn GoogleCredentials.fromStream(\n\t\t\t\t// You'd be reading from Vault here, not from local file.\n\t\t\t\tnew FileInputStream(this.privateKeyLocation))\n\t\t\t\t.createScoped(scopes);\n\t}", "public Map<String, String> getCPanelCredentials(String ipAddress) {\n\t\tString cPanelResellerList = getProperties().getProperty(\"cpanel.server.list\").trim();\n\t\tString[] cPanelServerList = cPanelResellerList.split(\"#\");\n\t\tMap<String, String> credentials = null;\n\t\tfor(String cPanelServer: cPanelServerList){\n\t\t\tString[] params = cPanelServer.split(\",\");\n\t\t\tif(params!= null && params.length==4){\n\t\t\t\tString cpanelIP = params[0];\n\t\t\t\tif(ipAddress.equals(cpanelIP)){\n\t\t\t\t\tcredentials = new HashMap<String, String>();\n\t\t\t\t\tcredentials.put(\"username\", params[2]);\n\t\t\t\t\tcredentials.put(\"password\", params[3]);\n\t\t\t\t\treturn credentials;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic String getUsePwdByUserId(String userId) {\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tmap.put(\"userId\", userId);\n\t\tString sql = \"select *from tp_users where userId = :userId\";\n\t\tList<Map<String, Object>> list = joaSimpleDao.queryForList(sql, map);\n\t\treturn list.get(0).get(\"userPwd\").toString();\n\t}", "private String[] getCredentials() {\n String[] cred = new String[2];\n System.out.print(\"Username: \");\n cred[0] = sc.nextLine();\n System.out.print(\"Password: \");\n cred[1] = sc.nextLine();\n return cred;\n }", "protected String getPassword(final String username) {\n return credentials.get(username);\n }", "private static Credential getCredentials(HttpTransport HTTP_TRANSPORT) throws IOException {\r\n // Load client secrets.\r\n InputStream in = SheetsQuickstart.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\r\n if (in == null) {\r\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\r\n }\r\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\r\n\r\n // Build flow and trigger user authorization request.\r\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\r\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\r\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\r\n .setAccessType(\"offline\")\r\n .build();\r\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\r\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\r\n }", "@Nonnull protected List<Credential> resolveCredentials(\n @Nonnull final ProfileRequestContext profileRequestContext) {\n try {\n final ArrayList<Credential> credentials = new ArrayList<>();\n Iterables.addAll(credentials, credentialResolver.resolve(\n new CriteriaSet(new UsageCriterion(UsageType.ENCRYPTION))));\n return credentials;\n } catch (final ResolverException e) {\n log.error(\"Error resolving IdP encryption credentials\", e);\n return Collections.emptyList();\n }\n }", "public CredentialsModel[] getAll() {\n Connection connection = null; \n ArrayList<CredentialsModel> categories =\n new ArrayList<CredentialsModel>();\n Statement stmt = null;\n try {\n try {\n connection = ds.getConnection();\n try {\n stmt = connection.createStatement();\n ResultSet result = stmt.executeQuery(\n \"SELECT * FROM Credentials ORDER BY EmpNum\");\n while (result.next()) {\n categories.add(new CredentialsModel(\n employeeManager.find(result.\n getString(\"EmpUsername\")), \n result.getString(\"EmpUsername\"),\n result.getString(\"EmpPassword\")));\n }\n } finally {\n if (stmt != null) {\n stmt.close();\n }\n\n }\n } finally {\n if (connection != null) {\n connection.close();\n }\n }\n } catch (SQLException ex) {\n System.out.println(\"Error in getAll\");\n ex.printStackTrace();\n return null;\n }\n\n CredentialsModel[] catarray = new CredentialsModel[categories.size()];\n return categories.toArray(catarray);\n }", "public boolean authenticate(Connection con, String userid, String password)\n throws SQLException, NoSuchAlgorithmException{\n PreparedStatement ps = null;\n ResultSet rs = null;\n try {\n boolean userExist = true;\n // INPUT VALIDATION\n if (userid==null||password==null){\n // TIME RESISTANT ATTACK\n // Computation time is equal to the time needed by a legitimate user\n userExist = false;\n userid=\"\";\n password=\"\";\n }\n\n ps = con.prepareStatement(\"select password, extra FROM login where User_ID = ?\");\n ps.setString(1, userid);\n rs = ps.executeQuery();\n String digest, extra;\n if (rs.next()) {\n digest = rs.getString(\"password\");\n extra = rs.getString(\"extra\");\n // DATABASE VALIDATION\n if (digest == null || extra == null) {\n throw new SQLException(\"Database inconsistant Salt or Digested Password altered\");\n }\n if (rs.next()) { // Should not append, because login is the primary key\n throw new SQLException(\"Database inconsistent two CREDENTIALS with the same LOGIN\");\n }\n } else { // TIME RESISTANT ATTACK (Even if the user does not exist the\n // Computation time is equal to the time needed for a legitimate user\n digest = \"000000000000000000000000000=\";\n extra = \"00000000000=\";\n userExist = false;\n }\n\n byte[] bDigest = base64ToByte(digest);\n byte[] bExtra = base64ToByte(extra);\n\n // Compute the new DIGEST\n byte[] proposedDigest = getHash(ITERATION_NUMBER, password, bExtra);\n\n return Arrays.equals(proposedDigest, bDigest) && userExist;\n } catch (IOException ex){\n throw new SQLException(\"Database inconsistant Salt or Digested Password altered\");\n }\n finally{\n close(rs);\n close(ps);\n }\n }", "public String getUserKey()\r\n {\r\n return getAttribute(\"userkey\");\r\n }", "GoogleAuthenticatorKey createCredentials();", "public PasswordCredential getPasswordCredential() {\n return passCred;\n }", "private BasicSessionCredentials getBaseAccountCredentials (String roleName){\n\t\tif(devMode){\n\t\t\tString accessKey = System.getProperty(\"ACCESS_KEY\"); \n\t\t\tString secretKey = System.getProperty(\"SECRET_KEY\"); \n\t\t\tBasicAWSCredentials awsCreds = new BasicAWSCredentials(accessKey, secretKey);\n\t\t\tAWSSecurityTokenServiceClientBuilder stsBuilder = AWSSecurityTokenServiceClientBuilder.standard().withCredentials( new AWSStaticCredentialsProvider(awsCreds)).withRegion(baseRegion);\n\t\t\tAWSSecurityTokenService sts = stsBuilder.build();\n\t\t\tAssumeRoleRequest assumeRequest = new AssumeRoleRequest().withRoleArn(getRoleArn(baseAccount,roleName)).withRoleSessionName(\"pic-base-ro\").withDurationSeconds(3600);\n\t\t\tAssumeRoleResult assumeResult = sts.assumeRole(assumeRequest);\n\t\t\treturn new BasicSessionCredentials(\n\t\t\t\t\tassumeResult.getCredentials().getAccessKeyId(), assumeResult.getCredentials().getSecretAccessKey(),\n\t\t\t\t\tassumeResult.getCredentials().getSessionToken());\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tAWSSecurityTokenService sts = AWSSecurityTokenServiceClientBuilder.defaultClient();\n\t\t\tAssumeRoleRequest assumeRequest = new AssumeRoleRequest().withRoleArn(getRoleArn(baseAccount,roleName)).withRoleSessionName(\"pic-base-ro\").withDurationSeconds(3600);\n\t\t\tAssumeRoleResult assumeResult = sts.assumeRole(assumeRequest);\n\t\t\treturn new BasicSessionCredentials(\n\t\t\t\t\tassumeResult.getCredentials().getAccessKeyId(), assumeResult.getCredentials().getSecretAccessKey(),\n\t\t\t\t\tassumeResult.getCredentials().getSessionToken());\n\t\t}\n\t}", "public static synchronized String getPword(String userName){\n\t\t\tConnection connection;\n\t\t \tString correctPass = \"\";\n\t\t \tPreparedStatement statement=null;\n\t\t\tString preparedSQL = \"SELECT pass FROM Credential WHERE Email = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection=DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setString(1, userName);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\tif(rs.next()){\n\t\t\t\t\tcorrectPass = rs.getString(1);\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}catch (SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\treturn correctPass;\n\t}", "private boolean checkCredentials(final String userid, final String password)\n {\n if(userid == null || password == null || userid.trim().length() < 1 || password.trim().length() < 1)\n {\n return false;\n }\n this.loadPasswordFile();\n if(LoginServlet.passwords.containsKey(userid))\n {\n final String expectedPassword = LoginServlet.passwords.getProperty(userid);\n if(expectedPassword.equals(password))\n {\n return true;\n }\n }\n \n return false;\n }", "@Override\n\tpublic List<Collaborator> getListOfCollaberators(Long noteId) {\n Notes notes = noteRepos.findByNoteId(noteId);\n if(notes!=null) {\n \t return collaboRepo.getAllCollaborators(noteId);\n }\n throw new UserException(\"User not found \");\n }", "public User getUserByUserId(String userId) throws UserManagementException;", "@Override\r\n\tpublic Credential getCredential() {\n\t\treturn null;\r\n\t}", "public Employee getEmployeeCredrentials(String username, String enteredPassword){\n\n\t\ttry {\n\t\t\t// Get salt from users table by the given username\n\t\t\t// Re-encrypt using the entered password and the retrieved salt\n\t\t\tString hashedPW = \"\";\n\t\t\tString salt = login.getSalt(username);\n//\t\t\tSystem.out.println(salt);\n\t\t\thashedPW = BCrypt.hashpw(enteredPassword, salt);\n//\t\t\thashedPW = BCrypt.hashpw(enteredPassword, newSalt); // generate hashedPW\n//\t\t\tSystem.out.println(\"hashedPW: \" + hashedPW); // Needs to match database pw_hash\n\t\n\t\t\t// Get the hashed password from the database based on that user\n\t\t\tString db_password = \"\";\n\t\t\tdb_password = login.getPWHash(username, db_password);\n//\t\t\tSystem.out.println(\"DB Hashed user_password: \" + db_password); // Debug\n\t\t\t\n\t\t\t// Compare the hashed password based off the entered password with the hashed \n\t\t\t// \t\tpassword in the database\n\t\t\tif(hashedPW.equals(db_password)) {\n\t\t\t\treturn login.getUser(username);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Invalid Credintials!\");\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Invalid Credintials!\");\n\t\t\treturn null;\t// user not found\n\t\t\t// log - User not found while hashing employee salt\n\t\t}\n\t}", "@Nonnull protected List<Credential> getEffectiveKeyTransportCredentials(@Nonnull final CriteriaSet criteria) {\n final EncryptionConfigurationCriterion criterion = criteria.get(EncryptionConfigurationCriterion.class);\n assert criterion != null;\n\n final ArrayList<Credential> accumulator = new ArrayList<>();\n for (final EncryptionConfiguration config : criterion.getConfigurations()) {\n accumulator.addAll(config.getKeyTransportEncryptionCredentials());\n }\n \n return accumulator;\n }", "@Override\n public LoginCredentials getCredentials() {\n return (localSshCredentials != null) ? localSshCredentials : getGlobalCredentials();\n }", "public List<Authentication> getLoginCredentials(String username,String password) {\n // select * from administrators where adminID='Admin1' and password='123456';\n String loginQuery = \"SELECT * FROM administrators WHERE adminID = ? and password = ?\";\n return loginTemplate.query(loginQuery, (rs, rowNum) -> {\n Authentication authentication = new Authentication();\n authentication.setPassword(rs.getString(\"password\"));\n authentication.setUsername(rs.getString(\"adminID\"));\n\n System.out.println(authentication);\n return authentication;\n\n }, username,password\n );\n }", "public GetTicketByIdService(String username, String apikey) {\r\n\t\tsuper(username, apikey);\t\r\n\t}", "protected static Credentials getProxyCredentials() {\n if (!proxyUsernameSet) {\n return null;\n }\n String[] parts = getProxyUsername().split(\"\\\\\\\\\");\n if (parts.length > 1) {\n String domain = parts[0];\n String workstation = null;\n String user = parts[1];\n if (parts.length > 2) {\n workstation = user;\n user = parts[2];\n }\n return new Credentials(user, getProxyPassphrase(), domain, workstation);\n }\n return new Credentials(parts[0], getProxyPassphrase());\n }", "@Override\n\tpublic UserCookieDTO getbyUserId(Long id) {\n\t\treturn userCookieFacade.getbyUserId(id);\n\t}" ]
[ "0.7271184", "0.6787751", "0.58769804", "0.5846172", "0.57948893", "0.5790258", "0.5757519", "0.57433784", "0.57046837", "0.5580774", "0.5580774", "0.5580774", "0.55249846", "0.55138314", "0.55131865", "0.5482052", "0.5455753", "0.54321736", "0.54252183", "0.5398336", "0.5327088", "0.5295152", "0.525006", "0.52146006", "0.52066636", "0.52065974", "0.520162", "0.5168909", "0.5139233", "0.51383275", "0.5127938", "0.51117575", "0.51089495", "0.5099614", "0.50936764", "0.5058491", "0.50469387", "0.50464976", "0.504103", "0.50400305", "0.5035249", "0.50230426", "0.5022588", "0.5011714", "0.50107795", "0.49940315", "0.49873513", "0.4968422", "0.49629638", "0.4960095", "0.49063638", "0.4887795", "0.48845193", "0.48843926", "0.48795584", "0.48643842", "0.48595506", "0.4843725", "0.48366755", "0.48349297", "0.4823217", "0.4820041", "0.4816757", "0.4815542", "0.48071793", "0.4795919", "0.478588", "0.47857067", "0.4784868", "0.47842267", "0.4776507", "0.47655934", "0.47538283", "0.4750956", "0.4748003", "0.47476482", "0.4746651", "0.4746615", "0.47438884", "0.4734828", "0.4733988", "0.47307763", "0.47107446", "0.4705966", "0.4703204", "0.469341", "0.46897152", "0.468719", "0.46789044", "0.46772164", "0.46767315", "0.4674719", "0.46561772", "0.46515936", "0.4645458", "0.46385208", "0.4634285", "0.46339443", "0.46131486", "0.460281" ]
0.7827208
0
Method................................................checkCred Author......................................................JLH This method checks to see if any instances of the email are already in the database. This determines if the user's email is already registered Return Value (int) count: Returns an int that counts if any instances of the entered email are already in the database of the insert command
public static synchronized int checkCred(String email){ Connection connection; int count = 1; PreparedStatement statement = null; String preparedSQL = "Select Count(*) From credential Where Email = ?"; try{ connection = DBConnector.getConnection(); statement = connection.prepareStatement(preparedSQL); statement.setString(1,email); ResultSet rs = statement.executeQuery(); while(rs.next()){ count = rs.getInt(1); } rs.close(); statement.close(); connection.close(); } catch (SQLException ex){ System.out.println("Error: " + ex); System.out.println("Query: " + statement.toString()); } return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean emailAlreadyUsed(String email){\n \n StringBuilder query = new StringBuilder();\n \n query.append(\"SELECT id FROM userr WHERE email ='\");\n query.append(email);\n query.append(\"';\");\n \n try{\n PreparedStatement sql = conn.prepareStatement(query.toString());\n ResultSet results = sql.executeQuery();\n\n while (results.next()){\n return true;\n } \n\n\n } catch (SQLException e){\n e.printStackTrace();\n }\n \n return false;\n \n }", "public boolean checkEmail(TextField email) {\n String emailSQL = \"SELECT * FROM user WHERE email = ?\";\n ResultSet rsEmail;\n boolean email_exists = false;\n\n\n try {\n\n PreparedStatement emailPST = connection.prepareStatement(emailSQL);\n emailPST.setString(1, email.getText());\n rsEmail = emailPST.executeQuery();\n\n if (rsEmail.next()) {\n email_exists = true;\n outputText.setStyle(\"-fx-text-fill: #d33232\");\n outputText.setText(\"Email Already Used\");\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n return email_exists;\n\n }", "@Override\r\n\tpublic int checkEmailDup(String email) {\n\t\treturn mDAO.checkEmailDup(sqlSession, email);\r\n\t}", "boolean checkEmailExist(String email){\n boolean isEmailExists = false;\n dbConnection();\n try{\n stmt = con.prepareStatement(\"SELECT * FROM users ORDER BY email\");\n rs = stmt.executeQuery();\n while(rs.next()){\n String checkEmail = rs.getString(\"email\");\n if(checkEmail.equals(email)){\n isEmailExists = true;\n }\n }\n }\n catch(Exception e){\n e.printStackTrace();\n }\n return isEmailExists;\n }", "public boolean checkThisEmailAlreadyExist(String email) {\n\t\tquery = \"select id from guru where email=?\";\n\t\tList<GuruModel> list = this.jdbcTemplate.query(query,new Object[]{email},BeanPropertyRowMapper.newInstance(GuruModel.class));\n\t\t\n\t\tif(list.size() == 0)\n\t\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "@Override\r\n\tpublic int emailcheck(String email) {\n\t\treturn dao.idcheck(email);\r\n\t}", "Boolean checkEmailAlready(String email);", "boolean emailTaken(String email) throws SQLException {\n\t\tpst=con.prepareStatement(\"SELECT * FROM utilisateur WHERE email=?;\");\n\t\tpst.setString(1, email);\n\t\t\n\t\trs = pst.executeQuery();\n\t\treturn (rs.next());\n\t}", "public Boolean checkEmail(String email){\n return databaseManager.CheckIsDataAlreadyInDBorNot(email);\n }", "public int duplicateEmail(String email) {\n\t\treturn sqlSessionTemplate.selectOne(\"memberInfo.checkEmail\", email);\r\n\t}", "public boolean registercheck(Consumer consumerdetails) throws SQLException {\n\tboolean registerflag = false;\n\tSystem.out.println(\"Email==>\"+consumerdetails.getEmailId());\n\n\ttry {\n\t\tConnection con = AccessDBConnection.getDbCon();\n\t\tPreparedStatement H = con.prepareStatement(\"select * FROM Consumers WHERE EmailId='\"+consumerdetails.getEmailId()+\"'\");\n\t\t ResultSet rs = H.executeQuery();\n\t\t if (!rs.next())\n\t\t\t{\n\t\t\t\tregisterflag = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tregisterflag = false;\n\t\t\t}\n\t}\n\t\t\tcatch(Exception e){\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\treturn registerflag;\n}", "public static boolean userExists(String email)\n\t{\n\t\tString sql = \"SELECT COUNT(*) FROM UserInfo u WHERE u.email = ?;\";\n\t\ttry(Connection conn = DriverManager.getConnection(db, user, pwd);\n\t\t\t\tPreparedStatement ps = conn.prepareStatement(sql);)\n\t\t{\n\t\t\tps.setString(1, email);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tint count = 0;\n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\tcount = rs.getInt(1);\n\t\t\t}\n\t\t\tif(count > 0)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "public boolean validateRegister(String email) {\n\t\tLog.i(TAG, \"validate current user whether exisits in db\");\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString val = \"select * from \" + TABLE_USER\n\t\t\t\t+ \" where email='\" + email + \"'\";\n\t\tCursor cursor = db.rawQuery(val, null);\n\t\tcursor.moveToFirst();\n\t\tif (cursor.isAfterLast()) return true;\n\t\treturn false;\n\t}", "public boolean isExistingUser(String email){\n Long count = userRepository.countByEmail(email);\n\n return count > 0;\n }", "boolean createAccount(String username,String email,String password){\n boolean isEmailExist = checkEmailExist(email);\n boolean isnewUser = false;\n if(isEmailExist){\n System.out.println(\"email already exists\");\n }\n else{\n if(email !=\"\" && email !=null && username !=\"\" && username !=null && password !=\"\" && password !=null){\n try{\n stmt = con.prepareStatement(\"INSERT INTO users(name,email,password) VALUES(?,?,?)\");\n stmt.setString(1,username);\n stmt.setString(2,email);\n stmt.setString(3,password);\n stmt.executeUpdate();\n isnewUser = true;\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n closeConnection();\n }\n }\n else{\n System.out.println(\"Please check the value\");\n }\n }\n return isnewUser;\n }", "public boolean checkUser(String email) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"email\", email);\r\n\r\n // Returns whether at least one user with the given email exists\r\n return users.countDocuments(query) > 0;\r\n }", "public static synchronized int checkVerification(String userName){\n\t\t\tConnection connection;\n\t\t \tint valid = 1;\n\t\t \tPreparedStatement statement=null;\n\t\t\tString preparedSQL = \"SELECT Validated FROM Credential WHERE Email = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection=DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setString(1, userName);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\tif(rs.next()){\n\t\t\t\t\tvalid = rs.getInt(1);\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}catch (SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t\t\tvalid = 1;\n\t\t\t\t}\t\n\t\t\treturn valid;\n\t}", "@Override\n\tpublic boolean userExists(String email) {\n\t\treturn (searchIndex(email) >= 0);\n\t}", "public boolean checkEmail(String username) {\n String[] columns = {COL_1};\n SQLiteDatabase db = getReadableDatabase();\n String selection = COL_2 + \"=?\";\n String[] selectionArgs = {username};\n Cursor cursor = db.query(USER_TABLE_NAME, columns, selection, selectionArgs, null, null, null);\n int count = cursor.getCount();\n cursor.close();\n db.close();\n\n if (count > 0)\n return true;\n else\n return false;\n }", "@Override\n\tpublic void checkDuplicateEmail(String email){\n\t\tif(userRepository.getUserByEmail(email) != null)\n\t\t\tthrow new BookException(HttpStatus.NOT_ACCEPTABLE,\"Email already exist\");\n\t}", "private void emailExistCheck() {\n usernameFromEmail(email.getText().toString());\n }", "public boolean usercheck(String email_address)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString query = \"select email_address from users where email_address = ?\";\r\n\t\t\tpreparedStatement = connect.prepareStatement(query);\r\n\t\t\tpreparedStatement.setString(1, email_address);\r\n\t\t\tresultSet = preparedStatement.executeQuery();\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * if there's a returned value for the selected column of the query would be able to be used and passed to other classes\r\n\t\t\t * Here we display a warning message that the current username/email is already registered or taken\r\n\t\t\t */\r\n\t\t\tif(resultSet.next())\r\n\t\t\t{\r\n\t\t\t\tif(resultSet.getString(\"email_address\").equals(email_address))\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"User already exists\", \"Error\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public boolean isUserExist(String email, String Password);", "private boolean check_email_available(String email) {\n // Search the database for this email address\n User test = UserDB.search(email);\n // If the email doesn't exist user will be null so return true\n return test == null;\n }", "public boolean checkIfEmailExist(String email){\n // create query to get user with asked email\n TypedQuery<UsersEntity> findUser = entityManager.createQuery(\n \"SELECT user FROM UsersEntity user WHERE user.email=:email\",\n UsersEntity.class);\n\n // set query email parameter\n findUser.setParameter(\"email\", email);\n\n try {\n findUser.getSingleResult();\n FacesMessage msg = new FacesMessage(\"User: \" + email + \" - already exist\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n return true;\n } catch (NoResultException e) {\n return false;\n }\n }", "@Override\n\tpublic int isCompanyExists(String email, String password) throws CouponSystemException {\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t\tString sql = \"select ID from COMPANIES where EMAIL = ? and PASSWORD = ?\";\n\t\t\tPreparedStatement pstmt = con.prepareStatement(sql);\n\t\t\tpstmt.setString(1, email);\n\t\t\tpstmt.setString(2, password);\n\t\t\tResultSet rs = pstmt.executeQuery();\n\t\t\tif(rs.next()) {\n\t\t\t\treturn rs.getInt(\"ID\");\n\t\t\t} else {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tthrow new CouponSystemException(\"Finding company with email: \" + email + \" and password: \" + password + \", failed\", e);\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().restoreConnection(con);\n\t\t}\n\t}", "boolean isEmailExist(String email);", "boolean checkLoginDetails(String email,String password){\n boolean isValidUser = false;\n dbConnection();\n try{\n stmt = con.prepareStatement(\"SELECT * FROM users ORDER BY email\");\n rs = stmt.executeQuery();\n while(rs.next()){\n String checkEmail = rs.getString(\"email\");\n String checkpassword = rs.getString(\"password\");\n if(checkEmail.equals(email) && checkpassword.equals(password)){\n isValidUser = true;\n }\n }\n }\n catch(Exception e){\n e.printStackTrace();\n }\n return isValidUser;\n }", "public boolean checkMail(String mail){\r\n error =\"\";\r\n boolean check = mail.matches(emailRegex);\r\n if(!check){\r\n error =\"mail sai dinh dang\";\r\n return false;\r\n }\r\n // check mail da ton tai trong database chua\r\n try {\r\n PreparedStatement preSta = conn.prepareStatement(sqlCheckMailExists);\r\n preSta.setString(1, mail);\r\n ResultSet rs= preSta.executeQuery();\r\n if(rs.next()){\r\n error=\"mail da ton tai\";\r\n return false;\r\n }\r\n else{\r\n return true;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(UserDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return false;\r\n }", "private boolean checkEmail() throws IOException {\n String email = getEmail.getText();\n \n if(email.contains(\"@\")) { \n UserDatabase db = new UserDatabase();\n \n if(db.emailExists(email)) {\n errorMessage.setText(\"This email address has already been registered.\");\n return false;\n }\n \n return true;\n }\n else {\n errorMessage.setText(\"Please enter a valid email. This email will be \"+\n \"used for verification and account retrieval.\");\n return false;\n }\n }", "public static boolean isRegisteredEmail(String email) throws SQLException{\n Connection connect = null;\n ResultSet set = null;\n String isRegisteredEmailSQL = \"SELECT email FROM users where email = ?\";\n\n // Check Email Try Block:\n try {\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare SQL Statement:\n PreparedStatement statement = connect.prepareStatement(isRegisteredEmailSQL);\n // Set Attributes / Parameters:\n statement.setString(1, email);\n // Execute Statement:\n set = statement.executeQuery();\n // check for results:\n while (set.next()){\n return true;\n }\n }catch (Exception e){\n e.printStackTrace();\n }finally {\n if(set != null){\n set.close();\n }\n if (connect != null){\n connect.close();\n System.out.println(\"Closing DB Connection!\");\n }\n }\n // End Of Check Email Try Block.\n return false;\n }", "public boolean checkEmail(String Email) {\n SQLiteDatabase db = DatabaseHelper.this.getReadableDatabase();\n Cursor cursor = db.rawQuery(\"select * from Users where Email=?\", new String[]{Email});\n if (cursor.getCount() > 0) {\n\n return false;\n } else {\n return true;\n }\n }", "boolean checkEmailExistsForClient(String email) throws RuntimeException;", "public boolean alreadyRegister(String email) {\n \tfor (User user : list) {\n \t\tif (user.getEmail().equals(email))\n \t\t\treturn true;\n \t}\n \treturn false;\n }", "boolean emailExistant(String email, int id) throws BusinessException;", "boolean loginUser(String email,String password){\n boolean checkUserDetails = checkLoginDetails(email,password);\n boolean userExists = false;\n if(checkUserDetails){\n try{\n userExists =true;\n stmt = con.prepareStatement(\"UPDATE users SET userStatus = ? WHERE email = ?\");\n stmt.setBoolean(1,true);\n stmt.setString(2,email);\n stmt.executeUpdate();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n closeConnection();\n }\n }\n return userExists;\n }", "long countUserByEmail(String email);", "@Override\n @SuppressWarnings(\"unchecked\")\n public boolean checkExistsEmail(String emailAddress) throws DAOException{\n \n try{\n Session session = HibernateConnectionUtil.getSession();\n \n Criteria crit = session.createCriteria(UserProfile.class);\n crit.add(Restrictions.eq(\"emailAddress\", emailAddress));\n List<UserProfile> userList = crit.list();\n session.close();\n return !userList.isEmpty();\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n }", "@Override\n public boolean isUserAlreadyExist(String email) throws UserException {\n User user;\n\n if (email == null || email.equals(\"\")) {\n logger.error(\"invalid user id: \" + email);\n return false;\n }\n try {\n user = userDAO.getUserById(email);\n return user != null;\n } catch (UserException e) {\n e.printStackTrace();\n logger.error(\"failed to delete a user with id: \" + email);\n return false;\n }\n }", "public boolean existeEmail(String email) {\n Conexion c = new Conexion();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String sql = \"SELECT email FROM usuario WHERE usuario.email = ?\";\n try {\n ps = c.getConexion().prepareStatement(sql);\n ps.setString(1, email);\n rs = ps.executeQuery();\n if (rs.next()) {\n return true;\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n } finally {\n try {\n ps.close();\n rs.close();\n c.cerrarConexion();\n } catch (Exception ex) {\n }\n }\n return false;\n }", "boolean existsByEmail(String email);", "private boolean isAlreadySubscribed(String addressMail) throws SQLException\n {\n\tDBI database = new DBI(\"sqletud.univ-mlv.fr\",5432,\"rtchuitc\",\"rtchuitc\",\"papa\");\n\t/*\n\t database.establishConnection();\n\t ResultSet result = database.reqQuery(\"select * from account_tdoms where mail=\"+addressMail);\n\t if(result==null)return false;\n\t res = result.isFirst()&&result.isLast();\n\t database.disconnect();\n\t*/\n\tAccountManager am = new AccountManager(database, \"account_tdoms\");\n\treturn am.isAccountCreated(addressMail);\n }", "public boolean checkUser(String mail) {\n String[] selectionArgs = {mail};\n String selectionString = \"SELECT * FROM \" + UserDBHelper.TABLE_NAME + \" WHERE \" + UserDBHelper.COLUMN_EMAIL + \" = ?\";\n SQLiteDatabase db = dbHelper.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectionString,selectionArgs);\n\n if (cursor.getCount() > 0) {\n cursor.close();\n db.close();\n return true;\n }\n else{\n cursor.close();\n db.close();\n return false;\n }\n\n }", "public boolean chkmail(String email){\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(\"Select * from user where email=?\",new String[]{email});\n if (cursor.getCount()>0) return false;\n else return true;\n }", "private boolean verificaEmailJaCadastrado(String email) throws SQLException {\n String sql = \"SELECT * from crud_alunos where email=?\";\n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n preparador.setString(1, email);\n ResultSet rs = preparador.executeQuery();\n if(rs.next()){\n JOptionPane.showMessageDialog(null, \"Email já Cadastrado!\");\n return true;\n }\n else {\n return false;\n }\n \n \n }", "public boolean seenAllNotifications(String email) throws SQLException {\n try {\n ps = connection.prepareStatement(\"UPDATE notification SET seen=1 WHERE user_email = ?\");\n ps.setString(1,email);\n int res = ps.executeUpdate();\n return res >= 1 ;\n } finally {\n //Db.close(rs);\n Db.close(ps);\n }\n }", "@Override\r\n\tpublic boolean register(String email, String id, String pw) {\n\t\treturn jdbcTemplate.update(\"insert into s_member values(?,?,?,\"\r\n\t\t\t\t+ \"'normal',sysdate)\",email,id,pw)>0;\r\n\t}", "public boolean checkmail(String email)\n {\n SQLiteDatabase db=this.getReadableDatabase();\n Cursor cursor=db.rawQuery(\"select * from user where email=?\", new String[]{email});\n if(cursor.getCount()>0)\n return false;\n\n else\n return true;\n\n }", "public boolean isUserExisted(String _fbEmail);", "public static boolean emailAlreadyExists(String email) throws ParseException {\n ParseQuery<TipperUser> query = ParseQuery.getQuery(\"TipperUser\");\n query.whereEqualTo(\"email\", email);\n List<TipperUser> result = query.find();\n if (result.isEmpty()) {\n return false;\n } else return true;\n }", "public boolean existsByEmail(String email);", "public boolean existsByEmail(String email);", "public boolean chkMailPswd(String email , String passwd){\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(\"Select * from user where email=? and passwd =?\",new String[]{email,passwd});\n if (cursor.getCount()>0) {\n maill = email;\n passwood = passwd;\n return true;\n }\n else return false;\n\n }", "public CheckEmailResponse checkemail(ResetPasswordRequest resetpwdreq) {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// get reg emailid from db\n\t\tlogger.info(\"In checkemail Method==========\");\n\t\t// Response object\n\t\tCheckEmailResponse obj = new CheckEmailResponse();\n\t\tString sql = \"select count(1) from user where emailid = ? \";\n\t\tint result = jdbcTemplate.queryForObject(sql, new Object[] { resetpwdreq.getEmailid() }, Integer.class);\n\t\tlogger.info(\"Result Query :\" + result);\n\t\tif (result > 0) {\n\t\t\tobj.setStatus(true);\n\t\t\tobj.setMessage(\"EMAIL EXIST\");\n\t\t\treturn obj;\n\t\t} else {\n\t\t\tobj.setStatus(false);\n\t\t\tobj.setMessage(\"EMAIL DOES NOT EXIST\");\n\t\t\treturn obj;\n\t\t}\n\n\t}", "@Override\r\n\tpublic boolean isCompanyExists(String compEmail, String compPass) throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tString sql = \"select * from companies where companyEmail=? and companyPass=?\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(sql);\r\n\t\t\tpstmt.setString(1, compEmail);\r\n\t\t\tpstmt.setString(2, compPass);\r\n\t\t\tResultSet rs = pstmt.executeQuery();\r\n\r\n\t\t\treturn rs.next();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"isCompanyExists Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean checkUser(String email) {\n db= openHelper.getReadableDatabase();\n String[] columns = {\n COLUMN_USER_ID\n };//coloane de returnat\n String selection = COLUMN_USER_EMAIL + \" = ?\";//criteriul de selectie\n String[] selectionArgs = {email};//argumentul pentru selectie\n // query user table with condition\n //SELECT column_user_id FROM useri WHERE column_user_email = 'jack@androidtutorialshub.com';\n Cursor cursor = db.query(TABLE_USER, //tabel pentru query\n columns, //coloane de returnat\n selection, //coloane pentru clauze WHERE\n selectionArgs, //valori pentru clauza WHERE\n null, //group the rows\n null, //filter by row groups\n null); //ordinea de sortare\n int cursorCount = cursor.getCount();\n cursor.close();\n if (cursorCount > 0) {\n return true;\n }\n return false;\n }", "@Then(\"^i should have an error message that An account using this email address has already been registered\\\\. Please enter a valid password or request a new one\\\\.$\")\n public void i_should_have_an_error_message_that_An_account_using_this_email_address_has_already_been_registered_Please_enter_a_valid_password_or_request_a_new_one() throws Throwable {\n AlreadyUserPage alreadyuserpage = PageFactory.initElements(driver, AlreadyUserPage.class);\n alreadyuserpage.verify_email_already_registered();\n\n }", "boolean isUserExists(RegisterData data) throws DuplicateUserException;", "public boolean checkUser(String email) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_USER_ID\n };\n \n // selection criteria\n String selection = COLUMN_USER_EMAIL + \" = ?\";\n \n // selection argument\n String[] selectionArgs = {email};\n \n // query user table with condition\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = 'jack@androidtutorialshub.com';\n */\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.query(\n TABLE_USER, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n cursor.close();\n db.close();\n\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }", "public String checkEmail() {\n String email = \"\"; // Create email\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n email = checkEmpty(\"Email\"); // Call method to check input of email\n // Pattern for email\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\" + \"[a-zA-Z0-9_+&*-]+)*@\"\n + \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" + \"A-Z]{2,7}$\";\n boolean isContinue = true; // Condition loop\n\n while (isContinue) {\n // If pattern not match, the print out error\n if (!Pattern.matches(emailRegex, email)) {\n System.out.println(\"Your email invalid!\");\n System.out.print(\"Try another email: \");\n email = checkEmpty(\"Email\");\n } else {\n isContinue = false;\n }\n }\n\n boolean isExist = false; // Check exist email\n for (Account acc : accounts) {\n if (email.equals(acc.getEmail())) {\n // Check email if exist print out error\n System.out.println(\"This email has already existed!\");\n System.out.print(\"Try another email: \");\n isExist = true;\n }\n }\n\n // If email not exist then return email\n if (!isExist) {\n return email;\n }\n }\n return email; // Return email\n }", "public Boolean existsByEmail(String email);", "public Boolean signUp(String email, String password) {\n //set uo status flag\n boolean flag = false;\n //check the storage if the credentials exist\n if (users.containsKey(email)) {\n if (users.get(email).getEmail().equalsIgnoreCase(us.getEmail())\n && users.get(email).getPassword().equalsIgnoreCase(password)) {\n flag = true;\n response = \"USER_EXIST\";\n }\n }\n //add the new user to the map\n us.setEmail(email);\n us.setPassword(password);\n synchronized (users) {\n users.put(email, us);\n response = \"CREATED\";\n }\n return flag;\n\n }", "public static String emailValid(String email){\n return \"select u_email from users having u_email = '\" + email + \"'\";\n }", "public boolean isUsernameExist(String un) {\n\n boolean exist = false;\n\n // accessing registeredUser table (collection)\n MongoCollection<Document> collection = db.getCollection(\"registeredUser\");\n\n // ----- get document of given username from registeredData -----\n System.out.println(\"\\nVerifying if username already exists or not\\n--------------------\\n\");\n String colUsername = \"username\"; // set key and value to look for in document\n FindIterable<Document> docOne = collection.find(Filters.eq(colUsername, un)); // find document by filters\n MongoCursor<Document> cursor1 = docOne.iterator(); // set up cursor to iterate rows of documents\n try {\n // cursor1 will only have 1 data if we found a match\n if (cursor1.hasNext()) {\n System.out.println(\"Username already exists\");\n exist = true;\n }\n else {\n System.out.println(\"Username is available to register\");\n }\n } finally {\n cursor1.close();\n }\n\n return exist;\n }", "public static synchronized int addCred(Credentials cred){\n\t\t\tint status=0;\t\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"INSERT INTO credential (Email, Pass, User_ID, Role, \" +\n\t\t\t\t\t\"Validated, RegKey) VALUES(?,?,?,?,?,?) \";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\n\t\t\t\tstatement.setString(1, cred.getEmail());\n\t\t\t\tstatement.setString(2, cred.getPass());\n\t\t\t\tstatement.setInt(3, cred.getUserID());\n\t\t\t\tstatement.setString(4, cred.getRole());\n\t\t\t\tstatement.setInt(5, cred.getValid());\n\t\t\t\tstatement.setString(6, cred.getRegKey());\n\t\t\t\tstatus = statement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\n\t\t\treturn status;\n\t}", "public boolean checkUser(String email) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_USER_ID\n };\n SQLiteDatabase db = this.getReadableDatabase();\n\n // selection criteria\n String selection = COLUMN_USER_EMAIL + \" = ?\";\n\n // selection argument\n String[] selectionArgs = {email};\n\n // query user table with condition\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = 'jack@androidtutorialshub.com';\n */\n Cursor cursor = db.query(TABLE_NAME, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n cursor.close();\n db.close();\n\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }", "@Test\r\n\tpublic void TC_08_verify_Existing_Email_Address() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\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 valid email address already taken\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\", confirmPassword);\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 already registered\r\n\t\t//email address is displayed\r\n\t\terrMsg = Page_Registration.getMandatoryFieldErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"Username already taken.\");\r\n\r\n\t}", "public boolean checkProfileEmail(String email, String password) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_USERNAME\n };\n SQLiteDatabase db = this.getReadableDatabase();\n // selection criteria\n String selection = COLUMN_EMAIL + \" = ?\" + \" AND \" + COLUMN_PASSWORD + \" = ?\";\n\n // selection arguments\n String[] selectionArgs = {email, password};\n\n // query user table with conditions\n Cursor cursor = db.query(TABLE_PROFILE, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n\n int cursorCount = cursor.getCount();\n\n cursor.close();\n db.close();\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }", "public static synchronized int getUserIDByEmail(String email){\n\t\t\n\t\t\tint user_ID = 0;\n\t\t\tConnection connection;\n\t\t \tPreparedStatement statement = null;\n\t\t\tString preparedSQL = \"Select User_ID From credential Where Email = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection = DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setString(1, email);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tuser_ID = rs.getInt(1);\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}\n\t\t catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t\tuser_ID=0;\n\t\t\t}\n\t\t\treturn user_ID;\n\t\t\t\n\t}", "public boolean confirmEmail(String email) {\n return database.emailExists(email);\n }", "@Override\n\tpublic User findDuplicateByEmail(String email) {\n\t\tUser dbUser = userRepository.findByEmail(email);\n\t\tif (dbUser != null) {\n\t\t\tthrow new RuntimeException(\"User Already Registered.\");\n\t\t}\n\t\treturn null;\n\t}", "private void checkDuplicateEntry(Long userId, String email, Boolean isBeneficiary, Boolean isFiduciary) {\n\t\tList<Contact> contactOpt = contactRepository.findByUserIdAndEmailAndIsFiduciaryAndIsBeneficiaryAndDeletedFalse(\n\t\t\t\tuserId, email, isBeneficiary, isFiduciary);\n\t\tif (!contactOpt.isEmpty()) {\n\t\t\tthrow DataAlreadyExistException.of(MessageConstant.EMAIL_ALREADY_EXISTED);\n\t\t}\n\t}", "@Override\n\tpublic boolean isEmailAlreadyUsed(final String email) {\n\t\treturn null != this.getUserId(email);\n\t}", "@Test\n\tpublic void emailExistsAuth() {\n\t\tassertTrue(service.emailExists(\"neagu_ionutalin@icloud.com\"));\n\t}", "@Override\r\n\t/**\r\n\t * @return 1-account被占用,2-email被占用\r\n\t */\r\n\tpublic int registConsumer(final String account, final String emailAddress, String pwd,String name,\r\n\t\t\tString thumbnailPath,String address,String phoneNum,Integer userId) {\n\t\tConsumerMapper m=this.getSqlSession().getMapper(ConsumerMapper.class);\r\n\t\t\r\n\t\tif(m.countByExample(new ConsumerExample(){{\r\n\t\t\tthis.createCriteria().andAccountEqualTo(account);\r\n\t\t}})>0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\t\r\n\t\tif(m.countByExample(new ConsumerExample(){{\r\n\t\t\tthis.createCriteria().andEmailEqualTo(emailAddress);\r\n\t\t}})>0){\r\n\t\t\treturn 2;\r\n\t\t}\r\n\t\t\r\n\t\tConsumer c=new Consumer();\r\n\t\tc.setAccount(account);\r\n\t\tc.setAddress(address);\r\n\t\tc.setEmail(emailAddress);\r\n\t\tc.setName(name);\r\n\t\tc.setPassword(pwd);\r\n\t\tc.setPhoneNum(phoneNum);\r\n\t\tc.setThumbnailPath(thumbnailPath);\r\n\t\tc.setUserId(userId);\r\n\t\tm.insert(c);\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "public boolean isThereSuchAUser(String username, String email) ;", "public boolean checaExisteEmail(String email){\r\n\t\tfor (Usuario UsuarioTemp : listaDeUsuarios) {\r\n\t\t\tif(UsuarioTemp.getEmail().equals(email)){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\treturn false;\r\n\t}", "public boolean isAccountValidated(GuruModel model) {\n\t\tquery = \"select id from guru where email=? and pwd=? and validate_email=?\";\n\t\tList<GuruModel> list = this.jdbcTemplate.query(query,new Object[]{model.getEmail(),this.edutility.getSHA256(model.getPwd()),true},\n\t\t\t\tBeanPropertyRowMapper.newInstance(GuruModel.class));\n\t\t\n\t\tif(list.size() == 0)\n\t\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t\t\n\t}", "public boolean isUserIdTaken(String userEmailId);", "public static boolean isAccountActive(String email){\n Connection connect = null;\n ResultSet set = null;\n String isAccountActiveSQL = \"SELECT active FROM users WHERE email = ?\";\n\n // Check If Account is Active Try Block:\n try {\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare Statement:\n PreparedStatement statement = connect.prepareStatement(isAccountActiveSQL);\n // Set Parameters:\n statement.setString(1, email);\n // Execute Statement:\n set = statement.executeQuery();\n // Check For Result Set:\n while (set.next()){\n // Check Value:\n if(set.getInt(\"active\") == 1) {\n return true;\n }\n // End Of Check Value.\n }\n // End Of Check For Result Set.\n\n }catch(SQLException e){\n e.printStackTrace();\n }\n // End Of Check If Account is Active Try Block:\n\n return false;\n }", "@Override\r\n\tpublic int inviteEmailCheck(String useremail, int projectno) {\n\t\treturn pDao.inviteEmailCheck(useremail, projectno);\r\n\t}", "public static boolean validateCustomer(String eMail, String passWord){\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//Database connection\r\n\t\t\tcon = DBConnect.getConnection();\r\n\t\t\tstmt = con.createStatement();\r\n\t\t\t\r\n\t\t\t//query\r\n\t\t\tString sql = \"select * from customer where email='\"+eMail+\"' and password='\"+passWord+\"'\";\r\n\t\t\t//execute query\r\n\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\r\n\t\t\t//checking if there is an entry\r\n\t\t\tif(rs.next())\r\n\t\t\t\tisSuccess = true;\r\n\t\t\telse\r\n\t\t\t\tisSuccess = false;\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn isSuccess;\r\n\t\t\r\n\t}", "@When(\"I try to register a new user with existing email\")\n\tpublic void i_try_to_register_a_new_user_with_existing_email() {\n\n\t\tString sql = \"select email from users\\n\" + \"where email is not null\\n\" + \" limit 1;\";\n\t\temail = (String) DBUtils.getCellValue(sql);\n\t\tassertNotNull(email);\n\n\t\tresponce = RestAssured.given().header(\"Authorization\", RestUtils.token).param(\"first-name\", \"Johnny\")\n\t\t\t\t.param(\"last-name\", \"Cage\").param(\"email\", email).param(\"password\", \"subzerobest\")\n\t\t\t\t.param(\"role\", \"student-team-member\").param(\"batch-number\", \"8\").param(\"team-name\", \"CodeHunters\")\n\t\t\t\t.param(\"campus-location\", \"VA\").when().post(RestAssured.baseURI + \"/api/students/student\");\n\n\t}", "public static boolean isAccountVerified(String email){\n Connection connect = null;\n ResultSet set = null;\n String isAccountVerifiedSQL = \"SELECT verified FROM users WHERE email = ?\";\n\n // Check If Account is Verified Try Block:\n try {\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare Statement:\n PreparedStatement statement = connect.prepareStatement(isAccountVerifiedSQL);\n // Set Parameters:\n statement.setString(1, email);\n // Execute Statement:\n set = statement.executeQuery();\n // Check For Result Set:\n while (set.next()){\n // Check Value:\n if(set.getInt(\"verified\") == 1) {\n return true;\n }\n // End Of Check Value.\n }\n // End Of Check For Result Set.\n\n }catch(SQLException e){\n e.printStackTrace();\n }\n // End Of Check If Account is Verified Try Block:\n\n return false;\n }", "public boolean registeredUser(String email, String password)\n {\n for (User user : users) {\n if(user.email.equals(email) && user.password.equals(password)) {\n Log.v(\"DonationApp\", \"Logging in as: \" + user.firstName + \" \" + user.lastName);\n return true;\n }\n }\n return false;\n }", "@Test\n\t@DatabaseSetup(type = DatabaseOperation.CLEAN_INSERT, value = {DATASET_USUARIOS}, connection = \"dataSource\")\n\t@DatabaseTearDown(DATASET_CENARIO_LIMPO)\n\tpublic void testVerificaEmailJaCadastradoMustPass(){\n\t\tUsuario usuario = new Usuario();\n\t\t\n\t\tusuario.setNome(\"Eduardo\");\n\t\tList<Usuario> usuarios = usuarioService.find(usuario);\n\t\tAssert.assertEquals(usuarios.size(), 1);\n\t\tAssert.assertEquals(usuarios.get(0).getNome(), \"Eduardo Ayres\");\n\t\t\n\t\tusuario = new Usuario();\n\t\tusuario.setEmail(\"eduardo@\");\n\t\tusuarios = usuarioService.find(usuario);\n\t\tAssert.assertEquals(usuarios.size(), 1);\n\t}", "@Override\n @Transactional(readOnly = true)\n public Boolean existsByEmail(String email) {\n return this.pacienteRepository.existsByEmail(email);\n }", "public boolean isCompanyEmailExists(String companyEmail) throws Exception {\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n\n try {\n //Establish a connection from the connection manager\n connection = JdbcUtils.getConnection();\n\n //Creating the SQL query\n String sqlStatement = \"SELECT company_email FROM companies WHERE company_email = ?\";\n\n //Combining between the syntax and our connection\n preparedStatement = connection.prepareStatement(sqlStatement);\n\n //Replacing the question marks in the statement above with the relevant data\n preparedStatement.setString(1, companyEmail);\n\n //Executing the update\n ResultSet result = preparedStatement.executeQuery();\n\n if (result == null) {\n return false;\n } else return true;\n\n } catch (Exception e) {\n throw new Exception(\"Query failed\", e);\n } finally {\n //Closing the resources\n JdbcUtils.closeResources(connection, preparedStatement);\n }\n }", "@Override\n\tpublic boolean validateRequest(String userEmail, String senderEmail) {\n\t\tconn = ConnectionFactory.getConnection();\n\n\t\ttry {\n\t\t\tString sql = \"select count(*) as rowcount from friendship where user_id_1=? and user_id_2=? and status='N'\";\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t\tpstmt.setString(1, senderEmail);\n\t\t\tpstmt.setString(2, userEmail);\n\n\t\t\tset = pstmt.executeQuery();\n\n\t\t\tset.next();\n\t\t\t\n\t\t\tint rowcount = set.getInt(\"rowcount\");\n\t\t\t\n\t\t\tif(rowcount > 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t} catch(SQLException sqlex) {\n\t\t\tsqlex.printStackTrace();\n\t\t} catch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionFactory.closeResources(set, pstmt, conn);\n\t\t}\n\n\t\treturn false;\n\t}", "public String repeatedUser(String usernameValue, String passwordValue, String emailValue)\n {\n this.enterCredentials(usernameValue,passwordValue,emailValue);\n helperMethods.waitForWebElement(emailNotUnique, 30);\n return emailNotUnique.getText() ;\n }", "private boolean isValidAcount(final String theEmail, final String thePassword) {\n if(!isValidEmail(theEmail) || !isValidPassword(thePassword)) return false;\n if (!theEmail.equals(ADMIN_EMAIL) || !thePassword.equals(ADMIN_PASSWORD)) return false;\n\n return true;\n }", "private boolean existsUser(Connection con) throws SQLException {\n\t\tlog.entry();\n\t\tboolean userExists = false;\n\t\tPreparedStatement ps = con.prepareStatement(\"SELECT COUNT(*) FROM Users \"\n\t\t + \"WHERE `id`=?;\");\n\t\ttry {\n\t\t\tps.setInt(1, id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.first() && rs.getInt(1) > 0) {\n\t\t\t\tuserExists = true;\n\t\t\t}\n\t\t} finally {\n\t\t\tcloseStatement(ps);\n\t\t}\n\t\tthrowSqlException();\n\t\tlog.exit();\n\t\treturn userExists;\n\t}", "@Override\n public boolean isUserEmailExists(String email, String exludeUserName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_EMAIL_EXCLUDE_USERNAME);\n params.put(User.PARAM_EMAIL, email);\n params.put(User.PARAM_USERNAME, exludeUserName);\n User user = getRepository().getEntity(User.class, params);\n\n return user != null && user.getEmail() != null && !user.getEmail().equals(\"\");\n }", "@Override\n\tpublic int getUserId(String email) throws DatabaseException, DataNotFoundException {\n\t\tConnection con = DbUtil.getConnection();\n\t\tStudentRegistrationValidationDaoi studentRegistrationValidationDaoi=new StudentRegistrationValidationDaoimpl();\n\t\tint value=studentRegistrationValidationDaoi.getUserId(email, con);\n\t\tDbUtil.closeConnection(con);\n\t\treturn value;\n\t}", "public static boolean verifyAccount(String password, String email, String token){\n Connection connect = null;\n String verifyAccountSQL = \"UPDATE users SET password = ?, verification_token = null, active = 1, verified = 1, verified_on = NOW() \"+\n \"WHERE email =? AND verification_token =?\";\n\n // Verify Account Try Block:\n try{\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare Statement:\n PreparedStatement statement = connect.prepareStatement(verifyAccountSQL);\n // Set Attributes:\n statement.setString(1, password);\n statement.setString(2, email);\n statement.setString(3, token);\n\n // Execute Statement:\n int rowsAffected = statement.executeUpdate();\n\n // Check For Rows Affected:\n if(rowsAffected == 1){\n return true;\n }\n // Check For Rows Affected.\n\n }catch(SQLException e){\n e.printStackTrace();\n System.out.println(\"Failed to Verify / Update Account\");\n }\n // End Of Verify Account Try Block:\n\n return false;\n\n }", "public int getValidUserEmail(Validation v) {\r\n\r\n\t\t\r\n\t\tint a=0;\r\n\t\tString query=\"select * from user_registration where user_name='\"+v.getUsername() +\"' and email='\"+v.getEmail()+\"'\";\r\n\t\t\r\n\t\tRowMapper<Validation> rowMapper=new RowMapper<Validation>() {\r\n\r\n\t\t\tpublic Validation mapRow(ResultSet rs, int row) throws SQLException {\r\n\t\t\t\t Validation v=new Validation();\r\n\t\t\t\t v.setUsername(rs.getString(\"user_name\"));\r\n\t\t\t\t v.setPassword(rs.getString(\"email\"));\r\n\t\t\treturn v;\r\n\t\t\t}\r\n\t\t};\r\n\t\tList<Validation> list=jdbctemplate.query(query, rowMapper);\r\n\t\t a=list.size()>0?1:0; \r\n\t\treturn a;\r\n\t}", "public boolean emailpass(String email,String password)\n {\n SQLiteDatabase db=this.getReadableDatabase();\n Cursor cursor=db.rawQuery(\"select *from user where email=? and password=?\",new String[]{email,password});\n\n if (cursor.getCount()>0)\n return true;\n\n else\n return false;\n }", "public boolean userNameExists(){\r\n boolean userNameExists = false;\r\n //reads username and password\r\n String user = signup.getUsername();\r\n String pass = signup.getFirstPassword();\r\n try{\r\n //creates statement\r\n //connects to database\r\n \r\n Connection myConn = DriverManager.getConnection(Main.URL); \r\n \r\n //creates statement\r\n Statement myStmt = myConn.createStatement();\r\n System.out.println(\"statement initiated\");\r\n //SQL query\r\n ResultSet myRs = myStmt.executeQuery(\"select * from LISTOFUSERS \");\r\n System.out.println(\"query initiated\");\r\n //process result set\r\n //checks to see if the username already exists in the database\r\n while (myRs.next()){\r\n System.out.println(\"check\");\r\n if(user.equals(myRs.getString(\"USERNAME\"))){\r\n \r\n userNameExists = true;\r\n break;\r\n }\r\n }\r\n myConn.close();\r\n \r\n \r\n \r\n } catch (Exception e) \r\n {\r\n System.err.println(e.getMessage());\r\n } \r\n return userNameExists; \r\n }", "@Override\r\n\tpublic int login(String email, String password) throws SQLException {\r\n\t\tint ID = companiesDAO.isCompanyExistsInt(email, password);\r\n\t\tif (ID > 0) {\r\n\t\t\tthis.companyID = ID;\r\n\t\t\treturn companyID;\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "@When(\"A user enters a valid email address$\")\n public void check_valid_email(DataTable email) throws Throwable {\n List<List<String>> email_addresses = email.raw();\n for (List<String> element : email_addresses) {\n for (String ea : element) {\n home.submit_email(ea);\n }\n }\n }" ]
[ "0.7121761", "0.6897078", "0.6891685", "0.68101805", "0.67679894", "0.6758297", "0.67352736", "0.67248446", "0.6654367", "0.6646879", "0.6620227", "0.64715344", "0.6456636", "0.6387306", "0.6326395", "0.6253578", "0.62152946", "0.6202539", "0.61982423", "0.61935616", "0.61825174", "0.6170597", "0.61380196", "0.6105925", "0.6085515", "0.608488", "0.60767967", "0.6073037", "0.60632", "0.6040404", "0.60364115", "0.602739", "0.60261184", "0.6016247", "0.6011981", "0.6002876", "0.59918284", "0.597913", "0.5974664", "0.59730846", "0.5972551", "0.59473294", "0.59422964", "0.5941419", "0.5937111", "0.5935145", "0.592438", "0.5912332", "0.5869232", "0.5857629", "0.5856431", "0.5856431", "0.5855753", "0.58504707", "0.58305156", "0.58278906", "0.5793056", "0.578268", "0.57682085", "0.5759703", "0.5755591", "0.5705655", "0.5702914", "0.5702679", "0.5685156", "0.567378", "0.5668036", "0.5666143", "0.5655154", "0.56386876", "0.5631999", "0.56204927", "0.56196606", "0.56189233", "0.5611217", "0.55900335", "0.5589167", "0.55789816", "0.5573164", "0.55647343", "0.55615973", "0.55540866", "0.55514795", "0.55122054", "0.54910976", "0.54790956", "0.5477269", "0.5441195", "0.54270345", "0.5426087", "0.5421011", "0.54186076", "0.5418351", "0.5417264", "0.54119635", "0.5410868", "0.54032105", "0.53922266", "0.5387609", "0.5386719" ]
0.76359284
0
Created by gongkan on 2016/6/23.
public interface IOperateGame{ void initDataFinished(); void downloadingQuestion(Map<String,String> data); void startMemory(); void startRememory(); void pauseGame(); void reStartGame(); void finishGame(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void gravarBd() {\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\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public final void mo51373a() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private void init() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "public void mo38117a() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\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}", "public void mo4359a() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n public void init() {}", "@Override\n protected void init() {\n }", "private void kk12() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "private void strin() {\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void einkaufen() {\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 one() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void init() {\n\n\n\n }", "@Override\n public void initialize() { \n }", "public void mo6081a() {\n }", "private void m50366E() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "Petunia() {\r\n\t\t}", "@Override\n public void init() {\n }", "public void mo55254a() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}" ]
[ "0.61621004", "0.6044787", "0.5953795", "0.59216714", "0.5891845", "0.5891845", "0.5833709", "0.5816391", "0.577054", "0.5762345", "0.5750159", "0.5745905", "0.5731141", "0.57236534", "0.57041126", "0.5703144", "0.5687439", "0.5687439", "0.5687439", "0.5687439", "0.5687439", "0.5686985", "0.5681519", "0.5672481", "0.5658279", "0.56489336", "0.56461895", "0.5631972", "0.5629433", "0.562914", "0.56242114", "0.5619876", "0.5618994", "0.5610496", "0.5609706", "0.5605891", "0.5580034", "0.5579442", "0.5579442", "0.5579442", "0.5572536", "0.5572536", "0.557053", "0.557053", "0.5561947", "0.5561011", "0.5561011", "0.5561011", "0.555851", "0.555851", "0.55538905", "0.55538905", "0.55538905", "0.5550131", "0.55493605", "0.55493605", "0.55493605", "0.55493605", "0.55493605", "0.55493605", "0.55400735", "0.55242753", "0.5521081", "0.5514358", "0.5513348", "0.5512623", "0.550666", "0.55040145", "0.54987216", "0.5490997", "0.5490705", "0.54849076", "0.5477159", "0.5473653", "0.54632044", "0.54605645", "0.5453431", "0.5453431", "0.5453431", "0.5453431", "0.5453431", "0.5453431", "0.5453431", "0.5453074", "0.545204", "0.54515404", "0.5441575", "0.5439273", "0.54167074", "0.5411499", "0.5401229", "0.5399021", "0.5395386", "0.53784364", "0.535689", "0.53483486", "0.53396493", "0.53394437", "0.53386027", "0.53384185", "0.53384185" ]
0.0
-1
For a few arbitrary triggers, tests that when the trigger is set finished it is correctly reported as finished.
public static void verifyGetAfterSet(FinishedTriggers finishedSet) { ExecutableTriggerStateMachine trigger = ExecutableTriggerStateMachine.create( AfterAllStateMachine.of( AfterFirstStateMachine.of( AfterPaneStateMachine.elementCountAtLeast(3), AfterWatermarkStateMachine.pastEndOfWindow()), AfterAllStateMachine.of( AfterPaneStateMachine.elementCountAtLeast(10), AfterProcessingTimeStateMachine.pastFirstElementInPane()))); verifyGetAfterSet(finishedSet, trigger); verifyGetAfterSet(finishedSet, trigger.subTriggers().get(0).subTriggers().get(1)); verifyGetAfterSet(finishedSet, trigger.subTriggers().get(0)); verifyGetAfterSet(finishedSet, trigger.subTriggers().get(1)); verifyGetAfterSet(finishedSet, trigger.subTriggers().get(1).subTriggers().get(1)); verifyGetAfterSet(finishedSet, trigger.subTriggers().get(1).subTriggers().get(0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(groups={\"broken\"})\n\tpublic void triggerCompleteDeletesJob() throws SchedulerException,\n\t\t\tInterruptedException {\n\n\t\tScheduler sched = null;\n\t\ttry {\n\t\t\t\n\t\t\tSchedulerFactory schedFact = new org.quartz.impl.StdSchedulerFactory(); \n\t\t\tsched = schedFact.getScheduler(); \n\t\t\t\n//\t\t\tsched.getListenerManager().addTriggerListener(\n//\t new TriggerListener() {\n//\n//\t @Override\n//\t public String getName() {\n//\t return \"Unit Test Trigger Listener\";\n//\t }\n//\n//\t\t\t\t\t\t@Override\n//\t\t\t\t\t\tpublic void triggerFired(Trigger trigger,\n//\t\t\t\t\t\t\t\tJobExecutionContext context) {\n//\t\t\t\t\t\t\tlog.debug(\"working on a new job\"); \n//\t\t\t\t\t\t}\n//\n//\t\t\t\t\t\t@Override\n//\t\t\t\t\t\tpublic boolean vetoJobExecution(Trigger trigger,\n//\t\t\t\t\t\t\t\tJobExecutionContext context) {\n//\t\t\t\t\t\t\treturn false;\n//\t\t\t\t\t\t}\n//\n//\t\t\t\t\t\t@Override\n//\t\t\t\t\t\tpublic void triggerMisfired(Trigger trigger) {\n//\t\t\t\t\t\t\tlog.debug(\"ignoring misfire event\"); \n//\t\t\t\t\t\t}\n//\n//\t\t\t\t\t\t@Override\n//\t\t\t\t\t\tpublic void triggerComplete(\n//\t\t\t\t\t\t\t\tTrigger trigger,\n//\t\t\t\t\t\t\t\tJobExecutionContext context,\n//\t\t\t\t\t\t\t\tCompletedExecutionInstruction triggerInstructionCode) {\n//\t\t\t\t\t\t\tjobFinished.set(true);\n//\t\t\t\t\t\t}\n//\t \n//\t }, EverythingMatcher.allTriggers()\n//\t );\n//\t\t\t\n//\t\t\tsched.getListenerManager().addJobListener(\n//\t\t\t\t\tnew AgaveJobCleanupListener(), EverythingMatcher.allJobs());\n//\t\t\t\n//\t\t\t\n\t\t\tString jobUuid = \"12345\";\n\n\t\t\tJobDetail jobDetail = org.quartz.JobBuilder.newJob(StagingWatch.class)\n\t\t\t\t\t.usingJobData(\"uuid\", jobUuid)\n\t\t\t\t\t.withIdentity(jobUuid, \"demoWorkers\")\n\t\t\t\t\t.build();\n\n\t\t\tSimpleTrigger trigger = (SimpleTrigger) newTrigger()\n\t\t\t\t\t.withIdentity(jobUuid, \"demoWorkers\")\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tsched.scheduleJob(jobDetail, trigger);\n\t\t\tsched.start();\n\t\t\t\n\t\t\tThread.sleep(3000);\n\t\t\t\n//\t\t\tString summary = null;\n//\t\t\twhile (sched.getMetaData().getNumberOfJobsExecuted() == 0) {\n//\t\t\t\tif (!StringUtils.equals(summary, sched.getMetaData().getSummary())) {\n//\t\t\t\t\tSystem.out.println(sched.getMetaData().getSummary());\n//\t\t\t\t\tsummary = sched.getMetaData().getSummary();\n//\t\t\t\t}\n//\t\t\t\t//System.out.println(sched.getJobDetail(jobDetail.getKey()));\n//\t\t\t};\n\t\t\t\n\t\t\tAssert.assertEquals(sched.getMetaData().getNumberOfJobsExecuted(), 1,\n\t\t\t\t\t\"Incorrect number of jobs executed.\");\n\n\t\t\tAssert.assertFalse(sched.checkExists(jobDetail.getKey()),\n\t\t\t\t\t\"Job should be deleted immediately after it fires.\");\n\n\t\t\tAssert.assertFalse(sched.checkExists(trigger.getKey()),\n\t\t\t\t\t\"Trigger should be deleted immediately after it fires.\");\n\t\t} finally {\n\t\t\tif (sched != null) {\n\t\t\t\ttry {\n\t\t\t\t\tsched.clear();\n\t\t\t\t\tsched.shutdown(false);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\n\t\t\t\t\t\t\t\"Failed to shtudown and clear scheduler after test.\",\n\t\t\t\t\t\t\te);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "void subscribeDoneTrigger()\r\n\t{\r\n\t\tsubscribeTrigger( TriggerQueue.DONE_TRIGGER_TEXT,\r\n\t\t\tfTriggerQueue\r\n\t\t\t);\r\n\t}", "@Test\n\tpublic void testIsOperationFinished_1()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tString aOperationID = \"\";\n\n\t\tboolean result = fixture.isOperationFinished(aOperationID);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "void completed(TestResult tr);", "@Test\n\tpublic void testIsOperationFinished_2()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tString aOperationID = \"\";\n\n\t\tboolean result = fixture.isOperationFinished(aOperationID);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Override\n\tpublic void isFinish() {\n\n\t}", "@Override\n\tpublic boolean isFinished() {\n\t\treturn true;\n\t}", "public boolean isFinished();", "protected void testsCompleted() {\n\t\tjavaCallback();\n\n\t\tfor (TestOutcome outcome : getTestOutcomeCollection()) {\n\t\t\tgetLog().debug(\"outcome: \" + outcome.toConciseString());\n\t\t}\n\n\t\tgetLog().info(\n\t\t\t\t\"All tests completed for submission \"\n\t\t\t\t\t\t+ projectSubmission.getSubmissionPK()\n\t\t\t\t\t\t+ \" for test setup \"\n\t\t\t\t\t\t+ projectSubmission.getTestSetupPK() + \": \"\n\t\t\t\t\t\t+ getTestOutcomeCollection().getAllOutcomes().size()\n\t\t\t\t\t\t+ \" outcomes recorded, \"\n\t\t\t\t\t\t+ getTestOutcomeCollection().getNumPassedOverall()\n\t\t\t\t\t\t+ \" passed, \"\n\t\t\t\t\t\t+ getTestOutcomeCollection().getNumFailedOverall()\n\t\t\t\t\t\t+ \" failed\");\n\t}", "private void handleGoalFinishedEvent() {\n Collection<RGoal> agentActiveGoals = internalFeature.getCapability().getGoals();\n\n // Iterate goal instances stored in my active goal map to find if we have record of goal which is no longer active\n for (String myActiveGoalKey : myActiveGoals.keySet()) {\n\n boolean isStillActive = false;\n\n // Iterate currently active access goals\n for (IGoal goal : agentActiveGoals) {\n\n // If goal instance stored in my active goal map is still currently active access goal break and continue\n // with testing next goal instance stored in my active goal map\n if (myActiveGoalKey.equals(goal.toString())) {\n isStillActive = true;\n break;\n }\n }\n\n // If goal instance stored in my active goal map is no longer currently active access goal fire goal finished emotional event\n if (!isStillActive) {\n\n IGoal goal = myActiveGoals.get(myActiveGoalKey);\n\n // Remove no longer active goal instance from my active goal map to avoid multiple goal finished events for one goal instance\n myActiveGoals.remove(myActiveGoalKey);\n\n // Get objectValue\n String elementName = goal.getModelElement().getDescription();\n Element element = engine.getElement(elementName, R.GOAL);\n\n // Create emotional event\n EmotionalEvent emotionalEvent = new EmotionalEvent();\n\n // Get goal result for emotional event processing\n int goalResult;\n if (goal.isSucceeded()) {\n goalResult = R.RESULT_SUCCESS;\n } else {\n goalResult = R.RESULT_FAILURE;\n }\n\n // Set emotional event values\n emotionalEvent.setElementName(elementName);\n emotionalEvent.setEventType(R.EVT_GOAL_FINISHED);\n emotionalEvent.setResultType(goalResult);\n emotionalEvent.setUserParameters(params.getGoalUserParameterValues((RGoal) goal, JBDIEmo.UserGoalParams\n .get(engine.getAgentName()).get(elementName).value()));\n emotionalEvent.setSystemParameters(params.getSystemParameterValues(element));\n\n // Fire emotional event\n element.processEmotionalEvent(emotionalEvent);\n }\n }\n }", "boolean hasFinished();", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}", "@Test\n\tpublic void testAgentLogsFinal() {\n\t\tReporter reporter = mock(Reporter.class);\n\t\tparty = new ShineParty(reporter);\n\t\tparty.connect(connection);\n\t\tparty.notifyChange(settings);\n\t\tparty.notifyChange(new Finished(null));\n\n\t\tverify(reporter).log(eq(Level.INFO),\n\t\t\t\teq(\"Final ourcome:Finished[null]\"));\n\t}", "@Test\n void markCompleted() {\n }", "public abstract boolean isFinished ();", "@Override\n public boolean isFinished() {\n return true;\n }", "public abstract boolean isCompleted();", "@Override\n public boolean isFinished() {\n return true;\n }", "Boolean isFinished();", "public void testComplete(String msg);", "@Test\n void setCompleted() {\n }", "void isFinished();", "boolean isFinished();", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "@Override\n public boolean isCompleted() {\n return time.secondsPassed==finishLevel;\n }", "@Override\n\tpublic boolean isCompleted()\n\t{\n\t\treturn false;\n\t}", "public boolean isDone() { return true; }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "public void allFinished() {\n\t}", "protected boolean isFinished(){\r\n return true;\r\n }", "boolean isCompleted();", "@Override\n\tprotected boolean isFinished() {\n\t\treturn done; \n\t}", "boolean getFinished();", "protected boolean isFinished()\n\t{\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t\t//return timeOnTarget >= finishTime;\n }", "@Test(expected = java.rmi.RemoteException.class)\n\tpublic void testIsOperationFinished_3()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tString aOperationID = \"\";\n\n\t\tboolean result = fixture.isOperationFinished(aOperationID);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public static void endStep() {\n\t\tTestNotify.log(GenLogTC() + \"has been tested.\");\n\t}", "public boolean isFinished() {\n return true;\n }", "@Override\n public boolean isFinished() {\n return complete;\n }", "protected boolean isFinished() {\n long tEnd = System.currentTimeMillis();\n long tDelta = tEnd - tStart;\n double elapsedSeconds = tDelta / 1000.0;\n if (elapsedSeconds > 0.2) {\n \t System.out.println(\"End Fire\");\n \t return true;\n }\n else if(elapsedSeconds > 0.15) {\n \t System.out.println(\"end Fire\");\n Robot.m_Cannon.set(-1);\n }\n else if(elapsedSeconds > 0.05) {\n \t System.out.println(\"mid Fire\");\n Robot.m_Cannon.stop();\n }\n return false;\n }", "public void markAsDone() {\n // TODO consider adding assertion here\n isDone = true;\n }", "@Override\n\tprotected boolean isFinished() {\n\t\treturn isFin;\n\t}", "@Override\r\n\tpublic boolean isFinished() {\n\t\treturn finish;\r\n\t}", "public boolean isDone();", "public boolean isDone();", "@Test(expected = org.apache.axis.NoEndPointException.class)\n\tpublic void testIsOperationFinished_6()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub((URL) null, new DeployWSServiceLocator());\n\t\tString aOperationID = \"\";\n\n\t\tboolean result = fixture.isOperationFinished(aOperationID);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "boolean completed();", "@Override\n public boolean isFinished() {\n return isDone;\n }", "@Override\n public boolean isFinished() {\n return isDone;\n }", "public boolean isFinished(){\n return true;\n }", "protected boolean isFinished() {\n \t//ends \n \treturn isTimedOut();\n }", "@Override\n protected boolean isFinished() {\n return true;\n }", "public final boolean isFinished() {\n \t\tfor (StoppingCondition condition : stoppingConditions) {\n \t\t\tif (condition.isCompleted()) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}", "@Override\n\tpublic boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "void whenComplete();", "@Override\n public boolean isFinished() {\n return System.currentTimeMillis() >= endtime;\n }", "@Test\n void isComplete() {\n }", "public void junitEnded() { }", "public void junitEnded() { }", "protected boolean isFinished() {\n return m_onTarget;\n }", "@Override\n\tpublic boolean isFinished() {\n\t\treturn false;\n\t}", "public boolean isComplete();", "@Override\n protected boolean isFinished() {\n return true;\n }", "@Override\n\t\tpublic boolean isFinished() {\n\t\t\treturn false;\n\t\t}", "boolean isComplete();", "boolean isComplete();", "boolean experimentCompleted();", "public void finishTest() {\r\n\t\tlatch.countDown();\r\n\t}", "public boolean is_completed();", "@Override\n protected boolean isFinished() {\n return Timer.getFPGATimestamp()-startT >= 1.5;\n }", "protected boolean isFinished() {\n\n \tif(weAreDoneSenor == true) {\n\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n \t\n }", "@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testIsOperationFinished_4()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tString aOperationID = \"\";\n\n\t\tboolean result = fixture.isOperationFinished(aOperationID);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public boolean finished();", "boolean complete();", "protected boolean isFinished() {\r\n\t \treturn (timeSinceInitialized() > .25) && (Math.abs(RobotMap.armarm_talon.getClosedLoopError()) < ARM_END_COMMAND_DIFFERENCE_VALUE); //TODO:\r\n\t }", "@Test(timeout = 10000)\n public void testTaskAttemptFinishedEvent() throws Exception {\n JobID jid = new JobID(\"001\", 1);\n TaskID tid = new TaskID(jid, TaskType.REDUCE, 2);\n TaskAttemptID taskAttemptId = new TaskAttemptID(tid, 3);\n Counters counters = new Counters();\n TaskAttemptFinishedEvent test = new TaskAttemptFinishedEvent(taskAttemptId, TaskType.REDUCE, \"TEST\", 123L, \"RAKNAME\", \"HOSTNAME\", \"STATUS\", counters, 234);\n Assert.assertEquals(test.getAttemptId().toString(), taskAttemptId.toString());\n Assert.assertEquals(test.getCounters(), counters);\n Assert.assertEquals(test.getFinishTime(), 123L);\n Assert.assertEquals(test.getHostname(), \"HOSTNAME\");\n Assert.assertEquals(test.getRackName(), \"RAKNAME\");\n Assert.assertEquals(test.getState(), \"STATUS\");\n Assert.assertEquals(test.getTaskId(), tid);\n Assert.assertEquals(test.getTaskStatus(), \"TEST\");\n Assert.assertEquals(test.getTaskType(), REDUCE);\n Assert.assertEquals(234, test.getStartTime());\n }", "public static void verifyClearRecursively(FinishedTriggers finishedSet) {\n ExecutableTriggerStateMachine trigger =\n ExecutableTriggerStateMachine.create(\n AfterAllStateMachine.of(\n AfterFirstStateMachine.of(\n AfterPaneStateMachine.elementCountAtLeast(3),\n AfterWatermarkStateMachine.pastEndOfWindow()),\n AfterAllStateMachine.of(\n AfterPaneStateMachine.elementCountAtLeast(10),\n AfterProcessingTimeStateMachine.pastFirstElementInPane())));\n\n // Set them all finished. This method is not on a trigger as it makes no sense outside tests.\n setFinishedRecursively(finishedSet, trigger);\n assertTrue(finishedSet.isFinished(trigger));\n assertTrue(finishedSet.isFinished(trigger.subTriggers().get(0)));\n assertTrue(finishedSet.isFinished(trigger.subTriggers().get(0).subTriggers().get(0)));\n assertTrue(finishedSet.isFinished(trigger.subTriggers().get(0).subTriggers().get(1)));\n\n // Clear just the second AfterAll\n finishedSet.clearRecursively(trigger.subTriggers().get(1));\n\n // Check that the first and all that are still finished\n assertTrue(finishedSet.isFinished(trigger));\n verifyFinishedRecursively(finishedSet, trigger.subTriggers().get(0));\n verifyUnfinishedRecursively(finishedSet, trigger.subTriggers().get(1));\n }", "@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testIsOperationFinished_5()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tString aOperationID = \"\";\n\n\t\tboolean result = fixture.isOperationFinished(aOperationID);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public boolean exchangeFinishedSuccessfully() {\n\t\treturn isExchangeCompleteCondition();\n\t}", "private void handlePlanFinishedEvent() {\n for (String myActivePlanKey : myActivePlans.keySet()) {\n\n boolean isStillActive = false;\n\n // Iterate currently active access plans\n for (RPlan plan : internalFeature.getCapability().getPlans()) {\n // If plan instance stored in my active plan map is still currently active access plan break and continue\n // with testing next plan instance stored in my active plan map\n if (myActivePlanKey.equals(plan.toString()) ^ isPlanFinished(plan)) {\n isStillActive = true;\n break;\n }\n }\n\n // If plan instance stored in my active plan map is no longer currently active access plan fire plan finished emotional event\n if (!isStillActive) {\n\n Object[] planObject = myActivePlans.get(myActivePlanKey);\n RPlan plan = (RPlan) planObject[0];\n String reason = (String) planObject[1];\n\n // Remove no longer active plan instance from my active plan map to avoid multiple plan finished events for one plan instance\n myActivePlans.remove(myActivePlanKey);\n\n // Get objectValue\n String elementName = plan.getModelElement().getDescription();\n Element element = engine.getElement(elementName, R.PLAN);\n\n // Create emotional event\n EmotionalEvent emotionalEvent = new EmotionalEvent();\n\n // Get plan result\n int planResult;\n if (plan.getLifecycleState().equals(RPlan.PlanLifecycleState.PASSED)) {\n planResult = R.RESULT_SUCCESS;\n } else {\n planResult = R.RESULT_FAILURE;\n }\n\n // Add system parameters needed for plan, goal emotions (unique for plan finished event)\n Map<Integer, Double> systemParams = params.getSystemParameterValues(element);\n params.addSystemParameterValuesForGoalPlanEmotions(engine, systemParams, reason);\n\n // Set emotional event values\n emotionalEvent.setElementName(elementName);\n emotionalEvent.setEventType(R.EVT_PLAN_FINISHED);\n emotionalEvent.setResultType(planResult);\n emotionalEvent.setUserParameters(params.getUserParameterValues(plan, JBDIEmo.UserPlanParams.get(engine.getAgentName())\n .get(plan.getModelElement().getDescription()).value()));\n emotionalEvent.setSystemParameters(systemParams);\n\n // Fire emotional event\n element.processEmotionalEvent(emotionalEvent);\n\n // Send emotional message\n messageCenter.sendEmotionalMessage(elementName, R.EVT_PLAN_FINISHED, planResult);\n }\n }\n }", "public abstract boolean isComplete();", "@Override\n\tpublic boolean isFinished() {\n\t\treturn finished;\n\t}", "@Override\n\tprotected boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "boolean isDone();", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}" ]
[ "0.6595712", "0.641805", "0.61567307", "0.613408", "0.61088616", "0.5982275", "0.59570706", "0.5951375", "0.5942651", "0.59212154", "0.59068865", "0.58961576", "0.58961576", "0.5879348", "0.5877272", "0.5874737", "0.5854026", "0.5851759", "0.5833708", "0.583299", "0.58274496", "0.582245", "0.5816228", "0.58123153", "0.5807192", "0.5807192", "0.5807192", "0.58028173", "0.5801504", "0.580108", "0.5789351", "0.5789351", "0.5789351", "0.5789351", "0.5789351", "0.5789351", "0.57805985", "0.57715565", "0.577039", "0.57688385", "0.57635725", "0.57603997", "0.5758397", "0.5755786", "0.5748366", "0.57355344", "0.57343787", "0.5732784", "0.5713881", "0.57133234", "0.5711335", "0.5704786", "0.5704786", "0.5696772", "0.56943405", "0.56817484", "0.56817484", "0.56788296", "0.56778735", "0.56777626", "0.56729555", "0.5666937", "0.5665449", "0.5650181", "0.56443053", "0.56425875", "0.56425875", "0.5636286", "0.56346405", "0.56314504", "0.5629589", "0.56281847", "0.5624852", "0.5624852", "0.5623744", "0.5618011", "0.5602899", "0.5596914", "0.55947083", "0.5585358", "0.55848527", "0.5578738", "0.5578706", "0.5578015", "0.55778337", "0.5569509", "0.5562966", "0.55622673", "0.55458826", "0.5539107", "0.5538219", "0.55315334", "0.5527764", "0.5527764", "0.5527764", "0.5527764", "0.5527764", "0.5527764", "0.5527764", "0.5527764" ]
0.60146236
5
Tests that clearing a trigger recursively clears all of that triggers subTriggers, but no others.
public static void verifyClearRecursively(FinishedTriggers finishedSet) { ExecutableTriggerStateMachine trigger = ExecutableTriggerStateMachine.create( AfterAllStateMachine.of( AfterFirstStateMachine.of( AfterPaneStateMachine.elementCountAtLeast(3), AfterWatermarkStateMachine.pastEndOfWindow()), AfterAllStateMachine.of( AfterPaneStateMachine.elementCountAtLeast(10), AfterProcessingTimeStateMachine.pastFirstElementInPane()))); // Set them all finished. This method is not on a trigger as it makes no sense outside tests. setFinishedRecursively(finishedSet, trigger); assertTrue(finishedSet.isFinished(trigger)); assertTrue(finishedSet.isFinished(trigger.subTriggers().get(0))); assertTrue(finishedSet.isFinished(trigger.subTriggers().get(0).subTriggers().get(0))); assertTrue(finishedSet.isFinished(trigger.subTriggers().get(0).subTriggers().get(1))); // Clear just the second AfterAll finishedSet.clearRecursively(trigger.subTriggers().get(1)); // Check that the first and all that are still finished assertTrue(finishedSet.isFinished(trigger)); verifyFinishedRecursively(finishedSet, trigger.subTriggers().get(0)); verifyUnfinishedRecursively(finishedSet, trigger.subTriggers().get(1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clear() {\n\t\t// If settingActive is true, clear will be called for all children anyway. No need to loop.\n\t\tif (children != null) {\n\t\t\tfor (BusinessObject child : children.values()) {\n\t\t\t\tchild.clear();\n\t\t\t}\n\t\t}\n\t}", "public Builder clearRecursive() {\n if (recursiveBuilder_ == null) {\n recursive_ = null;\n onChanged();\n } else {\n recursive_ = null;\n recursiveBuilder_ = null;\n }\n\n return this;\n }", "@Test\r\n public void clearEmpty() throws Exception {\r\n TreeSet<String> check = new TreeSet<>();\r\n check.clear();\r\n assertTrue(check.isEmpty());\r\n }", "public void clear() {\n tree.clear();\n }", "public void testNormalClearIsEmpty()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkClearMap(pmf,\r\n HashMap1.class,\r\n ContainerItem.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }", "public ClearTriggerResponse clearTrigger(ClearTriggerRequest request) throws GPUdbException {\n ClearTriggerResponse actualResponse_ = new ClearTriggerResponse();\n submitRequest(\"/clear/trigger\", request, actualResponse_, false);\n return actualResponse_;\n }", "@Test\n public void testClearOnEmpty() {\n this.iPQ.clear();\n assertTrue(\"Clear on empty is empty: \",\n this.iPQ.isEmpty());\n this.sPQ.clear();\n assertTrue(\"Clear on empty is empty: \",\n this.sPQ.isEmpty());\n }", "public void testClear() {\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.clear();\n assertEquals(this.stack.size(), 0, 0.01);\n Exception exception = null;\n try {\n this.empty.pop();\n }\n catch (Exception e) {\n exception = e;\n }\n assertNotNull(exception);\n assertTrue(exception instanceof EmptyStackException);\n }", "public org.apache.gora.cascading.test.storage.TestRow.Builder clearUnionRecursive() {\n unionRecursive = null;\n fieldSetFlags()[3] = false;\n return this;\n }", "public void clear()\n\t{\n\t\tthis.getChildren().clear();\n\t}", "private void clearSubframes() {\n subframes_ = emptyProtobufList();\n }", "public void clearSubbedTiles() { subbedTiles.clear(); }", "@ThreadConfined(type = ThreadConfined.ThreadType.JFX)\n void reset() {\n rootEventStripes.clear();\n nestedEvents.clear();\n }", "@Test\n public void testClear() {\n System.out.println(\"clear\");\n instance = new Stack();\n instance.push(30);\n instance.push(40);\n instance.push(50);\n instance.clear();\n assertTrue(instance.isEmpty());\n for (int i = 0; i < 10; i++) {\n instance.push(i);\n }\n instance.clear();\n assertTrue(instance.isEmpty());\n }", "public void clear()\n\t\t{ while (!children.isEmpty()) remove(children.get(0)); }", "@Override\n public void clear() {\n root = null;\n }", "public void makeEmpty(){\n deleteAll(root);\n root = null;\n numItems = 0;\n }", "public void testInverseClearIsEmpty()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkClearMap(pmf,\r\n HashMap2.class,\r\n HashMap2Item.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap2.class);\r\n clean(HashMap2Item.class);\r\n }\r\n }", "public Builder clearRecursiveNull() {\n \n recursiveNull_ = false;\n onChanged();\n return this;\n }", "public void clear() {\n root = null;\n }", "public void clear() {\n root = null;\n }", "public void makeEmpty() {\r\n\t\troot = null;\r\n\t\tleftChild = null;\r\n\t\trightChild= null;\r\n\t}", "@Test\n public void testClearingStats() {\n innerClear();\n innerClear();\n }", "@Override\r\n public void clear(){\r\n root = null;\r\n }", "private void clearUpdateTriggerTime() {\n bitField0_ = (bitField0_ & ~0x00000002);\n updateTriggerTime_ = 0;\n }", "public void clear() {\n\t\troot = null;\n\t\tcount = 0;\n\t}", "public static void reset() {\n parentNameToBlockStubs.clear();\n parentNameToParentBlocks.clear();\n }", "public void clearChildren() {\r\n this.children = null;\r\n }", "public void clear(){\n root = null;\n count = 0;\n }", "public void clear() {\n count = 0;\n root = null;\n }", "public void clearSubtree(int position) {\n currentBracket.resetSubtree(position);\n }", "public void clear() {\n\t\troot.left = null;\n\t\troot.right = null;\n\t\troot = null;\n\t\tsize = 0;\n\t}", "@Test\n public void clearAll() {\n TestEvent[] currentEventList = te.getTypicalEvents();\n TestEvent[] filteredEventList = TestUtil.getFilteredTestEvents(currentEventList);\n TestTask[] currentTaskList = tt.getTypicalTasks();\n TestTask[] filteredTaskList = TestUtil.getFilteredTestTasks(currentTaskList);\n assertTrue(eventListPanel.isListMatching(filteredEventList));\n assertTrue(taskListPanel.isListMatching(filteredTaskList));\n assertClearAllCommandSuccess();\n\n //verify other commands can work after a clear command\n //verify add and delete event works after a clear command\n currentEventList = TestUtil.removeEventsFromList(currentEventList, currentEventList);\n TestEvent eventToAdd = te.workshop;\n currentEventList = TestUtil.addEventsToList(currentEventList, eventToAdd);\n filteredEventList = TestUtil.getFilteredTestEvents(currentEventList);\n commandBox.runCommand(eventToAdd.getAddCommand());\n assertTrue(eventListPanel.isListMatching(filteredEventList));\n commandBox.runCommand(\"delete ev 1\");\n assertEventListSize(0);\n\n //verify add and delete task works after a clear command\n currentTaskList = TestUtil.removeTasksFromList(currentTaskList, currentTaskList);\n TestTask taskToAdd = tt.homework;\n currentTaskList = TestUtil.addTasksToList(currentTaskList, taskToAdd);\n filteredTaskList = TestUtil.getFilteredTestTasks(currentTaskList);\n commandBox.runCommand(taskToAdd.getAddCommand());\n assertTrue(taskListPanel.isListMatching(filteredTaskList));\n commandBox.runCommand(\"delete ts 1\");\n assertTaskListSize(0);\n\n //invalid command\n commandBox.runCommand(\"clear all\");\n assertResultMessage(\"Invalid command format! \\n\" + ClearCommand.MESSAGE_USAGE);\n\n //verify clear command works when the list is empty\n assertClearAllCommandSuccess();\n }", "public com.autodesk.ws.avro.Call.Builder clearSuboperation() {\n suboperation = null;\n fieldSetFlags()[4] = false;\n return this;\n }", "@Override\n\tpublic void clear() {\n\t\tsize = 0;\n\t\troot = null;\n\t}", "void clearIsChanged();", "public void clear(){\n this.clearing = true;\n }", "public void makeEmpty() {\r\n\t\troot = null;\r\n\t}", "void clear() {\n stacks.clear();\n }", "public void clear() {\r\n\t\troot = null;\r\n\t\tsize = 0;\r\n\t}", "public void clear(){\n\t\tclear(0);\n\t}", "public void makeEmpty() {\n\t\troot = null;\n\t}", "public void clear() {\n doClear( false );\n }", "public static void cleanTree(final RainfallTool tool) {\n\t\tTree tree = null;\n\t\tTreeItem root = tree.getRootItem();\n\t\tfor (int i = 0 ; i < root.getItemCount() ; i++) {\n\t\t\tTreeItem item = root.getItem(i); \n\t\t\tif (item.isChecked())\n\t\t\t\titem.setChecked(false);\n\t\t\tfor (int j = 0 ; j < item.getItemCount() ; j++) {\n\t\t\t\tTreeItem subItem = item.getItem(j);\n\t\t\t\tif (subItem.isChecked())\n\t\t\t\t\tsubItem.setChecked(false);\n\t\t\t}\n\t\t}\n\t}", "public void clearAll();", "public void clearAll();", "public void clearChildren() {\n internalGroup.clearChildren();\n }", "public void makeEmpty() {\n root = null;\n }", "private void clear() {\n transactionalHooks.clearTransaction();\n transactionDeques.remove();\n }", "@Test\n\tpublic void testRedoAction_ClearStack() {\n\n\n\t\t//Add the new cell to the undo stack to simulate what\n\t\t//occurs during cell editing. Every change must be recorded so it can be undone and redone\n\t\tundoRedo_TestStack.noUndoRedoAction(testGrid.selectCell(\"A\",5));\n\t\t//Update cell values, simulating user manual input\n\t\ttestGrid.selectCell(\"A\",5).setValue(\"88\");\n\n\t\t//Add the new cell to the undo stack to simulate what\n\t\t//occurs during cell editing. Every change must be recorded so it can be undone and redone\n\t\tundoRedo_TestStack.noUndoRedoAction(testGrid.selectCell(\"E\",8));\n\t\t//Update cell value, simulating user manual input\n\t\ttestGrid.selectCell(\"E\",8).setValue(\"99\");\n\n\n\t\t//Simulate the undo action and keep that info\n\t\tCell result2_undo = undoRedo_TestStack.undoAction(testGrid);\n\t\ttestGrid.selectCell(result2_undo.getCol(), result2_undo.getRow()).setValue(result2_undo.getValue());\n\t\ttestGrid.selectCell(result2_undo.getCol(), result2_undo.getRow()).setCellFormat(result2_undo.getCellFormat());\n\n\t\tCell result1_undo = undoRedo_TestStack.undoAction(testGrid);\n\t\ttestGrid.selectCell(result1_undo.getCol(), result1_undo.getRow()).setValue(result1_undo.getValue());\n\t\ttestGrid.selectCell(result1_undo.getCol(), result1_undo.getRow()).setCellFormat(result1_undo.getCellFormat());\n\n\t\t//Interrupt the undo actions by simulating cell editing\n\t\tundoRedo_TestStack.noUndoRedoAction(testGrid.selectCell(\"C\",13));\n\t\t//Update cell value, simulating user manual input\n\t\ttestGrid.selectCell(\"C\",13).setValue(\"77\");\n\n\t\t//The interrupted undo actions should cause the redo stack to be empty. Keep that info to test it.\n\t\tCell emptyRedoStackCell = undoRedo_TestStack.redoAction(testGrid);\n\n\t\t//Check that the undo stack is indeed empty\n\t\tassertEquals(-1, emptyRedoStackCell.getRow());\n\t\tassertEquals(\"-1\", emptyRedoStackCell.getCol());\n\t\tassertEquals(\"0\", emptyRedoStackCell.getValue());\n\n\t}", "public void ClearAll()\r\n {\r\n balls.clear();\r\n board.SetMissedBall(0);\r\n }", "private void clearNonUsedQuadruples() {\n expandedQuadruples.removeIf(expandedQuadruple -> expandedQuadruple.getLevel() != 0);\n }", "@Override\n\tpublic void clearAll() {\n\t\t\n\t}", "public void makeEmpty( )\n {\n doClear( );\n }", "@Override\n public void clear() {\n root = null;\n size = 0;\n }", "@Override\n public void clear() {\n root = null;\n size = 0;\n }", "@Override\n public void clear() {\n root = null;\n size = 0;\n }", "public void clear() {\n root = null;\n size = 0;\n }", "public void clear() {\n root = null;\n size = 0;\n }", "public void clear() {\n for(;topIndex > -1;topIndex--)\n stack[topIndex] = null;\n }", "public void clear(){\r\n \t\tcollapsingList.clear();\r\n \t}", "public void clear() throws ChangeVetoException;", "public void clear() {\n doClear();\n }", "public void makeEmpty( )\r\n\t{\r\n\t\troot = null;\r\n\t}", "public void clear() {\n\t\tleftIndex = 0;\n\t\trightIndex = 0;\n\t}", "public void clear() {\n lists = new TernarySearchTree<>();\n }", "protected abstract void clearAll();", "@Override\n public void clear() {\n size = 0;\n root = null;\n }", "@Test\n public void normal_recursive_delete_OData_collection() {\n String collectionName = \"deleteOdata\";\n String entityType = \"deleteEntType\";\n String accept = \"application/xml\";\n String complexTypeName = \"deleteComplexType\";\n String complexTypePropertyName = \"deleteComplexTypeProperty\";\n\n try {\n // Create collection.\n DavResourceUtils.createODataCollection(TOKEN, HttpStatus.SC_CREATED, Setup.TEST_CELL1, Setup.TEST_BOX1,\n collectionName);\n // Create entity type.\n Http.request(\"box/entitySet-post.txt\")\n .with(\"cellPath\", Setup.TEST_CELL1)\n .with(\"boxPath\", Setup.TEST_BOX1)\n .with(\"odataSvcPath\", collectionName)\n .with(\"token\", \"Bearer \" + TOKEN)\n .with(\"accept\", accept)\n .with(\"Name\", entityType)\n .returns()\n .statusCode(HttpStatus.SC_CREATED);\n // Create complex type.\n ComplexTypeUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1,\n collectionName, complexTypeName, HttpStatus.SC_CREATED);\n // Create complex type property.\n ComplexTypePropertyUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1, collectionName, complexTypePropertyName,\n complexTypeName, \"Edm.String\", HttpStatus.SC_CREATED);\n\n // Recursive delete collection.\n deleteRecursive(collectionName, \"true\", HttpStatus.SC_NO_CONTENT);\n } finally {\n deleteRecursive(collectionName, \"true\", -1);\n }\n }", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "public void clearActions() {\n internalGroup.clearActions();\n }", "@Test\n public void testDeleteNodeIfNoChildren_hasNoChildrenShouldDelete() throws Exception {\n final String basePath = \"/testDeleteNodeIfNoChildren_hasNoChildrenShouldDelete\";\n\n try (final CuratorFramework curator = createCurator()) {\n // Create basePath\n curator\n .create()\n .creatingParentsIfNeeded()\n .forPath(basePath);\n\n // Now create our helper\n final CuratorHelper curatorHelper = new CuratorHelper(curator, new HashMap<>());\n\n // Call our method\n curatorHelper.deleteNodeIfNoChildren(basePath);\n\n // Validate is gone\n final Stat result = curator\n .checkExists()\n .forPath(basePath);\n assertNull(result, \"base path should be removed\");\n }\n }", "public void makeEmpty()\n {\n root = nil;\n }", "public void clear() {\n allDependenciesModificationStamp = -2;\n }", "public synchronized void clear()\n {\n clear(false);\n }", "@Test\r\n public void clear() throws Exception {\r\n TreeSet<String> check = new TreeSet<>();\r\n check.addAll(sStr);\r\n check.clear();\r\n assertTrue(check.isEmpty());\r\n }", "private void clearField () {\n\t\t/* clear the field */\n\t\tfor ( int row = 0 ; row < getNumRows() ; row++ ) {\n\t\t\tfor ( int col = 0 ; col < getNumCols() ; col++ ) {\n\t\t\t\tif ( row == 0 || col == 0 || row == getNumRows() - 1\n\t\t\t\t || col == getNumCols() - 1 ) {\n\t\t\t\t\tfield_[row][col] = new Bush();\n\t\t\t\t} else {\n\t\t\t\t\tfield_[row][col] = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void clearAll();", "void clearAll();", "public void clear() throws Exception;", "@Test\r\n\tvoid testClear() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\tlist.insert(toDoItem1);\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem3);\r\n\t\tlist.insert(toDoItem4);\r\n\r\n\t\tlist.clear();\r\n\t\tif (list.getSize() != 0 || list.getHead() != null || list.getTail() != null) {\r\n\t\t\tfail(\"Clear failed\");\r\n\t\t}\r\n\t}", "public void clearAllSquares()\n\t{\n\t\t/* loop through all rows and columns and remove all the highlighting */\n\t\tfor (int i = 0; i < m_rows; i++) {\n\t\t\tfor (int j = 0; j < m_cols; j++) {\n\t\t\t\tclearSquare(i, j);\n\t\t\t}\n\t\t}\n\t}", "private void clear() {\n }", "@Override\r\n public void clearToggledPaths(){\r\n super.clearToggledPaths();\r\n }", "public Builder clearRecursionDepth() {\n bitField0_ = (bitField0_ & ~0x00000008);\n recursionDepth_ = 0;\n onChanged();\n return this;\n }", "public final void clear() {\n clear(true);\n }", "public Builder clearBasis() {\n if (basisBuilder_ == null) {\n basis_ = null;\n onChanged();\n } else {\n basis_ = null;\n basisBuilder_ = null;\n }\n\n return this;\n }", "public void clear(){\r\n\t\tfor ( int x = 0; x < grid.length; x++ )\r\n\t\t\tfor ( int y = 0; y < grid[0].length; y++ )\r\n\t\t\t\tgrid[x][y] = false;\r\n\t}", "public void clear() {\n // super.clear(); BUG: fix me\n if (tokenStack != null) {\n tokenStack.clear();\n }\n }", "@Test\n\t@TestProperties(name = \"Clear element ${by}:${locator} selection\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void clearSelections() {\n\t\tthrow new IllegalStateException(\"Unimplemenetd\");\n\t}", "public boolean isEmptyNestedClauses ();", "public void clear() {\n mSize = 0;\n mRoot = null;\n }", "public baconhep.TTau.Builder clearQ() {\n fieldSetFlags()[5] = false;\n return this;\n }", "public void resetBuildings(){\n\t\tfor(Structure building : this.buildings){\n\t\t\tbuilding.reset();\n\t\t}\n\t}", "public void clear() {\n synchronized (unchecked) {\n unchecked.clear();\n }\n }", "public void clear() {\n\t// Does nothing\n}", "public com.opentext.bn.converters.avro.entity.DocumentEvent.Builder clearContainingParentLevel() {\n containingParentLevel = null;\n fieldSetFlags()[3] = false;\n return this;\n }", "@Test\n public void testClear() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 1, 1, 1, 1, 1);\n instance.addAll(c);\n instance.clear();\n\n assertTrue(instance.isEmpty());\n\n }", "private void clear() {\n\t\tSystem.out.println(\"Calling clear\");\n\t}" ]
[ "0.5781791", "0.5721566", "0.56739753", "0.56599176", "0.5649652", "0.5639837", "0.560191", "0.55700684", "0.5523456", "0.5521746", "0.55180657", "0.5515784", "0.5508281", "0.54828006", "0.5465869", "0.5455565", "0.540705", "0.5382644", "0.534797", "0.53456306", "0.53456306", "0.5345377", "0.53437847", "0.53386986", "0.53079545", "0.5304433", "0.52989185", "0.52869296", "0.52859783", "0.5284559", "0.5278965", "0.52514064", "0.52126986", "0.51999193", "0.5199454", "0.5199401", "0.5190849", "0.51893437", "0.51746297", "0.51725817", "0.5172547", "0.51662904", "0.51597524", "0.51595503", "0.51568353", "0.51568353", "0.5156259", "0.51493824", "0.5148346", "0.51440895", "0.5143258", "0.51370376", "0.5129334", "0.5123832", "0.51231927", "0.51231927", "0.51231927", "0.5120013", "0.5120013", "0.511736", "0.51144904", "0.5108809", "0.5105152", "0.51027584", "0.5099317", "0.50992453", "0.50978917", "0.5094084", "0.5083294", "0.50767326", "0.50767326", "0.50683063", "0.5063395", "0.50470185", "0.5045633", "0.50354874", "0.5031182", "0.5023844", "0.5016788", "0.5016788", "0.5015316", "0.50133485", "0.5011902", "0.50096893", "0.5001161", "0.49914443", "0.49901152", "0.49847323", "0.49787146", "0.4977679", "0.4968763", "0.49659663", "0.49650082", "0.49610528", "0.49577975", "0.49565306", "0.4955721", "0.49556604", "0.49553072", "0.494572" ]
0.66397494
0
This method was generated by MyBatis Generator. This method corresponds to the database table user_info
UserInfo deleteByPrimaryKey(Integer id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "UserInfoDao getUserInfoDao();", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "User getUserInformation(Long user_id);", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "UserInfo getUserById(Integer user_id);", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "Userinfo selectByPrimaryKey(String userId);", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "BankUserInfo selectByPrimaryKey(String userId);", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "java.lang.String getXUsersInfo();", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "List<Userinfo> selectAll();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "UserInfo selectByPrimaryKey(Integer id);", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "UserInfo getUserInfo();", "@Override\n\tpublic User getUserInfoById(String idUser) {\n\t\treturn userRepository.getUserInfoById(idUser);\n\t}", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic List<User> findAll() throws Exception {\n\t\tList<User> list=userMapper.findAll();\r\n\t\tif(null!=list){\r\n\t\t\treturn list;\r\n\t\t}else{\r\n\t\t\tthrow new Exception(\"信息表为空\");\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}", "public UserInformation findInformationById(int id);", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public String insertSelective(Userinfo record) {\n SQL sql = new SQL();\n sql.INSERT_INTO(\"userinfo\");\n \n if (record.getUserid() != null) {\n sql.VALUES(\"userid\", \"#{userid,jdbcType=INTEGER}\");\n }\n \n if (record.getUsername() != null) {\n sql.VALUES(\"username\", \"#{username,jdbcType=VARCHAR}\");\n }\n \n if (record.getSex() != null) {\n sql.VALUES(\"sex\", \"#{sex,jdbcType=BIT}\");\n }\n \n if (record.getTel() != null) {\n sql.VALUES(\"tel\", \"#{tel,jdbcType=VARCHAR}\");\n }\n \n if (record.getLastlogintime() != null) {\n sql.VALUES(\"lastlogintime\", \"#{lastlogintime,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getStatus() != null) {\n sql.VALUES(\"status\", \"#{status,jdbcType=BIT}\");\n }\n \n if (record.getWxopenid() != null) {\n sql.VALUES(\"wxopenid\", \"#{wxopenid,jdbcType=VARCHAR}\");\n }\n \n if (record.getAddr() != null) {\n sql.VALUES(\"addr\", \"#{addr,jdbcType=VARCHAR}\");\n }\n \n if (record.getDelStatus() != null) {\n sql.VALUES(\"del_status\", \"#{delStatus,jdbcType=BIT}\");\n }\n \n if (record.getCreatetime() != null) {\n sql.VALUES(\"createtime\", \"#{createtime,jdbcType=TIMESTAMP}\");\n }\n \n return sql.toString();\n }", "BankUserInfo selectByPrimaryKey(String bankUserId);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "List<User> getAll() throws SQLException;", "@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}", "private void getUserInfo() {\n\t}", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "public String updateByPrimaryKeySelective(Userinfo record) {\n SQL sql = new SQL();\n sql.UPDATE(\"userinfo\");\n \n if (record.getUsername() != null) {\n sql.SET(\"username = #{username,jdbcType=VARCHAR}\");\n }\n \n if (record.getSex() != null) {\n sql.SET(\"sex = #{sex,jdbcType=BIT}\");\n }\n \n if (record.getTel() != null) {\n sql.SET(\"tel = #{tel,jdbcType=VARCHAR}\");\n }\n \n if (record.getLastlogintime() != null) {\n sql.SET(\"lastlogintime = #{lastlogintime,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getStatus() != null) {\n sql.SET(\"status = #{status,jdbcType=BIT}\");\n }\n \n if (record.getWxopenid() != null) {\n sql.SET(\"wxopenid = #{wxopenid,jdbcType=VARCHAR}\");\n }\n \n if (record.getAddr() != null) {\n sql.SET(\"addr = #{addr,jdbcType=VARCHAR}\");\n }\n \n if (record.getDelStatus() != null) {\n sql.SET(\"del_status = #{delStatus,jdbcType=BIT}\");\n }\n \n if (record.getCreatetime() != null) {\n sql.SET(\"createtime = #{createtime,jdbcType=TIMESTAMP}\");\n }\n \n sql.WHERE(\"userid = #{userid,jdbcType=INTEGER}\");\n \n return sql.toString();\n }", "static WritableMap userInfoToJSON(UserInfo info) {\n\n WritableMap userInfo = Arguments.createMap();\n\n if (info == null) {\n return userInfo;\n }\n\n userInfo.putString(\"displayableId\", info.getDisplayableId());\n userInfo.putString(\"familyName\", info.getFamilyName());\n userInfo.putString(\"givenName\", info.getGivenName());\n userInfo.putString(\"identityProvider\", info.getIdentityProvider());\n userInfo.putString(\"passwordChangeUrl\", String.valueOf(info.getPasswordChangeUrl()));\n userInfo.putString(\"passwordExpiresOn\", String.valueOf(info.getPasswordExpiresOn()));\n userInfo.putString(\"uniqueId\", info.getUserId());\n userInfo.putString(\"userId\", info.getUserId());\n\n return userInfo;\n }", "@Override\r\n\tpublic UserInfo getUserInfo(int id) {\n\t\treturn userInfo;\r\n\t}", "@Override\n public String toString() {\n return \"User [id=\" + userId + \", userName=\" + userName + \", password=\" + password\n + \", firstName=\" + firstName + \", lastName=\" + lastName\n + \", email=\" + email + \"]\";\n }", "public static Result<Map<String, String>> getUsers(Connection c){\n PreparedStatement pstmt;\n ResultSet rst;\n Map<String, String> maps=new HashMap<String,String>(); //Maps\n try {\n pstmt = c.prepareStatement(getUserStatement);\n rst=pstmt.executeQuery();\n while(rst.next()){\n String name=rst.getString(\"name\").trim();\n String username=rst.getString(\"username\").trim();\n System.out.println(name+\",\"+username);\n System.out.println(rst.getRow());\n maps.put(username,name);\n }\n\n /* condition to check if the map/databse is empty*/\n if(!maps.isEmpty()){\n return Result.success(maps);\n }\n else{\n return Result.failure(\"There are no user for this table\");\n }\n }\n catch (SQLException e) {\n return Result.fatal(\"Unknown error\");\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "public HashMap<String, Object> showUserDetailInfo(String userId) throws myAccountServiceException{\n return projectDB.searchUserDetailInfo(userId);\n }", "public static ObjectClassInfo getUserSchema() {\n\n\t\tObjectClassInfoBuilder builder = new ObjectClassInfoBuilder();\n\n\t\tbuilder.addAttributeInfo(Name.INFO);\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"userName\").setRequired(true).build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.formatted\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.familyName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.givenName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.middleName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.honorificPrefix\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.honorificSuffix\").build());\n\n\t\tbuilder.addAttributeInfo(OperationalAttributeInfos.ENABLE);\n\n\t\tbuilder.addAttributeInfo(OperationalAttributeInfos.PASSWORD);\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"displayName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"nickName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"title\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"userType\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"locale\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"preferredLanguage\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"id\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.work.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.work.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.home.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.home.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.other.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.other.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"entitlements.default.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"entitlements.default.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.work.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.work.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.other.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.other.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.pager.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.pager.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.fax.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.fax.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.mobile.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.mobile.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.aim.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.aim.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.xmpp.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.xmpp.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.skype.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.skype.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.qq.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.qq.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.yahoo.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.yahoo.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.other.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.other.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.msn.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.msn.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.icq.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.icq.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.gtalk.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.gtalk.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"photos.photo.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"photos.photo.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"photos.thumbnail.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"photos.thumbnail.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.streetAddress\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.locality\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.region\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.postalCode\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.country\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.formatted\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.streetAddress\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.locality\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.region\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.postalCode\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.country\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.formatted\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.streetAddress\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.locality\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.region\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.postalCode\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.country\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.formatted\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"groups.default.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"groups.default.display\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"entitlements.default.display\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"roles.default.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"roles.default.display\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"roles.default.primary\").setType(Boolean.class).build());\n\n\t\treturn builder.build();\n\t}", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }", "public static UserEntity getUserInfo(String nick) throws SQLException {\n List<Map<String, String>> result = db.get(SELECT_USER_BY_NICK, nick);\n if (result.size() > 0) {\n UserEntity userInfo = new UserEntity();\n userInfo.setId(Long.valueOf(result.get(0).get(\"id\")));\n userInfo.setNick(result.get(0).get(\"nick\"));\n userInfo.setEmail(result.get(0).get(\"email\"));\n userInfo.setEncryptedPassword(result.get(0).get(\"password\"));\n userInfo.setRegistered(result.get(0).get(\"registered_datetime\"));\n return userInfo;\n } else {\n return null;\n }\n }", "public void save(UserInfo userInfo){\n\t\t\n\t\t\n\t\tMap map = FieldUtil.getPreFieldMap(UserInfo.class,userInfo);\n\t\tStringBuffer sql=new StringBuffer(\"insert into CSMS_USER_INFO\");\n\t\tsql.append(map.get(\"insertNameStr\"));\n\t\tsaveOrUpdate(sql.toString(), (List) map.get(\"param\"));\n\t}", "public UserInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public UserInfoExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }", "@Override\n\tpublic List<KeyValuePair> getUserNameList(boolean active) {\n\t\tif (active) { // only active cabs\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user WHERE user.ACTIVE ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t} else {\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t}\n\t}", "com.google.protobuf.ByteString\n getXUsersInfoBytes();", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "@Override\n\tpublic List<DrvUserinfo> findDrvUserInfo(String sqlId, Map<String ,Object> map) {\n\t\ttry {\n\t\t\treturn (List<DrvUserinfo>) baseDaoSupport.findForList(sqlId, map);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic Map<String, Object> datos(String username) {\n\t\tString SQL=\"select u.idusuario,p.nombre,p.apellidos,p.edad,p.telefono,p.correo,p.dni,r.nomrol from persona as p, usuario as u, trabajador as t,rol as r where u.idusuario=t.idusuario and t.idrol =r.idrol and p.idpersona =u.idpersona and u.username = ? \";\n\t\t\t\tMap<String,Object> map = jdbc.queryForMap(SQL,username);\n\t\treturn map;\n\t}" ]
[ "0.6873077", "0.64235103", "0.6403907", "0.6348331", "0.6313405", "0.62931126", "0.6289738", "0.627959", "0.6279387", "0.6262444", "0.62240165", "0.61990565", "0.6185124", "0.6179039", "0.6176479", "0.61702657", "0.61697227", "0.6161658", "0.61595076", "0.60747087", "0.60616916", "0.60554034", "0.60355544", "0.60310847", "0.60261273", "0.60242134", "0.5996731", "0.5975525", "0.59628564", "0.5950578", "0.5944172", "0.5937984", "0.59376186", "0.59174305", "0.59118974", "0.5897023", "0.58969504", "0.5887118", "0.5886502", "0.58760893", "0.58671266", "0.58505595", "0.5845118", "0.5842763", "0.5823603", "0.5811745", "0.58060014", "0.57707", "0.57651716", "0.57592976", "0.57557064", "0.5742945", "0.5742247", "0.57250774", "0.5720119", "0.57167023", "0.57152826", "0.5715082", "0.5711083", "0.5710773", "0.5686697", "0.5684898", "0.5662615", "0.5654657", "0.5647518", "0.5642397", "0.56256956", "0.56188273", "0.5618258", "0.5599148", "0.55939245", "0.5589808", "0.55664396", "0.5550013", "0.55364895", "0.5522932", "0.55205566", "0.5517677", "0.5517442", "0.55121744", "0.55029696", "0.549841", "0.54976815", "0.5496053", "0.54912573", "0.5490739", "0.54873973", "0.5484171", "0.5483694", "0.5483686", "0.54820985", "0.5479959", "0.54777944", "0.547446", "0.5469737", "0.54667264", "0.5456668", "0.54454523", "0.54449713", "0.5443205", "0.54385334" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table user_info
int insert(UserInfo record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "UserInfoDao getUserInfoDao();", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "User getUserInformation(Long user_id);", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "UserInfo getUserById(Integer user_id);", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "Userinfo selectByPrimaryKey(String userId);", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "BankUserInfo selectByPrimaryKey(String userId);", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "java.lang.String getXUsersInfo();", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "List<Userinfo> selectAll();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "UserInfo selectByPrimaryKey(Integer id);", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "UserInfo getUserInfo();", "@Override\n\tpublic User getUserInfoById(String idUser) {\n\t\treturn userRepository.getUserInfoById(idUser);\n\t}", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Override\r\n\tpublic List<User> findAll() throws Exception {\n\t\tList<User> list=userMapper.findAll();\r\n\t\tif(null!=list){\r\n\t\t\treturn list;\r\n\t\t}else{\r\n\t\t\tthrow new Exception(\"信息表为空\");\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}", "public UserInformation findInformationById(int id);", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public String insertSelective(Userinfo record) {\n SQL sql = new SQL();\n sql.INSERT_INTO(\"userinfo\");\n \n if (record.getUserid() != null) {\n sql.VALUES(\"userid\", \"#{userid,jdbcType=INTEGER}\");\n }\n \n if (record.getUsername() != null) {\n sql.VALUES(\"username\", \"#{username,jdbcType=VARCHAR}\");\n }\n \n if (record.getSex() != null) {\n sql.VALUES(\"sex\", \"#{sex,jdbcType=BIT}\");\n }\n \n if (record.getTel() != null) {\n sql.VALUES(\"tel\", \"#{tel,jdbcType=VARCHAR}\");\n }\n \n if (record.getLastlogintime() != null) {\n sql.VALUES(\"lastlogintime\", \"#{lastlogintime,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getStatus() != null) {\n sql.VALUES(\"status\", \"#{status,jdbcType=BIT}\");\n }\n \n if (record.getWxopenid() != null) {\n sql.VALUES(\"wxopenid\", \"#{wxopenid,jdbcType=VARCHAR}\");\n }\n \n if (record.getAddr() != null) {\n sql.VALUES(\"addr\", \"#{addr,jdbcType=VARCHAR}\");\n }\n \n if (record.getDelStatus() != null) {\n sql.VALUES(\"del_status\", \"#{delStatus,jdbcType=BIT}\");\n }\n \n if (record.getCreatetime() != null) {\n sql.VALUES(\"createtime\", \"#{createtime,jdbcType=TIMESTAMP}\");\n }\n \n return sql.toString();\n }", "BankUserInfo selectByPrimaryKey(String bankUserId);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "List<User> getAll() throws SQLException;", "@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}", "private void getUserInfo() {\n\t}", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "public String updateByPrimaryKeySelective(Userinfo record) {\n SQL sql = new SQL();\n sql.UPDATE(\"userinfo\");\n \n if (record.getUsername() != null) {\n sql.SET(\"username = #{username,jdbcType=VARCHAR}\");\n }\n \n if (record.getSex() != null) {\n sql.SET(\"sex = #{sex,jdbcType=BIT}\");\n }\n \n if (record.getTel() != null) {\n sql.SET(\"tel = #{tel,jdbcType=VARCHAR}\");\n }\n \n if (record.getLastlogintime() != null) {\n sql.SET(\"lastlogintime = #{lastlogintime,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getStatus() != null) {\n sql.SET(\"status = #{status,jdbcType=BIT}\");\n }\n \n if (record.getWxopenid() != null) {\n sql.SET(\"wxopenid = #{wxopenid,jdbcType=VARCHAR}\");\n }\n \n if (record.getAddr() != null) {\n sql.SET(\"addr = #{addr,jdbcType=VARCHAR}\");\n }\n \n if (record.getDelStatus() != null) {\n sql.SET(\"del_status = #{delStatus,jdbcType=BIT}\");\n }\n \n if (record.getCreatetime() != null) {\n sql.SET(\"createtime = #{createtime,jdbcType=TIMESTAMP}\");\n }\n \n sql.WHERE(\"userid = #{userid,jdbcType=INTEGER}\");\n \n return sql.toString();\n }", "static WritableMap userInfoToJSON(UserInfo info) {\n\n WritableMap userInfo = Arguments.createMap();\n\n if (info == null) {\n return userInfo;\n }\n\n userInfo.putString(\"displayableId\", info.getDisplayableId());\n userInfo.putString(\"familyName\", info.getFamilyName());\n userInfo.putString(\"givenName\", info.getGivenName());\n userInfo.putString(\"identityProvider\", info.getIdentityProvider());\n userInfo.putString(\"passwordChangeUrl\", String.valueOf(info.getPasswordChangeUrl()));\n userInfo.putString(\"passwordExpiresOn\", String.valueOf(info.getPasswordExpiresOn()));\n userInfo.putString(\"uniqueId\", info.getUserId());\n userInfo.putString(\"userId\", info.getUserId());\n\n return userInfo;\n }", "@Override\r\n\tpublic UserInfo getUserInfo(int id) {\n\t\treturn userInfo;\r\n\t}", "@Override\n public String toString() {\n return \"User [id=\" + userId + \", userName=\" + userName + \", password=\" + password\n + \", firstName=\" + firstName + \", lastName=\" + lastName\n + \", email=\" + email + \"]\";\n }", "public static Result<Map<String, String>> getUsers(Connection c){\n PreparedStatement pstmt;\n ResultSet rst;\n Map<String, String> maps=new HashMap<String,String>(); //Maps\n try {\n pstmt = c.prepareStatement(getUserStatement);\n rst=pstmt.executeQuery();\n while(rst.next()){\n String name=rst.getString(\"name\").trim();\n String username=rst.getString(\"username\").trim();\n System.out.println(name+\",\"+username);\n System.out.println(rst.getRow());\n maps.put(username,name);\n }\n\n /* condition to check if the map/databse is empty*/\n if(!maps.isEmpty()){\n return Result.success(maps);\n }\n else{\n return Result.failure(\"There are no user for this table\");\n }\n }\n catch (SQLException e) {\n return Result.fatal(\"Unknown error\");\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "public HashMap<String, Object> showUserDetailInfo(String userId) throws myAccountServiceException{\n return projectDB.searchUserDetailInfo(userId);\n }", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "public static ObjectClassInfo getUserSchema() {\n\n\t\tObjectClassInfoBuilder builder = new ObjectClassInfoBuilder();\n\n\t\tbuilder.addAttributeInfo(Name.INFO);\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"userName\").setRequired(true).build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.formatted\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.familyName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.givenName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.middleName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.honorificPrefix\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.honorificSuffix\").build());\n\n\t\tbuilder.addAttributeInfo(OperationalAttributeInfos.ENABLE);\n\n\t\tbuilder.addAttributeInfo(OperationalAttributeInfos.PASSWORD);\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"displayName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"nickName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"title\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"userType\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"locale\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"preferredLanguage\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"id\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.work.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.work.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.home.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.home.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.other.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.other.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"entitlements.default.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"entitlements.default.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.work.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.work.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.other.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.other.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.pager.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.pager.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.fax.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.fax.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.mobile.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.mobile.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.aim.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.aim.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.xmpp.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.xmpp.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.skype.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.skype.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.qq.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.qq.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.yahoo.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.yahoo.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.other.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.other.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.msn.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.msn.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.icq.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.icq.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.gtalk.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.gtalk.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"photos.photo.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"photos.photo.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"photos.thumbnail.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"photos.thumbnail.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.streetAddress\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.locality\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.region\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.postalCode\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.country\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.formatted\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.streetAddress\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.locality\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.region\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.postalCode\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.country\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.formatted\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.streetAddress\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.locality\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.region\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.postalCode\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.country\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.formatted\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"groups.default.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"groups.default.display\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"entitlements.default.display\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"roles.default.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"roles.default.display\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"roles.default.primary\").setType(Boolean.class).build());\n\n\t\treturn builder.build();\n\t}", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }", "public void save(UserInfo userInfo){\n\t\t\n\t\t\n\t\tMap map = FieldUtil.getPreFieldMap(UserInfo.class,userInfo);\n\t\tStringBuffer sql=new StringBuffer(\"insert into CSMS_USER_INFO\");\n\t\tsql.append(map.get(\"insertNameStr\"));\n\t\tsaveOrUpdate(sql.toString(), (List) map.get(\"param\"));\n\t}", "public static UserEntity getUserInfo(String nick) throws SQLException {\n List<Map<String, String>> result = db.get(SELECT_USER_BY_NICK, nick);\n if (result.size() > 0) {\n UserEntity userInfo = new UserEntity();\n userInfo.setId(Long.valueOf(result.get(0).get(\"id\")));\n userInfo.setNick(result.get(0).get(\"nick\"));\n userInfo.setEmail(result.get(0).get(\"email\"));\n userInfo.setEncryptedPassword(result.get(0).get(\"password\"));\n userInfo.setRegistered(result.get(0).get(\"registered_datetime\"));\n return userInfo;\n } else {\n return null;\n }\n }", "public UserInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public UserInfoExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }", "@Override\n\tpublic List<KeyValuePair> getUserNameList(boolean active) {\n\t\tif (active) { // only active cabs\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user WHERE user.ACTIVE ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t} else {\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t}\n\t}", "com.google.protobuf.ByteString\n getXUsersInfoBytes();", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "@Override\n\tpublic List<DrvUserinfo> findDrvUserInfo(String sqlId, Map<String ,Object> map) {\n\t\ttry {\n\t\t\treturn (List<DrvUserinfo>) baseDaoSupport.findForList(sqlId, map);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic Map<String, Object> datos(String username) {\n\t\tString SQL=\"select u.idusuario,p.nombre,p.apellidos,p.edad,p.telefono,p.correo,p.dni,r.nomrol from persona as p, usuario as u, trabajador as t,rol as r where u.idusuario=t.idusuario and t.idrol =r.idrol and p.idpersona =u.idpersona and u.username = ? \";\n\t\t\t\tMap<String,Object> map = jdbc.queryForMap(SQL,username);\n\t\treturn map;\n\t}" ]
[ "0.68723136", "0.64219886", "0.640336", "0.63471997", "0.6312311", "0.62912816", "0.6288767", "0.62795556", "0.62785876", "0.62608176", "0.6222168", "0.6197579", "0.6184619", "0.61774355", "0.617524", "0.6170038", "0.61688036", "0.61596185", "0.6159283", "0.6074697", "0.60604525", "0.6054075", "0.6035931", "0.60298896", "0.60254955", "0.6023094", "0.59956443", "0.597526", "0.596231", "0.5950752", "0.59433025", "0.5937078", "0.59365714", "0.59164226", "0.5910995", "0.5895875", "0.5895661", "0.5886724", "0.5884882", "0.587632", "0.58687687", "0.58494663", "0.5844306", "0.58424085", "0.5824265", "0.58108824", "0.5804356", "0.5769245", "0.57639724", "0.5758577", "0.5755492", "0.57419825", "0.57400113", "0.5724242", "0.5719813", "0.5716501", "0.5716", "0.57155925", "0.57132614", "0.5710527", "0.56861234", "0.568486", "0.566165", "0.56538385", "0.56468976", "0.5641904", "0.56243366", "0.5618227", "0.5617956", "0.55982274", "0.5592844", "0.5589185", "0.5564364", "0.5548934", "0.5534743", "0.5521546", "0.55205995", "0.5518298", "0.5515341", "0.55100375", "0.5502737", "0.54978395", "0.54976285", "0.5494747", "0.5490901", "0.5489876", "0.54854226", "0.54835606", "0.54835206", "0.5482771", "0.5481357", "0.5478733", "0.54778755", "0.5473113", "0.5468575", "0.54655284", "0.54570585", "0.5445164", "0.5443649", "0.5443083", "0.5437986" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table user_info
UserInfo selectByPrimaryKey(Integer id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "UserInfoDao getUserInfoDao();", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "User getUserInformation(Long user_id);", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "UserInfo getUserById(Integer user_id);", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "Userinfo selectByPrimaryKey(String userId);", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "BankUserInfo selectByPrimaryKey(String userId);", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "java.lang.String getXUsersInfo();", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "List<Userinfo> selectAll();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "UserInfo getUserInfo();", "@Override\n\tpublic User getUserInfoById(String idUser) {\n\t\treturn userRepository.getUserInfoById(idUser);\n\t}", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic List<User> findAll() throws Exception {\n\t\tList<User> list=userMapper.findAll();\r\n\t\tif(null!=list){\r\n\t\t\treturn list;\r\n\t\t}else{\r\n\t\t\tthrow new Exception(\"信息表为空\");\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}", "public UserInformation findInformationById(int id);", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public String insertSelective(Userinfo record) {\n SQL sql = new SQL();\n sql.INSERT_INTO(\"userinfo\");\n \n if (record.getUserid() != null) {\n sql.VALUES(\"userid\", \"#{userid,jdbcType=INTEGER}\");\n }\n \n if (record.getUsername() != null) {\n sql.VALUES(\"username\", \"#{username,jdbcType=VARCHAR}\");\n }\n \n if (record.getSex() != null) {\n sql.VALUES(\"sex\", \"#{sex,jdbcType=BIT}\");\n }\n \n if (record.getTel() != null) {\n sql.VALUES(\"tel\", \"#{tel,jdbcType=VARCHAR}\");\n }\n \n if (record.getLastlogintime() != null) {\n sql.VALUES(\"lastlogintime\", \"#{lastlogintime,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getStatus() != null) {\n sql.VALUES(\"status\", \"#{status,jdbcType=BIT}\");\n }\n \n if (record.getWxopenid() != null) {\n sql.VALUES(\"wxopenid\", \"#{wxopenid,jdbcType=VARCHAR}\");\n }\n \n if (record.getAddr() != null) {\n sql.VALUES(\"addr\", \"#{addr,jdbcType=VARCHAR}\");\n }\n \n if (record.getDelStatus() != null) {\n sql.VALUES(\"del_status\", \"#{delStatus,jdbcType=BIT}\");\n }\n \n if (record.getCreatetime() != null) {\n sql.VALUES(\"createtime\", \"#{createtime,jdbcType=TIMESTAMP}\");\n }\n \n return sql.toString();\n }", "BankUserInfo selectByPrimaryKey(String bankUserId);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "List<User> getAll() throws SQLException;", "@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}", "private void getUserInfo() {\n\t}", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "public String updateByPrimaryKeySelective(Userinfo record) {\n SQL sql = new SQL();\n sql.UPDATE(\"userinfo\");\n \n if (record.getUsername() != null) {\n sql.SET(\"username = #{username,jdbcType=VARCHAR}\");\n }\n \n if (record.getSex() != null) {\n sql.SET(\"sex = #{sex,jdbcType=BIT}\");\n }\n \n if (record.getTel() != null) {\n sql.SET(\"tel = #{tel,jdbcType=VARCHAR}\");\n }\n \n if (record.getLastlogintime() != null) {\n sql.SET(\"lastlogintime = #{lastlogintime,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getStatus() != null) {\n sql.SET(\"status = #{status,jdbcType=BIT}\");\n }\n \n if (record.getWxopenid() != null) {\n sql.SET(\"wxopenid = #{wxopenid,jdbcType=VARCHAR}\");\n }\n \n if (record.getAddr() != null) {\n sql.SET(\"addr = #{addr,jdbcType=VARCHAR}\");\n }\n \n if (record.getDelStatus() != null) {\n sql.SET(\"del_status = #{delStatus,jdbcType=BIT}\");\n }\n \n if (record.getCreatetime() != null) {\n sql.SET(\"createtime = #{createtime,jdbcType=TIMESTAMP}\");\n }\n \n sql.WHERE(\"userid = #{userid,jdbcType=INTEGER}\");\n \n return sql.toString();\n }", "static WritableMap userInfoToJSON(UserInfo info) {\n\n WritableMap userInfo = Arguments.createMap();\n\n if (info == null) {\n return userInfo;\n }\n\n userInfo.putString(\"displayableId\", info.getDisplayableId());\n userInfo.putString(\"familyName\", info.getFamilyName());\n userInfo.putString(\"givenName\", info.getGivenName());\n userInfo.putString(\"identityProvider\", info.getIdentityProvider());\n userInfo.putString(\"passwordChangeUrl\", String.valueOf(info.getPasswordChangeUrl()));\n userInfo.putString(\"passwordExpiresOn\", String.valueOf(info.getPasswordExpiresOn()));\n userInfo.putString(\"uniqueId\", info.getUserId());\n userInfo.putString(\"userId\", info.getUserId());\n\n return userInfo;\n }", "@Override\r\n\tpublic UserInfo getUserInfo(int id) {\n\t\treturn userInfo;\r\n\t}", "@Override\n public String toString() {\n return \"User [id=\" + userId + \", userName=\" + userName + \", password=\" + password\n + \", firstName=\" + firstName + \", lastName=\" + lastName\n + \", email=\" + email + \"]\";\n }", "public static Result<Map<String, String>> getUsers(Connection c){\n PreparedStatement pstmt;\n ResultSet rst;\n Map<String, String> maps=new HashMap<String,String>(); //Maps\n try {\n pstmt = c.prepareStatement(getUserStatement);\n rst=pstmt.executeQuery();\n while(rst.next()){\n String name=rst.getString(\"name\").trim();\n String username=rst.getString(\"username\").trim();\n System.out.println(name+\",\"+username);\n System.out.println(rst.getRow());\n maps.put(username,name);\n }\n\n /* condition to check if the map/databse is empty*/\n if(!maps.isEmpty()){\n return Result.success(maps);\n }\n else{\n return Result.failure(\"There are no user for this table\");\n }\n }\n catch (SQLException e) {\n return Result.fatal(\"Unknown error\");\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "public HashMap<String, Object> showUserDetailInfo(String userId) throws myAccountServiceException{\n return projectDB.searchUserDetailInfo(userId);\n }", "public static ObjectClassInfo getUserSchema() {\n\n\t\tObjectClassInfoBuilder builder = new ObjectClassInfoBuilder();\n\n\t\tbuilder.addAttributeInfo(Name.INFO);\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"userName\").setRequired(true).build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.formatted\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.familyName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.givenName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.middleName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.honorificPrefix\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"name.honorificSuffix\").build());\n\n\t\tbuilder.addAttributeInfo(OperationalAttributeInfos.ENABLE);\n\n\t\tbuilder.addAttributeInfo(OperationalAttributeInfos.PASSWORD);\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"displayName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"nickName\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"title\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"userType\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"locale\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"preferredLanguage\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"id\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.work.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.work.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.home.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.home.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.other.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"emails.other.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"entitlements.default.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"entitlements.default.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.work.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.work.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.other.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.other.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.pager.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.pager.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.fax.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.fax.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"phoneNumbers.mobile.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"phoneNumbers.mobile.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.aim.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.aim.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.xmpp.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.xmpp.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.skype.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.skype.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.qq.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.qq.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.yahoo.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.yahoo.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.other.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.other.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.msn.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.msn.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.icq.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.icq.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.gtalk.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"ims.gtalk.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"photos.photo.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"photos.photo.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"photos.thumbnail.value\").build());\n\t\tbuilder.addAttributeInfo(\n\t\t\t\tAttributeInfoBuilder.define(\"photos.thumbnail.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.streetAddress\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.locality\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.region\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.postalCode\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.country\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.formatted\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.work.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.streetAddress\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.locality\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.region\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.postalCode\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.country\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.formatted\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.home.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.streetAddress\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.locality\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.region\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.postalCode\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.country\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.formatted\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"addresses.other.primary\").setType(Boolean.class).build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"groups.default.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"groups.default.display\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"entitlements.default.display\").build());\n\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"roles.default.value\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"roles.default.display\").build());\n\t\tbuilder.addAttributeInfo(AttributeInfoBuilder.define(\"roles.default.primary\").setType(Boolean.class).build());\n\n\t\treturn builder.build();\n\t}", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }", "public static UserEntity getUserInfo(String nick) throws SQLException {\n List<Map<String, String>> result = db.get(SELECT_USER_BY_NICK, nick);\n if (result.size() > 0) {\n UserEntity userInfo = new UserEntity();\n userInfo.setId(Long.valueOf(result.get(0).get(\"id\")));\n userInfo.setNick(result.get(0).get(\"nick\"));\n userInfo.setEmail(result.get(0).get(\"email\"));\n userInfo.setEncryptedPassword(result.get(0).get(\"password\"));\n userInfo.setRegistered(result.get(0).get(\"registered_datetime\"));\n return userInfo;\n } else {\n return null;\n }\n }", "public void save(UserInfo userInfo){\n\t\t\n\t\t\n\t\tMap map = FieldUtil.getPreFieldMap(UserInfo.class,userInfo);\n\t\tStringBuffer sql=new StringBuffer(\"insert into CSMS_USER_INFO\");\n\t\tsql.append(map.get(\"insertNameStr\"));\n\t\tsaveOrUpdate(sql.toString(), (List) map.get(\"param\"));\n\t}", "public UserInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public UserInfoExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }", "@Override\n\tpublic List<KeyValuePair> getUserNameList(boolean active) {\n\t\tif (active) { // only active cabs\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user WHERE user.ACTIVE ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t} else {\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t}\n\t}", "com.google.protobuf.ByteString\n getXUsersInfoBytes();", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "@Override\n\tpublic List<DrvUserinfo> findDrvUserInfo(String sqlId, Map<String ,Object> map) {\n\t\ttry {\n\t\t\treturn (List<DrvUserinfo>) baseDaoSupport.findForList(sqlId, map);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic Map<String, Object> datos(String username) {\n\t\tString SQL=\"select u.idusuario,p.nombre,p.apellidos,p.edad,p.telefono,p.correo,p.dni,r.nomrol from persona as p, usuario as u, trabajador as t,rol as r where u.idusuario=t.idusuario and t.idrol =r.idrol and p.idpersona =u.idpersona and u.username = ? \";\n\t\t\t\tMap<String,Object> map = jdbc.queryForMap(SQL,username);\n\t\treturn map;\n\t}" ]
[ "0.6873077", "0.64235103", "0.6403907", "0.6348331", "0.6313405", "0.62931126", "0.6289738", "0.627959", "0.6279387", "0.6262444", "0.62240165", "0.61990565", "0.6185124", "0.6179039", "0.6176479", "0.61702657", "0.61697227", "0.6161658", "0.61595076", "0.60747087", "0.60616916", "0.60554034", "0.60355544", "0.60310847", "0.60261273", "0.60242134", "0.5996731", "0.5975525", "0.59628564", "0.5950578", "0.5944172", "0.5937984", "0.59376186", "0.59174305", "0.59118974", "0.5897023", "0.58969504", "0.5887118", "0.5886502", "0.58760893", "0.58671266", "0.58505595", "0.5845118", "0.5842763", "0.5823603", "0.58060014", "0.57707", "0.57651716", "0.57592976", "0.57557064", "0.5742945", "0.5742247", "0.57250774", "0.5720119", "0.57167023", "0.57152826", "0.5715082", "0.5711083", "0.5710773", "0.5686697", "0.5684898", "0.5662615", "0.5654657", "0.5647518", "0.5642397", "0.56256956", "0.56188273", "0.5618258", "0.5599148", "0.55939245", "0.5589808", "0.55664396", "0.5550013", "0.55364895", "0.5522932", "0.55205566", "0.5517677", "0.5517442", "0.55121744", "0.55029696", "0.549841", "0.54976815", "0.5496053", "0.54912573", "0.5490739", "0.54873973", "0.5484171", "0.5483694", "0.5483686", "0.54820985", "0.5479959", "0.54777944", "0.547446", "0.5469737", "0.54667264", "0.5456668", "0.54454523", "0.54449713", "0.5443205", "0.54385334" ]
0.5811745
45